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
ff4f04dd
Commit
ff4f04dd
authored
Sep 21, 2015
by
John Kessenich
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #75 from google/fix-vs2013-debug
SPV non-determinism: Fixed subtle issue that causes tests to fail in VS2013 in some configs.
parents
f82c6614
2d83ab2f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
SpvBuilder.cpp
SPIRV/SpvBuilder.cpp
+13
-4
SpvBuilder.h
SPIRV/SpvBuilder.h
+3
-2
No files found.
SPIRV/SpvBuilder.cpp
View file @
ff4f04dd
...
...
@@ -2304,9 +2304,18 @@ Builder::Loop::Loop(Builder& builder, bool testFirstArg)
merge
(
new
Block
(
builder
.
getUniqueId
(),
*
function
)),
body
(
new
Block
(
builder
.
getUniqueId
(),
*
function
)),
testFirst
(
testFirstArg
),
isFirstIteration
(
testFirst
?
nullptr
:
new
Instruction
(
builder
.
getUniqueId
(),
builder
.
makeBoolType
(),
OpPhi
))
{}
isFirstIteration
(
nullptr
)
{
if
(
!
testFirst
)
{
// You may be tempted to rewrite this as
// new Instruction(builder.getUniqueId(), builder.makeBoolType(), OpPhi);
// This will cause subtle test failures because builder.getUniqueId(),
// and builder.makeBoolType() can then get run in a compiler-specific
// order making tests fail for certain configurations.
Id
instructionId
=
builder
.
getUniqueId
();
isFirstIteration
=
new
Instruction
(
instructionId
,
builder
.
makeBoolType
(),
OpPhi
);
}
}
};
// end spv namespace
SPIRV/SpvBuilder.h
View file @
ff4f04dd
...
...
@@ -564,8 +564,9 @@ protected:
const
bool
testFirst
;
// When the test executes after the body, this is defined as the phi
// instruction that tells us whether we are on the first iteration of
// the loop. Otherwise this is null.
Instruction
*
const
isFirstIteration
;
// the loop. Otherwise this is null. This is non-const because
// it has to be initialized outside of the initializer-list.
Instruction
*
isFirstIteration
;
};
// Our loop stack.
...
...
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