Compile-time check on sampler binding size, link-time merging and checking of bindings.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24218 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-11-27 02:41:52 +00:00
parent 474b84bdcf
commit 1fbaa35ce7
5 changed files with 35 additions and 5 deletions

View File

@@ -71,3 +71,6 @@ layout(binding = 1) in inblock { int aoeua; }; // ERROR
layout(binding = 100000) uniform anonblock2 { int aooeu; } ;
layout(binding = 4) uniform sampler2D sampb1;
layout(binding = 5) uniform sampler2D sampb2[10];
layout(binding = 32) uniform sampler2D sampb3; // ERROR, binding too big
layout(binding = 31) uniform sampler2D sampb4;
layout(binding = 31) uniform sampler2D sampb5[2]; // ERROR, binding too big

View File

@@ -25,7 +25,9 @@ ERROR: 0:66: 'binding' : cannot declare a default, include a type or full declar
ERROR: 0:69: 'location' : cannot declare a default, use a full declaration
ERROR: 0:70: 'binding' : requires uniform or buffer storage qualifier
ERROR: 0:71: 'binding' : binding is too large
ERROR: 24 compilation errors. No code generated.
ERROR: 0:74: 'binding' : sampler binding not less than gl_MaxCombinedTextureImageUnits
ERROR: 0:76: 'binding' : sampler binding not less than gl_MaxCombinedTextureImageUnits (using array)
ERROR: 26 compilation errors. No code generated.
ERROR: node is still EOpNull!
@@ -124,6 +126,9 @@ ERROR: node is still EOpNull!
0:? '__anon__2' (layout(column_major shared ) uniform block{aooeu})
0:? 'sampb1' (layout(binding=4 ) uniform sampler2D)
0:? 'sampb2' (layout(binding=5 ) uniform 10-element array of sampler2D)
0:? 'sampb3' (layout(binding=32 ) uniform sampler2D)
0:? 'sampb4' (layout(binding=31 ) uniform sampler2D)
0:? 'sampb5' (layout(binding=31 ) uniform 2-element array of sampler2D)
0:? 'gl_VertexID' (gl_VertexId int)
0:? 'gl_InstanceID' (gl_InstanceId int)