Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
1fabc0f6
Commit
1fabc0f6
authored
Oct 15, 2016
by
John Kessenich
Committed by
GitHub
Oct 15, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #548 from baldurk/vs2010-compile-fixes
VS2010 compile fixes
parents
bf8a6ef7
486d9e44
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
11 deletions
+16
-11
SPVRemapper.h
SPIRV/SPVRemapper.h
+1
-0
SpvBuilder.cpp
SPIRV/SpvBuilder.cpp
+1
-1
hex_float.h
SPIRV/hex_float.h
+0
-0
StandAlone.cpp
StandAlone/StandAlone.cpp
+2
-2
Common.h
glslang/Include/Common.h
+4
-0
ParseContextBase.cpp
glslang/MachineIndependent/ParseContextBase.cpp
+1
-1
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+2
-2
HexFloat.cpp
gtests/HexFloat.cpp
+0
-0
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+5
-5
No files found.
SPIRV/SPVRemapper.h
View file @
1fabc0f6
...
@@ -75,6 +75,7 @@ public:
...
@@ -75,6 +75,7 @@ public:
#if !defined (use_cpp11)
#if !defined (use_cpp11)
#include <cstdio>
#include <cstdio>
#include <cstdint>
namespace
spv
{
namespace
spv
{
class
spirvbin_t
:
public
spirvbin_base_t
class
spirvbin_t
:
public
spirvbin_base_t
...
...
SPIRV/SpvBuilder.cpp
View file @
1fabc0f6
...
@@ -797,7 +797,7 @@ Id Builder::makeFloat16Constant(float f16, bool specConstant)
...
@@ -797,7 +797,7 @@ Id Builder::makeFloat16Constant(float f16, bool specConstant)
spvutils
::
HexFloat
<
spvutils
::
FloatProxy
<
float
>>
fVal
(
f16
);
spvutils
::
HexFloat
<
spvutils
::
FloatProxy
<
float
>>
fVal
(
f16
);
spvutils
::
HexFloat
<
spvutils
::
FloatProxy
<
spvutils
::
Float16
>>
f16Val
(
0
);
spvutils
::
HexFloat
<
spvutils
::
FloatProxy
<
spvutils
::
Float16
>>
f16Val
(
0
);
fVal
.
castTo
(
f16Val
,
spvutils
::
round_direction
::
k
ToZero
);
fVal
.
castTo
(
f16Val
,
spvutils
::
kRound
ToZero
);
unsigned
value
=
f16Val
.
value
().
getAsFloat
().
get_value
();
unsigned
value
=
f16Val
.
value
().
getAsFloat
().
get_value
();
...
...
SPIRV/hex_float.h
View file @
1fabc0f6
This diff is collapsed.
Click to expand it.
StandAlone/StandAlone.cpp
View file @
1fabc0f6
...
@@ -673,11 +673,11 @@ void CompileAndLinkShaderFiles()
...
@@ -673,11 +673,11 @@ void CompileAndLinkShaderFiles()
// they are all getting linked together.)
// they are all getting linked together.)
glslang
::
TWorkItem
*
workItem
;
glslang
::
TWorkItem
*
workItem
;
while
(
Worklist
.
remove
(
workItem
))
{
while
(
Worklist
.
remove
(
workItem
))
{
ShaderCompUnit
compUnit
=
{
ShaderCompUnit
compUnit
(
FindLanguage
(
workItem
->
name
),
FindLanguage
(
workItem
->
name
),
workItem
->
name
,
workItem
->
name
,
ReadFileData
(
workItem
->
name
.
c_str
())
ReadFileData
(
workItem
->
name
.
c_str
())
}
;
)
;
if
(
!
compUnit
.
text
)
{
if
(
!
compUnit
.
text
)
{
usage
();
usage
();
...
...
glslang/Include/Common.h
View file @
1fabc0f6
...
@@ -68,6 +68,10 @@ inline long long int strtoll (const char* str, char** endptr, int base)
...
@@ -68,6 +68,10 @@ inline long long int strtoll (const char* str, char** endptr, int base)
{
{
return
_strtoi64
(
str
,
endptr
,
base
);
return
_strtoi64
(
str
,
endptr
,
base
);
}
}
inline
unsigned
long
long
int
strtoull
(
const
char
*
str
,
char
**
endptr
,
int
base
)
{
return
_strtoui64
(
str
,
endptr
,
base
);
}
inline
long
long
int
atoll
(
const
char
*
str
)
inline
long
long
int
atoll
(
const
char
*
str
)
{
{
return
strtoll
(
str
,
NULL
,
10
);
return
strtoll
(
str
,
NULL
,
10
);
...
...
glslang/MachineIndependent/ParseContextBase.cpp
View file @
1fabc0f6
...
@@ -361,7 +361,7 @@ const TFunction* TParseContextBase::selectFunction(
...
@@ -361,7 +361,7 @@ const TFunction* TParseContextBase::selectFunction(
return
viableCandidates
.
front
();
return
viableCandidates
.
front
();
// 4. find best...
// 4. find best...
auto
betterParam
=
[
&
call
,
&
better
](
const
TFunction
&
can1
,
const
TFunction
&
can2
){
auto
betterParam
=
[
&
call
,
&
better
](
const
TFunction
&
can1
,
const
TFunction
&
can2
)
->
bool
{
// is call -> can2 better than call -> can1 for any parameter
// is call -> can2 better than call -> can1 for any parameter
bool
hasBetterParam
=
false
;
bool
hasBetterParam
=
false
;
for
(
int
param
=
0
;
param
<
call
.
getParamCount
();
++
param
)
{
for
(
int
param
=
0
;
param
<
call
.
getParamCount
();
++
param
)
{
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
1fabc0f6
...
@@ -4873,7 +4873,7 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu
...
@@ -4873,7 +4873,7 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu
symbolTable
.
findFunctionNameList
(
call
.
getMangledName
(),
candidateList
,
builtIn
);
symbolTable
.
findFunctionNameList
(
call
.
getMangledName
(),
candidateList
,
builtIn
);
// can 'from' convert to 'to'?
// can 'from' convert to 'to'?
const
auto
convertible
=
[
this
](
const
TType
&
from
,
const
TType
&
to
)
{
const
auto
convertible
=
[
this
](
const
TType
&
from
,
const
TType
&
to
)
->
bool
{
if
(
from
==
to
)
if
(
from
==
to
)
return
true
;
return
true
;
if
(
from
.
isArray
()
||
to
.
isArray
()
||
!
from
.
sameElementShape
(
to
))
if
(
from
.
isArray
()
||
to
.
isArray
()
||
!
from
.
sameElementShape
(
to
))
...
@@ -4884,7 +4884,7 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu
...
@@ -4884,7 +4884,7 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu
// Is 'to2' a better conversion than 'to1'?
// Is 'to2' a better conversion than 'to1'?
// Ties should not be considered as better.
// Ties should not be considered as better.
// Assumes 'convertible' already said true.
// Assumes 'convertible' already said true.
const
auto
better
=
[](
const
TType
&
from
,
const
TType
&
to1
,
const
TType
&
to2
)
{
const
auto
better
=
[](
const
TType
&
from
,
const
TType
&
to1
,
const
TType
&
to2
)
->
bool
{
// 1. exact match
// 1. exact match
if
(
from
==
to2
)
if
(
from
==
to2
)
return
from
!=
to1
;
return
from
!=
to1
;
...
...
gtests/HexFloat.cpp
View file @
1fabc0f6
This diff is collapsed.
Click to expand it.
hlsl/hlslParseHelper.cpp
View file @
1fabc0f6
...
@@ -1330,7 +1330,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
...
@@ -1330,7 +1330,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
const
auto
getMember
=
[
&
](
bool
flatten
,
TIntermTyped
*
node
,
const
auto
getMember
=
[
&
](
bool
flatten
,
TIntermTyped
*
node
,
const
TVector
<
TVariable
*>&
memberVariables
,
int
member
,
const
TVector
<
TVariable
*>&
memberVariables
,
int
member
,
TOperator
op
,
const
TType
&
memberType
)
{
TOperator
op
,
const
TType
&
memberType
)
->
TIntermTyped
*
{
TIntermTyped
*
subTree
;
TIntermTyped
*
subTree
;
if
(
flatten
)
if
(
flatten
)
subTree
=
intermediate
.
addSymbol
(
*
memberVariables
[
member
]);
subTree
=
intermediate
.
addSymbol
(
*
memberVariables
[
member
]);
...
@@ -3037,7 +3037,7 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi
...
@@ -3037,7 +3037,7 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi
// space
// space
unsigned
int
setNumber
;
unsigned
int
setNumber
;
const
auto
crackSpace
=
[
&
]()
{
const
auto
crackSpace
=
[
&
]()
->
bool
{
const
int
spaceLen
=
5
;
const
int
spaceLen
=
5
;
if
(
spaceDesc
->
size
()
<
spaceLen
+
1
)
if
(
spaceDesc
->
size
()
<
spaceLen
+
1
)
return
false
;
return
false
;
...
@@ -4233,7 +4233,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
...
@@ -4233,7 +4233,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
symbolTable
.
findFunctionNameList
(
call
.
getMangledName
(),
candidateList
,
builtIn
);
symbolTable
.
findFunctionNameList
(
call
.
getMangledName
(),
candidateList
,
builtIn
);
// can 'from' convert to 'to'?
// can 'from' convert to 'to'?
const
auto
convertible
=
[
this
](
const
TType
&
from
,
const
TType
&
to
)
{
const
auto
convertible
=
[
this
](
const
TType
&
from
,
const
TType
&
to
)
->
bool
{
if
(
from
==
to
)
if
(
from
==
to
)
return
true
;
return
true
;
...
@@ -4260,7 +4260,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
...
@@ -4260,7 +4260,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
// Is 'to2' a better conversion than 'to1'?
// Is 'to2' a better conversion than 'to1'?
// Ties should not be considered as better.
// Ties should not be considered as better.
// Assumes 'convertible' already said true.
// Assumes 'convertible' already said true.
const
auto
better
=
[](
const
TType
&
from
,
const
TType
&
to1
,
const
TType
&
to2
)
{
const
auto
better
=
[](
const
TType
&
from
,
const
TType
&
to1
,
const
TType
&
to2
)
->
bool
{
// exact match is always better than mismatch
// exact match is always better than mismatch
if
(
from
==
to2
)
if
(
from
==
to2
)
return
from
!=
to1
;
return
from
!=
to1
;
...
@@ -4287,7 +4287,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
...
@@ -4287,7 +4287,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
// - 32 vs. 64 bit (or width in general)
// - 32 vs. 64 bit (or width in general)
// - bool vs. non bool
// - bool vs. non bool
// - signed vs. not signed
// - signed vs. not signed
const
auto
linearize
=
[](
const
TBasicType
&
basicType
)
{
const
auto
linearize
=
[](
const
TBasicType
&
basicType
)
->
int
{
switch
(
basicType
)
{
switch
(
basicType
)
{
case
EbtBool
:
return
1
;
case
EbtBool
:
return
1
;
case
EbtInt
:
return
10
;
case
EbtInt
:
return
10
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment