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
eebb2051
Commit
eebb2051
authored
Jul 14, 2015
by
John Kessenich
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11 from baldurk/size-t-int-warning-fixes
Fix warnings compiling on x64 with size_t to int casts
parents
3a194f7b
d76692df
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+3
-3
SpvBuilder.cpp
SPIRV/SpvBuilder.cpp
+2
-2
Scan.h
glslang/MachineIndependent/Scan.h
+1
-1
No files found.
SPIRV/GlslangToSpv.cpp
View file @
eebb2051
...
@@ -1099,9 +1099,9 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
...
@@ -1099,9 +1099,9 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
for
(
glslang
::
TIntermSequence
::
iterator
c
=
sequence
.
begin
();
c
!=
sequence
.
end
();
++
c
)
{
for
(
glslang
::
TIntermSequence
::
iterator
c
=
sequence
.
begin
();
c
!=
sequence
.
end
();
++
c
)
{
TIntermNode
*
child
=
*
c
;
TIntermNode
*
child
=
*
c
;
if
(
child
->
getAsBranchNode
()
&&
child
->
getAsBranchNode
()
->
getFlowOp
()
==
glslang
::
EOpDefault
)
if
(
child
->
getAsBranchNode
()
&&
child
->
getAsBranchNode
()
->
getFlowOp
()
==
glslang
::
EOpDefault
)
defaultSegment
=
codeSegments
.
size
();
defaultSegment
=
(
int
)
codeSegments
.
size
();
else
if
(
child
->
getAsBranchNode
()
&&
child
->
getAsBranchNode
()
->
getFlowOp
()
==
glslang
::
EOpCase
)
{
else
if
(
child
->
getAsBranchNode
()
&&
child
->
getAsBranchNode
()
->
getFlowOp
()
==
glslang
::
EOpCase
)
{
valueIndexToSegment
[
caseValues
.
size
()]
=
codeSegments
.
size
();
valueIndexToSegment
[
caseValues
.
size
()]
=
(
int
)
codeSegments
.
size
();
caseValues
.
push_back
(
child
->
getAsBranchNode
()
->
getExpression
()
->
getAsConstantUnion
()
->
getConstArray
()[
0
].
getIConst
());
caseValues
.
push_back
(
child
->
getAsBranchNode
()
->
getExpression
()
->
getAsConstantUnion
()
->
getConstArray
()[
0
].
getIConst
());
}
else
}
else
codeSegments
.
push_back
(
child
);
codeSegments
.
push_back
(
child
);
...
@@ -1115,7 +1115,7 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
...
@@ -1115,7 +1115,7 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
// make the switch statement
// make the switch statement
std
::
vector
<
spv
::
Block
*>
segmentBlocks
;
// returned, as the blocks allocated in the call
std
::
vector
<
spv
::
Block
*>
segmentBlocks
;
// returned, as the blocks allocated in the call
builder
.
makeSwitch
(
selector
,
codeSegments
.
size
(),
caseValues
,
valueIndexToSegment
,
defaultSegment
,
segmentBlocks
);
builder
.
makeSwitch
(
selector
,
(
int
)
codeSegments
.
size
(),
caseValues
,
valueIndexToSegment
,
defaultSegment
,
segmentBlocks
);
// emit all the code in the segments
// emit all the code in the segments
breakForLoop
.
push
(
false
);
breakForLoop
.
push
(
false
);
...
...
SPIRV/SpvBuilder.cpp
View file @
eebb2051
...
@@ -704,7 +704,7 @@ void Builder::closeMain()
...
@@ -704,7 +704,7 @@ void Builder::closeMain()
Function
*
Builder
::
makeFunctionEntry
(
Id
returnType
,
const
char
*
name
,
std
::
vector
<
Id
>&
paramTypes
,
Block
**
entry
)
Function
*
Builder
::
makeFunctionEntry
(
Id
returnType
,
const
char
*
name
,
std
::
vector
<
Id
>&
paramTypes
,
Block
**
entry
)
{
{
Id
typeId
=
makeFunctionType
(
returnType
,
paramTypes
);
Id
typeId
=
makeFunctionType
(
returnType
,
paramTypes
);
Id
firstParamId
=
paramTypes
.
size
()
==
0
?
0
:
getUniqueIds
(
paramTypes
.
size
());
Id
firstParamId
=
paramTypes
.
size
()
==
0
?
0
:
getUniqueIds
(
(
int
)
paramTypes
.
size
());
Function
*
function
=
new
Function
(
getUniqueId
(),
returnType
,
typeId
,
firstParamId
,
module
);
Function
*
function
=
new
Function
(
getUniqueId
(),
returnType
,
typeId
,
firstParamId
,
module
);
if
(
entry
)
{
if
(
entry
)
{
...
@@ -1943,7 +1943,7 @@ Id Builder::accessChainLoad(Decoration /*precision*/)
...
@@ -1943,7 +1943,7 @@ Id Builder::accessChainLoad(Decoration /*precision*/)
// static swizzle
// static swizzle
Id
resultType
=
componentType
;
Id
resultType
=
componentType
;
if
(
accessChain
.
swizzle
.
size
()
>
1
)
if
(
accessChain
.
swizzle
.
size
()
>
1
)
resultType
=
makeVectorType
(
componentType
,
accessChain
.
swizzle
.
size
());
resultType
=
makeVectorType
(
componentType
,
(
int
)
accessChain
.
swizzle
.
size
());
id
=
createRvalueSwizzle
(
resultType
,
id
,
accessChain
.
swizzle
);
id
=
createRvalueSwizzle
(
resultType
,
id
,
accessChain
.
swizzle
);
}
}
...
...
glslang/MachineIndependent/Scan.h
View file @
eebb2051
...
@@ -106,7 +106,7 @@ public:
...
@@ -106,7 +106,7 @@ public:
}
}
--
ch
;
--
ch
;
}
}
loc
[
currentSource
].
column
=
currentChar
-
ch
;
loc
[
currentSource
].
column
=
(
int
)(
currentChar
-
ch
)
;
}
}
}
else
{
}
else
{
do
{
do
{
...
...
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