forked from KhronosGroup/glslang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When location aliasing, the aliases sharing the location must have the same underlying numerical type and bit width (floating-point or integer, 32-bit versus 64-bit, etc.) and the same auxiliary storage and interpolation qualification. This adds checks for the "patch" and "sample" qualifiers, and also relaxes the checks when the signedness of integer types differs.
- Loading branch information
Showing
9 changed files
with
201 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
ps_sample.frag | ||
ERROR: 0:5: 'location' : the aliases sharing the location 1 must be the same basic type and interpolation qualification | ||
ERROR: 1 compilation errors. No code generated. | ||
|
||
|
||
Shader version: 430 | ||
Requested GL_ARB_enhanced_layouts | ||
ERROR: node is still EOpNull! | ||
0:10 Function Definition: main( ( global void) | ||
0:10 Function Parameters: | ||
0:12 Sequence | ||
0:12 Sequence | ||
0:12 move second child to first child ( temp 4-component vector of float) | ||
0:12 'result' ( temp 4-component vector of float) | ||
0:12 'gs_fs' ( smooth in 4-component vector of float) | ||
0:16 move second child to first child ( temp 4-component vector of float) | ||
0:16 'fs_out' ( out 4-component vector of float) | ||
0:16 'result' ( temp 4-component vector of float) | ||
0:? Linker Objects | ||
0:? 'gohan' (layout( location=1 component=0) flat in uint) | ||
0:? 'goten' (layout( location=1 component=2) flat sample in 2-component vector of uint) | ||
0:? 'gs_fs' ( smooth in 4-component vector of float) | ||
0:? 'fs_out' ( out 4-component vector of float) | ||
|
||
|
||
Linked fragment stage: | ||
|
||
|
||
Shader version: 430 | ||
Requested GL_ARB_enhanced_layouts | ||
ERROR: node is still EOpNull! | ||
0:10 Function Definition: main( ( global void) | ||
0:10 Function Parameters: | ||
0:12 Sequence | ||
0:12 Sequence | ||
0:12 move second child to first child ( temp 4-component vector of float) | ||
0:12 'result' ( temp 4-component vector of float) | ||
0:12 'gs_fs' ( smooth in 4-component vector of float) | ||
0:16 move second child to first child ( temp 4-component vector of float) | ||
0:16 'fs_out' ( out 4-component vector of float) | ||
0:16 'result' ( temp 4-component vector of float) | ||
0:? Linker Objects | ||
0:? 'gohan' (layout( location=1 component=0) flat in uint) | ||
0:? 'goten' (layout( location=1 component=2) flat sample in 2-component vector of uint) | ||
0:? 'gs_fs' ( smooth in 4-component vector of float) | ||
0:? 'fs_out' ( out 4-component vector of float) | ||
|
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,21 @@ | ||
ps_uint_int.frag | ||
Shader version: 450 | ||
0:? Sequence | ||
0:6 Function Definition: main( ( global void) | ||
0:6 Function Parameters: | ||
0:? Linker Objects | ||
0:? 'u' (layout( location=0 component=0) flat in uint) | ||
0:? 'i' (layout( location=0 component=1) flat in int) | ||
|
||
|
||
Linked fragment stage: | ||
|
||
|
||
Shader version: 450 | ||
0:? Sequence | ||
0:6 Function Definition: main( ( global void) | ||
0:6 Function Parameters: | ||
0:? Linker Objects | ||
0:? 'u' (layout( location=0 component=0) flat in uint) | ||
0:? 'i' (layout( location=0 component=1) flat in int) | ||
|
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,61 @@ | ||
tes_patch.tese | ||
ERROR: 0:7: 'location' : the aliases sharing the location 1 must be the same basic type and interpolation qualification | ||
ERROR: 1 compilation errors. No code generated. | ||
|
||
|
||
Shader version: 430 | ||
Requested GL_ARB_enhanced_layouts | ||
input primitive = isolines | ||
vertex spacing = none | ||
triangle order = none | ||
using point mode | ||
ERROR: node is still EOpNull! | ||
0:12 Function Definition: main( ( global void) | ||
0:12 Function Parameters: | ||
0:14 Sequence | ||
0:14 Sequence | ||
0:14 move second child to first child ( temp 4-component vector of float) | ||
0:14 'result' ( temp 4-component vector of float) | ||
0:14 direct index ( temp 4-component vector of float) | ||
0:14 'tcs_tes' ( in 32-element array of 4-component vector of float) | ||
0:14 Constant: | ||
0:14 0 (const int) | ||
0:18 add second child into first child ( temp 4-component vector of float) | ||
0:18 'tes_gs' ( out 4-component vector of float) | ||
0:18 'result' ( temp 4-component vector of float) | ||
0:? Linker Objects | ||
0:? 'gohan' (layout( location=1 component=0) in 32-element array of 2-component vector of float) | ||
0:? 'goten' (layout( location=1 component=2) patch in 2-component vector of float) | ||
0:? 'tcs_tes' ( in 32-element array of 4-component vector of float) | ||
0:? 'tes_gs' ( out 4-component vector of float) | ||
|
||
|
||
Linked tessellation evaluation stage: | ||
|
||
|
||
Shader version: 430 | ||
Requested GL_ARB_enhanced_layouts | ||
input primitive = isolines | ||
vertex spacing = equal_spacing | ||
triangle order = ccw | ||
using point mode | ||
ERROR: node is still EOpNull! | ||
0:12 Function Definition: main( ( global void) | ||
0:12 Function Parameters: | ||
0:14 Sequence | ||
0:14 Sequence | ||
0:14 move second child to first child ( temp 4-component vector of float) | ||
0:14 'result' ( temp 4-component vector of float) | ||
0:14 direct index ( temp 4-component vector of float) | ||
0:14 'tcs_tes' ( in 32-element array of 4-component vector of float) | ||
0:14 Constant: | ||
0:14 0 (const int) | ||
0:18 add second child into first child ( temp 4-component vector of float) | ||
0:18 'tes_gs' ( out 4-component vector of float) | ||
0:18 'result' ( temp 4-component vector of float) | ||
0:? Linker Objects | ||
0:? 'gohan' (layout( location=1 component=0) in 32-element array of 2-component vector of float) | ||
0:? 'goten' (layout( location=1 component=2) patch in 2-component vector of float) | ||
0:? 'tcs_tes' ( in 32-element array of 4-component vector of float) | ||
0:? 'tes_gs' ( out 4-component vector of float) | ||
|
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,17 @@ | ||
#version 430 core | ||
#extension GL_ARB_enhanced_layouts : require | ||
|
||
layout (location = 1, component = 0) flat in uint gohan; | ||
layout (location = 1, component = 2) sample flat in uvec2 goten; | ||
|
||
in vec4 gs_fs; | ||
out vec4 fs_out; | ||
|
||
void main() | ||
{ | ||
vec4 result = gs_fs; | ||
|
||
|
||
|
||
fs_out = result; | ||
} |
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,7 @@ | ||
#version 450 | ||
|
||
layout(location=0, component=0) flat in uint u; | ||
layout(location=0, component=1) flat in int i; | ||
|
||
void main() { | ||
} |
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,19 @@ | ||
#version 430 core | ||
#extension GL_ARB_enhanced_layouts : require | ||
|
||
layout(isolines, point_mode) in; | ||
|
||
layout (location = 1, component = 0) in vec2 gohan[]; | ||
layout (location = 1, component = 2) patch in vec2 goten; | ||
|
||
in vec4 tcs_tes[]; | ||
out vec4 tes_gs; | ||
|
||
void main() | ||
{ | ||
vec4 result = tcs_tes[0]; | ||
|
||
|
||
|
||
tes_gs += result; | ||
} |
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
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