Add support for GL_NV_shader_sm_builtins

Including spirv and AST tests

Also increase size of TBuiltInVariable bitfields since we've now exceeded 127
and add a static_assert to make this easier to find next time it happens!
This commit is contained in:
Daniel Koch 2019-06-04 08:43:32 -04:00
parent 92b5c9ee91
commit 2cb2f197a7
43 changed files with 825 additions and 20 deletions

View file

@ -85,7 +85,11 @@ ERROR: 0:96: 'subgroupPartitionedExclusiveMaxNV' : required extension not reques
ERROR: 0:97: 'subgroupPartitionedExclusiveAndNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:98: 'subgroupPartitionedExclusiveOrNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:99: 'subgroupPartitionedExclusiveXorNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 86 compilation errors. No code generated.
ERROR: 0:247: 'gl_WarpsPerSMNV' : required extension not requested: GL_NV_shader_sm_builtins
ERROR: 0:248: 'gl_SMCountNV' : required extension not requested: GL_NV_shader_sm_builtins
ERROR: 0:249: 'gl_WarpIDNV' : required extension not requested: GL_NV_shader_sm_builtins
ERROR: 0:250: 'gl_SMIDNV' : required extension not requested: GL_NV_shader_sm_builtins
ERROR: 90 compilation errors. No code generated.
Shader version: 460
@ -98,6 +102,7 @@ Requested GL_KHR_shader_subgroup_shuffle
Requested GL_KHR_shader_subgroup_shuffle_relative
Requested GL_KHR_shader_subgroup_vote
Requested GL_NV_ray_tracing
Requested GL_NV_shader_sm_builtins
Requested GL_NV_shader_subgroup_partitioned
ERROR: node is still EOpNull!
0:4 Function Definition: undeclared_errors(vf4; ( global 4-component vector of float)
@ -614,6 +619,20 @@ ERROR: node is still EOpNull!
0:241 subgroupPartitionedExclusiveXorNV ( global 4-component vector of uint)
0:241 'ballot' ( temp 4-component vector of uint)
0:241 'parti' ( temp 4-component vector of uint)
0:245 Function Definition: sm_builtins_err( ( global void)
0:245 Function Parameters:
0:247 Sequence
0:247 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
0:248 'gl_SMCountNV' ( in uint SMCountNV)
0:249 'gl_WarpIDNV' ( in uint WarpIDNV)
0:250 'gl_SMIDNV' ( in uint SMIDNV)
0:257 Function Definition: sm_builtins( ( global void)
0:257 Function Parameters:
0:259 Sequence
0:259 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
0:260 'gl_SMCountNV' ( in uint SMCountNV)
0:261 'gl_WarpIDNV' ( in uint WarpIDNV)
0:262 'gl_SMIDNV' ( in uint SMIDNV)
0:? Linker Objects
0:? 'data0' (layout( location=0) callableDataNV 4-component vector of float)
0:? 'anon@0' (layout( location=1) callableDataInNV block{ callableDataInNV uint data1})
@ -632,6 +651,7 @@ Requested GL_KHR_shader_subgroup_shuffle
Requested GL_KHR_shader_subgroup_shuffle_relative
Requested GL_KHR_shader_subgroup_vote
Requested GL_NV_ray_tracing
Requested GL_NV_shader_sm_builtins
Requested GL_NV_shader_subgroup_partitioned
ERROR: node is still EOpNull!
0:109 Function Definition: main( ( global void)