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:
@@ -241,3 +241,23 @@ void partitioned_works(vec4 f4)
|
||||
subgroupPartitionedExclusiveXorNV(ballot, parti);
|
||||
}
|
||||
|
||||
// tests for NV_shader_sm_builtins
|
||||
void sm_builtins_err()
|
||||
{
|
||||
gl_WarpsPerSMNV; // ERROR, no extension
|
||||
gl_SMCountNV; // ERROR, no extension
|
||||
gl_WarpIDNV; // ERROR, no extension
|
||||
gl_SMIDNV; // ERROR, no extension
|
||||
}
|
||||
|
||||
#ifdef GL_NV_shader_sm_builtins
|
||||
#extension GL_NV_shader_sm_builtins : enable
|
||||
#endif
|
||||
|
||||
void sm_builtins()
|
||||
{
|
||||
gl_WarpsPerSMNV;
|
||||
gl_SMCountNV;
|
||||
gl_WarpIDNV;
|
||||
gl_SMIDNV;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user