-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from tfoleyNV/glslang-bug-workaround
Work around glslang issue 988
- Loading branch information
Showing
4 changed files
with
192 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#version 450 | ||
//TEST:COMPARE_GLSL: | ||
|
||
// Test workaround for glslang issue #988 | ||
// (https://github.com/KhronosGroup/glslang/issues/988) | ||
|
||
|
||
#if defined(__SLANG__) | ||
|
||
|
||
__import glslang_bug_988_workaround; | ||
|
||
uniform U | ||
{ | ||
Foo foo; | ||
}; | ||
|
||
vec4 doIt(Foo foo) | ||
{ | ||
return foo.bar; | ||
} | ||
|
||
layout(location = 0) | ||
out vec4 result; | ||
|
||
void main() | ||
{ | ||
result = doIt(foo); | ||
} | ||
|
||
#else | ||
|
||
struct Foo | ||
{ | ||
vec4 bar; | ||
}; | ||
|
||
layout(binding = 0) | ||
uniform U | ||
{ | ||
Foo foo; | ||
}; | ||
|
||
vec4 doIt(Foo foo) | ||
{ | ||
return foo.bar; | ||
} | ||
|
||
layout(location = 0) | ||
out vec4 result; | ||
|
||
void main() | ||
{ | ||
Foo SLANG_tmp_0 = foo; | ||
result = doIt(SLANG_tmp_0); | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//TEST_IGNORE_FILE: | ||
|
||
struct Foo | ||
{ | ||
float4 bar; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters