Add support for SPV_KHR_shader_clock
This commit is contained in:
parent
8aa9a7bb8f
commit
91fb0091a2
8 changed files with 55 additions and 0 deletions
|
|
@ -5090,6 +5090,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
// GL_ARB_shader_clock & GL_EXT_shader_realtime_clock
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
commonBuiltins.append(
|
||||
"uvec2 clock2x32ARB();"
|
||||
"uint64_t clockARB();"
|
||||
"uvec2 clockRealtime2x32EXT();"
|
||||
"uint64_t clockRealtimeEXT();"
|
||||
"\n");
|
||||
}
|
||||
|
||||
// GL_AMD_shader_fragment_mask
|
||||
if (profile != EEsProfile && version >= 450 && spvVersion.vulkan > 0) {
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
|
|
@ -8458,6 +8468,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
|
||||
symbolTable.setVariableExtensions("gl_FragDepthEXT", 1, &E_GL_EXT_frag_depth);
|
||||
|
||||
symbolTable.setFunctionExtensions("clockARB", 1, &E_GL_ARB_shader_clock);
|
||||
symbolTable.setFunctionExtensions("clock2x32ARB", 1, &E_GL_ARB_shader_clock);
|
||||
|
||||
symbolTable.setFunctionExtensions("clockRealtimeEXT", 1, &E_GL_EXT_shader_realtime_clock);
|
||||
symbolTable.setFunctionExtensions("clockRealtime2x32EXT", 1, &E_GL_EXT_shader_realtime_clock);
|
||||
|
||||
if (profile == EEsProfile && version < 320) {
|
||||
symbolTable.setVariableExtensions("gl_PrimitiveID", Num_AEP_geometry_shader, AEP_geometry_shader);
|
||||
symbolTable.setVariableExtensions("gl_Layer", Num_AEP_geometry_shader, AEP_geometry_shader);
|
||||
|
|
@ -9272,6 +9288,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement);
|
||||
symbolTable.relateToOperator("atomicCounter", EOpAtomicCounter);
|
||||
|
||||
symbolTable.relateToOperator("clockARB", EOpReadClockSubgroupKHR);
|
||||
symbolTable.relateToOperator("clock2x32ARB", EOpReadClockSubgroupKHR);
|
||||
|
||||
symbolTable.relateToOperator("clockRealtimeEXT", EOpReadClockDeviceKHR);
|
||||
symbolTable.relateToOperator("clockRealtime2x32EXT", EOpReadClockDeviceKHR);
|
||||
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicCounterAdd);
|
||||
symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicCounterSubtract);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue