GL_EXT_ray_tracing_position_fetch

This commit is contained in:
Eric Werness 2022-06-08 17:29:38 -07:00 committed by arcady-lunarg
parent d6e9d3bb4e
commit 9d8c7b75c9
18 changed files with 461 additions and 194 deletions

View File

@ -54,5 +54,6 @@ static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_w
static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow"; static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow";
static const char* const E_SPV_KHR_fragment_shader_barycentric = "SPV_KHR_fragment_shader_barycentric"; static const char* const E_SPV_KHR_fragment_shader_barycentric = "SPV_KHR_fragment_shader_barycentric";
static const char* const E_SPV_AMD_shader_early_and_late_fragment_tests = "SPV_AMD_shader_early_and_late_fragment_tests"; static const char* const E_SPV_AMD_shader_early_and_late_fragment_tests = "SPV_AMD_shader_early_and_late_fragment_tests";
static const char* const E_SPV_KHR_ray_tracing_position_fetch = "SPV_KHR_ray_tracing_position_fetch";
#endif // #ifndef GLSLextKHR_H #endif // #ifndef GLSLextKHR_H

48
SPIRV/GlslangToSpv.cpp Normal file → Executable file
View File

@ -1010,6 +1010,8 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
return spv::BuiltInRayTmaxKHR; return spv::BuiltInRayTmaxKHR;
case glslang::EbvCullMask: case glslang::EbvCullMask:
return spv::BuiltInCullMaskKHR; return spv::BuiltInCullMaskKHR;
case glslang::EbvPositionFetch:
return spv::BuiltInHitTriangleVertexPositionsKHR;
case glslang::EbvInstanceCustomIndex: case glslang::EbvInstanceCustomIndex:
return spv::BuiltInInstanceCustomIndexKHR; return spv::BuiltInInstanceCustomIndexKHR;
case glslang::EbvHitT: case glslang::EbvHitT:
@ -1857,13 +1859,16 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
builder.addCapability(spv::CapabilityRayTracingNV); builder.addCapability(spv::CapabilityRayTracingNV);
builder.addExtension("SPV_NV_ray_tracing"); builder.addExtension("SPV_NV_ray_tracing");
} }
if (glslangIntermediate->getStage() != EShLangRayGen && glslangIntermediate->getStage() != EShLangCallable) if (glslangIntermediate->getStage() != EShLangRayGen && glslangIntermediate->getStage() != EShLangCallable) {
{ if (extensions.find("GL_EXT_ray_cull_mask") != extensions.end()) {
if (extensions.find("GL_EXT_ray_cull_mask") != extensions.end()) { builder.addCapability(spv::CapabilityRayCullMaskKHR);
builder.addCapability(spv::CapabilityRayCullMaskKHR); builder.addExtension("SPV_KHR_ray_cull_mask");
builder.addExtension("SPV_KHR_ray_cull_mask"); }
} if (extensions.find("GL_EXT_ray_tracing_position_fetch") != extensions.end()) {
} builder.addCapability(spv::CapabilityRayTracingPositionFetchKHR);
builder.addExtension("SPV_KHR_ray_tracing_position_fetch");
}
}
break; break;
} }
case EShLangTask: case EShLangTask:
@ -3301,6 +3306,11 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder); builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder);
builder.addCapability(spv::CapabilityShaderInvocationReorderNV); builder.addCapability(spv::CapabilityShaderInvocationReorderNV);
break; break;
case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT:
builder.addExtension(spv::E_SPV_KHR_ray_tracing_position_fetch);
builder.addCapability(spv::CapabilityRayQueryPositionFetchKHR);
noReturnValue = true;
break;
#endif #endif
case glslang::EOpDebugPrintf: case glslang::EOpDebugPrintf:
@ -3479,6 +3489,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
if (arg == 0 && glslangOperands.size() != 2) if (arg == 0 && glslangOperands.size() != 2)
lvalue = true; lvalue = true;
break; break;
case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT:
if (arg == 0 || arg == 2)
lvalue = true;
break;
#endif #endif
default: default:
break; break;
@ -3571,7 +3585,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayDirection || glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayDirection ||
glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayOrigin || glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayOrigin ||
glslangOp == glslang::EOpRayQueryGetIntersectionObjectToWorld || glslangOp == glslang::EOpRayQueryGetIntersectionObjectToWorld ||
glslangOp == glslang::EOpRayQueryGetIntersectionWorldToObject glslangOp == glslang::EOpRayQueryGetIntersectionWorldToObject ||
glslangOp == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT
)) { )) {
bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst(); bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst();
operands.push_back(builder.makeIntConstant(cond ? 1 : 0)); operands.push_back(builder.makeIntConstant(cond ? 1 : 0));
@ -3637,6 +3652,19 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
builder.createNoResultOp(spv::OpCooperativeMatrixStoreNV, idImmOps); builder.createNoResultOp(spv::OpCooperativeMatrixStoreNV, idImmOps);
result = 0; result = 0;
} else if (node->getOp() == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT) {
std::vector<spv::IdImmediate> idImmOps;
idImmOps.push_back(spv::IdImmediate(true, operands[0])); // q
idImmOps.push_back(spv::IdImmediate(true, operands[1])); // committed
spv::Id typeId = builder.makeArrayType(builder.makeVectorType(builder.makeFloatType(32), 3),
builder.makeUintConstant(3), 0);
// do the op
spv::Id result = builder.createOp(spv::OpRayQueryGetIntersectionTriangleVertexPositionsKHR, typeId, idImmOps);
// store the result to the pointer (out param 'm')
builder.createStore(result, operands[2]);
result = 0;
} else } else
#endif #endif
if (atomic) { if (atomic) {
@ -5561,6 +5589,10 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
if (i == 7) if (i == 7)
lvalue = true; lvalue = true;
break; break;
case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT:
if (i == 2)
lvalue = true;
break;
default: default:
break; break;
} }

8
SPIRV/doc.cpp Normal file → Executable file
View File

@ -404,6 +404,7 @@ const char* BuiltInString(int builtIn)
case BuiltInRayTminKHR: return "RayTminKHR"; case BuiltInRayTminKHR: return "RayTminKHR";
case BuiltInRayTmaxKHR: return "RayTmaxKHR"; case BuiltInRayTmaxKHR: return "RayTmaxKHR";
case BuiltInCullMaskKHR: return "CullMaskKHR"; case BuiltInCullMaskKHR: return "CullMaskKHR";
case BuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR";
case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR";
case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR"; case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR";
case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR"; case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR";
@ -950,6 +951,8 @@ const char* CapabilityString(int info)
case CapabilityRayQueryKHR: return "RayQueryKHR"; case CapabilityRayQueryKHR: return "RayQueryKHR";
case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR";
case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR";
case CapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR";
case CapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR";
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR"; case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR";
@ -1452,6 +1455,7 @@ const char* OpcodeString(int op)
case OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR"; case OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR";
case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR"; case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR";
case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR"; case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR";
case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR";
case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV";
case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV";
@ -3025,6 +3029,10 @@ void Parameterize()
InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'"); InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'");
InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true); InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true);
InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'RayQuery'");
InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'Committed'");
InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true);
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'");
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'"); InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'");

View File

@ -1,19 +1,19 @@
// Copyright (c) 2014-2020 The Khronos Group Inc. // Copyright (c) 2014-2020 The Khronos Group Inc.
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"), // of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation // to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense, // the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the // and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions: // Materials are furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in // The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials. // all copies or substantial portions of the Materials.
// //
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND // STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ // HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
// //
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@ -26,8 +26,8 @@
// the Binary Section of the SPIR-V specification. // the Binary Section of the SPIR-V specification.
// Enumeration tokens for SPIR-V, in various styles: // Enumeration tokens for SPIR-V, in various styles:
// C, C++, C++11, JSON, Lua, Python, C#, D // C, C++, C++11, JSON, Lua, Python, C#, D, Beef
// //
// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL // - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
@ -36,7 +36,9 @@
// - C# will use enum classes in the Specification class located in the "Spv" namespace, // - C# will use enum classes in the Specification class located in the "Spv" namespace,
// e.g.: Spv.Specification.SourceLanguage.GLSL // e.g.: Spv.Specification.SourceLanguage.GLSL
// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL // - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL
// // - Beef will use enum classes in the Specification class located in the "Spv" namespace,
// e.g.: Spv.Specification.SourceLanguage.GLSL
//
// Some tokens act like mask values, which can be OR'd together, // Some tokens act like mask values, which can be OR'd together,
// while others are mutually exclusive. The mask-like ones have // while others are mutually exclusive. The mask-like ones have
// "Mask" in their name, and a parallel enum that has the shift // "Mask" in their name, and a parallel enum that has the shift
@ -66,6 +68,7 @@ enum SourceLanguage {
SourceLanguageOpenCL_CPP = 4, SourceLanguageOpenCL_CPP = 4,
SourceLanguageHLSL = 5, SourceLanguageHLSL = 5,
SourceLanguageCPP_for_OpenCL = 6, SourceLanguageCPP_for_OpenCL = 6,
SourceLanguageSYCL = 7,
SourceLanguageMax = 0x7fffffff, SourceLanguageMax = 0x7fffffff,
}; };
@ -192,6 +195,8 @@ enum ExecutionMode {
ExecutionModeNoGlobalOffsetINTEL = 5895, ExecutionModeNoGlobalOffsetINTEL = 5895,
ExecutionModeNumSIMDWorkitemsINTEL = 5896, ExecutionModeNumSIMDWorkitemsINTEL = 5896,
ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903, ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903,
ExecutionModeStreamingInterfaceINTEL = 6154,
ExecutionModeNamedBarrierCountINTEL = 6417,
ExecutionModeMax = 0x7fffffff, ExecutionModeMax = 0x7fffffff,
}; };
@ -449,6 +454,7 @@ enum FunctionParameterAttribute {
FunctionParameterAttributeNoCapture = 5, FunctionParameterAttributeNoCapture = 5,
FunctionParameterAttributeNoWrite = 6, FunctionParameterAttributeNoWrite = 6,
FunctionParameterAttributeNoReadWrite = 7, FunctionParameterAttributeNoReadWrite = 7,
FunctionParameterAttributeRuntimeAlignedINTEL = 5940,
FunctionParameterAttributeMax = 0x7fffffff, FunctionParameterAttributeMax = 0x7fffffff,
}; };
@ -558,12 +564,27 @@ enum Decoration {
DecorationPrefetchINTEL = 5902, DecorationPrefetchINTEL = 5902,
DecorationStallEnableINTEL = 5905, DecorationStallEnableINTEL = 5905,
DecorationFuseLoopsInFunctionINTEL = 5907, DecorationFuseLoopsInFunctionINTEL = 5907,
DecorationMathOpDSPModeINTEL = 5909,
DecorationAliasScopeINTEL = 5914,
DecorationNoAliasINTEL = 5915,
DecorationInitiationIntervalINTEL = 5917,
DecorationMaxConcurrencyINTEL = 5918,
DecorationPipelineEnableINTEL = 5919,
DecorationBufferLocationINTEL = 5921, DecorationBufferLocationINTEL = 5921,
DecorationIOPipeStorageINTEL = 5944, DecorationIOPipeStorageINTEL = 5944,
DecorationFunctionFloatingPointModeINTEL = 6080, DecorationFunctionFloatingPointModeINTEL = 6080,
DecorationSingleElementVectorINTEL = 6085, DecorationSingleElementVectorINTEL = 6085,
DecorationVectorComputeCallableFunctionINTEL = 6087, DecorationVectorComputeCallableFunctionINTEL = 6087,
DecorationMediaBlockIOINTEL = 6140, DecorationMediaBlockIOINTEL = 6140,
DecorationConduitKernelArgumentINTEL = 6175,
DecorationRegisterMapKernelArgumentINTEL = 6176,
DecorationMMHostInterfaceAddressWidthINTEL = 6177,
DecorationMMHostInterfaceDataWidthINTEL = 6178,
DecorationMMHostInterfaceLatencyINTEL = 6179,
DecorationMMHostInterfaceReadWriteModeINTEL = 6180,
DecorationMMHostInterfaceMaxBurstINTEL = 6181,
DecorationMMHostInterfaceWaitRequestINTEL = 6182,
DecorationStableKernelArgumentINTEL = 6183,
DecorationMax = 0x7fffffff, DecorationMax = 0x7fffffff,
}; };
@ -609,8 +630,8 @@ enum BuiltIn {
BuiltInSubgroupLocalInvocationId = 41, BuiltInSubgroupLocalInvocationId = 41,
BuiltInVertexIndex = 42, BuiltInVertexIndex = 42,
BuiltInInstanceIndex = 43, BuiltInInstanceIndex = 43,
BuiltInCoreCountARM = 4161,
BuiltInCoreIDARM = 4160, BuiltInCoreIDARM = 4160,
BuiltInCoreCountARM = 4161,
BuiltInCoreMaxIDARM = 4162, BuiltInCoreMaxIDARM = 4162,
BuiltInWarpIDARM = 4163, BuiltInWarpIDARM = 4163,
BuiltInWarpMaxIDARM = 4164, BuiltInWarpMaxIDARM = 4164,
@ -691,6 +712,7 @@ enum BuiltIn {
BuiltInHitKindKHR = 5333, BuiltInHitKindKHR = 5333,
BuiltInHitKindNV = 5333, BuiltInHitKindNV = 5333,
BuiltInCurrentRayTimeNV = 5334, BuiltInCurrentRayTimeNV = 5334,
BuiltInHitTriangleVertexPositionsKHR = 5335,
BuiltInIncomingRayFlagsKHR = 5351, BuiltInIncomingRayFlagsKHR = 5351,
BuiltInIncomingRayFlagsNV = 5351, BuiltInIncomingRayFlagsNV = 5351,
BuiltInRayGeometryIndexKHR = 5352, BuiltInRayGeometryIndexKHR = 5352,
@ -732,6 +754,8 @@ enum LoopControlShift {
LoopControlMaxInterleavingINTELShift = 21, LoopControlMaxInterleavingINTELShift = 21,
LoopControlSpeculatedIterationsINTELShift = 22, LoopControlSpeculatedIterationsINTELShift = 22,
LoopControlNoFusionINTELShift = 23, LoopControlNoFusionINTELShift = 23,
LoopControlLoopCountINTELShift = 24,
LoopControlMaxReinvocationDelayINTELShift = 25,
LoopControlMax = 0x7fffffff, LoopControlMax = 0x7fffffff,
}; };
@ -754,6 +778,8 @@ enum LoopControlMask {
LoopControlMaxInterleavingINTELMask = 0x00200000, LoopControlMaxInterleavingINTELMask = 0x00200000,
LoopControlSpeculatedIterationsINTELMask = 0x00400000, LoopControlSpeculatedIterationsINTELMask = 0x00400000,
LoopControlNoFusionINTELMask = 0x00800000, LoopControlNoFusionINTELMask = 0x00800000,
LoopControlLoopCountINTELMask = 0x01000000,
LoopControlMaxReinvocationDelayINTELMask = 0x02000000,
}; };
enum FunctionControlShift { enum FunctionControlShift {
@ -826,6 +852,8 @@ enum MemoryAccessShift {
MemoryAccessMakePointerVisibleKHRShift = 4, MemoryAccessMakePointerVisibleKHRShift = 4,
MemoryAccessNonPrivatePointerShift = 5, MemoryAccessNonPrivatePointerShift = 5,
MemoryAccessNonPrivatePointerKHRShift = 5, MemoryAccessNonPrivatePointerKHRShift = 5,
MemoryAccessAliasScopeINTELMaskShift = 16,
MemoryAccessNoAliasINTELMaskShift = 17,
MemoryAccessMax = 0x7fffffff, MemoryAccessMax = 0x7fffffff,
}; };
@ -840,6 +868,8 @@ enum MemoryAccessMask {
MemoryAccessMakePointerVisibleKHRMask = 0x00000010, MemoryAccessMakePointerVisibleKHRMask = 0x00000010,
MemoryAccessNonPrivatePointerMask = 0x00000020, MemoryAccessNonPrivatePointerMask = 0x00000020,
MemoryAccessNonPrivatePointerKHRMask = 0x00000020, MemoryAccessNonPrivatePointerKHRMask = 0x00000020,
MemoryAccessAliasScopeINTELMaskMask = 0x00010000,
MemoryAccessNoAliasINTELMaskMask = 0x00020000,
}; };
enum Scope { enum Scope {
@ -1003,7 +1033,7 @@ enum Capability {
CapabilityMeshShadingNV = 5266, CapabilityMeshShadingNV = 5266,
CapabilityImageFootprintNV = 5282, CapabilityImageFootprintNV = 5282,
CapabilityMeshShadingEXT = 5283, CapabilityMeshShadingEXT = 5283,
CapabilityFragmentBarycentricKHR = 5284, CapabilityFragmentBarycentricKHR = 5284,
CapabilityFragmentBarycentricNV = 5284, CapabilityFragmentBarycentricNV = 5284,
CapabilityComputeDerivativeGroupQuadsNV = 5288, CapabilityComputeDerivativeGroupQuadsNV = 5288,
CapabilityFragmentDensityEXT = 5291, CapabilityFragmentDensityEXT = 5291,
@ -1033,6 +1063,7 @@ enum Capability {
CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312, CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
CapabilityRayTracingPositionFetchKHR = 5336,
CapabilityRayTracingNV = 5340, CapabilityRayTracingNV = 5340,
CapabilityRayTracingMotionBlurNV = 5341, CapabilityRayTracingMotionBlurNV = 5341,
CapabilityVulkanMemoryModel = 5345, CapabilityVulkanMemoryModel = 5345,
@ -1050,8 +1081,10 @@ enum Capability {
CapabilityFragmentShaderPixelInterlockEXT = 5378, CapabilityFragmentShaderPixelInterlockEXT = 5378,
CapabilityDemoteToHelperInvocation = 5379, CapabilityDemoteToHelperInvocation = 5379,
CapabilityDemoteToHelperInvocationEXT = 5379, CapabilityDemoteToHelperInvocationEXT = 5379,
CapabilityRayTracingOpacityMicromapEXT = 5381,
CapabilityShaderInvocationReorderNV = 5383, CapabilityShaderInvocationReorderNV = 5383,
CapabilityBindlessTextureNV = 5390, CapabilityBindlessTextureNV = 5390,
CapabilityRayQueryPositionFetchKHR = 5391,
CapabilitySubgroupShuffleINTEL = 5568, CapabilitySubgroupShuffleINTEL = 5568,
CapabilitySubgroupBufferBlockIOINTEL = 5569, CapabilitySubgroupBufferBlockIOINTEL = 5569,
CapabilitySubgroupImageBlockIOINTEL = 5570, CapabilitySubgroupImageBlockIOINTEL = 5570,
@ -1084,9 +1117,13 @@ enum Capability {
CapabilityFPGAMemoryAccessesINTEL = 5898, CapabilityFPGAMemoryAccessesINTEL = 5898,
CapabilityFPGAClusterAttributesINTEL = 5904, CapabilityFPGAClusterAttributesINTEL = 5904,
CapabilityLoopFuseINTEL = 5906, CapabilityLoopFuseINTEL = 5906,
CapabilityFPGADSPControlINTEL = 5908,
CapabilityMemoryAccessAliasingINTEL = 5910,
CapabilityFPGAInvocationPipeliningAttributesINTEL = 5916,
CapabilityFPGABufferLocationINTEL = 5920, CapabilityFPGABufferLocationINTEL = 5920,
CapabilityArbitraryPrecisionFixedPointINTEL = 5922, CapabilityArbitraryPrecisionFixedPointINTEL = 5922,
CapabilityUSMStorageClassesINTEL = 5935, CapabilityUSMStorageClassesINTEL = 5935,
CapabilityRuntimeAlignedAttributeINTEL = 5939,
CapabilityIOPipesINTEL = 5943, CapabilityIOPipesINTEL = 5943,
CapabilityBlockingPipesINTEL = 5945, CapabilityBlockingPipesINTEL = 5945,
CapabilityFPGARegINTEL = 5948, CapabilityFPGARegINTEL = 5948,
@ -1100,12 +1137,16 @@ enum Capability {
CapabilityDotProductKHR = 6019, CapabilityDotProductKHR = 6019,
CapabilityRayCullMaskKHR = 6020, CapabilityRayCullMaskKHR = 6020,
CapabilityBitInstructions = 6025, CapabilityBitInstructions = 6025,
CapabilityGroupNonUniformRotateKHR = 6026,
CapabilityAtomicFloat32AddEXT = 6033, CapabilityAtomicFloat32AddEXT = 6033,
CapabilityAtomicFloat64AddEXT = 6034, CapabilityAtomicFloat64AddEXT = 6034,
CapabilityLongConstantCompositeINTEL = 6089, CapabilityLongConstantCompositeINTEL = 6089,
CapabilityOptNoneINTEL = 6094, CapabilityOptNoneINTEL = 6094,
CapabilityAtomicFloat16AddEXT = 6095, CapabilityAtomicFloat16AddEXT = 6095,
CapabilityDebugInfoModuleINTEL = 6114, CapabilityDebugInfoModuleINTEL = 6114,
CapabilitySplitBarrierINTEL = 6141,
CapabilityFPGAArgumentInterfacesINTEL = 6174,
CapabilityGroupUniformArithmeticKHR = 6400,
CapabilityMax = 0x7fffffff, CapabilityMax = 0x7fffffff,
}; };
@ -1120,6 +1161,7 @@ enum RayFlagsShift {
RayFlagsCullNoOpaqueKHRShift = 7, RayFlagsCullNoOpaqueKHRShift = 7,
RayFlagsSkipTrianglesKHRShift = 8, RayFlagsSkipTrianglesKHRShift = 8,
RayFlagsSkipAABBsKHRShift = 9, RayFlagsSkipAABBsKHRShift = 9,
RayFlagsForceOpacityMicromap2StateEXTShift = 10,
RayFlagsMax = 0x7fffffff, RayFlagsMax = 0x7fffffff,
}; };
@ -1135,6 +1177,7 @@ enum RayFlagsMask {
RayFlagsCullNoOpaqueKHRMask = 0x00000080, RayFlagsCullNoOpaqueKHRMask = 0x00000080,
RayFlagsSkipTrianglesKHRMask = 0x00000100, RayFlagsSkipTrianglesKHRMask = 0x00000100,
RayFlagsSkipAABBsKHRMask = 0x00000200, RayFlagsSkipAABBsKHRMask = 0x00000200,
RayFlagsForceOpacityMicromap2StateEXTMask = 0x00000400,
}; };
enum RayQueryIntersection { enum RayQueryIntersection {
@ -1561,6 +1604,7 @@ enum Op {
OpSubgroupAllKHR = 4428, OpSubgroupAllKHR = 4428,
OpSubgroupAnyKHR = 4429, OpSubgroupAnyKHR = 4429,
OpSubgroupAllEqualKHR = 4430, OpSubgroupAllEqualKHR = 4430,
OpGroupNonUniformRotateKHR = 4431,
OpSubgroupReadInvocationKHR = 4432, OpSubgroupReadInvocationKHR = 4432,
OpTraceRayKHR = 4445, OpTraceRayKHR = 4445,
OpExecuteCallableKHR = 4446, OpExecuteCallableKHR = 4446,
@ -1642,6 +1686,7 @@ enum Op {
OpTraceNV = 5337, OpTraceNV = 5337,
OpTraceMotionNV = 5338, OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339, OpTraceRayMotionNV = 5339,
OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340,
OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341, OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344, OpExecuteCallableNV = 5344,
@ -1862,6 +1907,9 @@ enum Op {
OpArbitraryFloatPowRINTEL = 5881, OpArbitraryFloatPowRINTEL = 5881,
OpArbitraryFloatPowNINTEL = 5882, OpArbitraryFloatPowNINTEL = 5882,
OpLoopControlINTEL = 5887, OpLoopControlINTEL = 5887,
OpAliasDomainDeclINTEL = 5911,
OpAliasScopeDeclINTEL = 5912,
OpAliasScopeListDeclINTEL = 5913,
OpFixedSqrtINTEL = 5923, OpFixedSqrtINTEL = 5923,
OpFixedRecipINTEL = 5924, OpFixedRecipINTEL = 5924,
OpFixedRsqrtINTEL = 5925, OpFixedRsqrtINTEL = 5925,
@ -1900,10 +1948,23 @@ enum Op {
OpTypeStructContinuedINTEL = 6090, OpTypeStructContinuedINTEL = 6090,
OpConstantCompositeContinuedINTEL = 6091, OpConstantCompositeContinuedINTEL = 6091,
OpSpecConstantCompositeContinuedINTEL = 6092, OpSpecConstantCompositeContinuedINTEL = 6092,
OpControlBarrierArriveINTEL = 6142,
OpControlBarrierWaitINTEL = 6143,
OpGroupIMulKHR = 6401,
OpGroupFMulKHR = 6402,
OpGroupBitwiseAndKHR = 6403,
OpGroupBitwiseOrKHR = 6404,
OpGroupBitwiseXorKHR = 6405,
OpGroupLogicalAndKHR = 6406,
OpGroupLogicalOrKHR = 6407,
OpGroupLogicalXorKHR = 6408,
OpMax = 0x7fffffff, OpMax = 0x7fffffff,
}; };
#ifdef SPV_ENABLE_UTILITY_CODE #ifdef SPV_ENABLE_UTILITY_CODE
#ifndef __cplusplus
#include <stdbool.h>
#endif
inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
*hasResult = *hasResultType = false; *hasResult = *hasResultType = false;
switch (opcode) { switch (opcode) {
@ -2258,6 +2319,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break;
case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break;
case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break;
case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break; case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break;
case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break;
@ -2288,10 +2350,43 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break;
case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break;
case OpReadClockKHR: *hasResult = true; *hasResultType = true; break; case OpReadClockKHR: *hasResult = true; *hasResultType = true; break;
case OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break;
case OpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break;
case OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break;
case OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break;
case OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break;
case OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break;
case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break;
case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break;
case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break;
case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break;
case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
@ -2299,6 +2394,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpTraceNV: *hasResult = false; *hasResultType = false; break; case OpTraceNV: *hasResult = false; *hasResultType = false; break;
case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break; case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break;
case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
@ -2515,6 +2611,9 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break;
case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break;
case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
case OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break;
case OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break;
case OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break;
case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break;
case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break;
case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break;
@ -2553,23 +2652,64 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break;
case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
case OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break;
case OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break;
case OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break;
} }
} }
#endif /* SPV_ENABLE_UTILITY_CODE */ #endif /* SPV_ENABLE_UTILITY_CODE */
// Overload operator| for mask bit combining // Overload bitwise operators for mask bit combining
inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
inline ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); }
inline ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); }
inline ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); }
inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
inline FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); }
inline FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); }
inline FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); }
inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
inline SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); }
inline SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); }
inline SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); }
inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
inline LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); }
inline LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); }
inline LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); }
inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
inline FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); }
inline FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); }
inline FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); }
inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
inline MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); }
inline MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); }
inline MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); }
inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
inline MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); }
inline MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); }
inline MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); }
inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
inline KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); }
inline KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); }
inline KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); }
inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); }
inline RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); }
inline RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); }
inline RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); }
inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); }
inline FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); }
inline FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); }
inline FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); }
} // end namespace spv } // end namespace spv
#endif // #ifndef spirv_HPP #endif // #ifndef spirv_HPP

View File

@ -1,12 +1,14 @@
rayQuery-allOps.comp rayQuery-allOps.comp
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 8000b // Generated by (magic number): 8000b
// Id's are bound by 258 // Id's are bound by 275
Capability Shader Capability Shader
Capability RayQueryKHR Capability RayQueryKHR
Capability RayTraversalPrimitiveCullingKHR Capability RayTraversalPrimitiveCullingKHR
Capability RayQueryPositionFetchKHR
Extension "SPV_KHR_ray_query" Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_tracing_position_fetch"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" EntryPoint GLCompute 4 "main"
@ -14,6 +16,7 @@ rayQuery-allOps.comp
Source GLSL 460 Source GLSL 460
SourceExtension "GL_EXT_ray_flags_primitive_culling" SourceExtension "GL_EXT_ray_flags_primitive_culling"
SourceExtension "GL_EXT_ray_query" SourceExtension "GL_EXT_ray_query"
SourceExtension "GL_EXT_ray_tracing_position_fetch"
Name 4 "main" Name 4 "main"
Name 6 "doSomething(" Name 6 "doSomething("
Name 10 "Ray" Name 10 "Ray"
@ -35,16 +38,17 @@ rayQuery-allOps.comp
Name 83 "_mat3x4" Name 83 "_mat3x4"
Name 143 "t" Name 143 "t"
Name 156 "committedStatus" Name 156 "committedStatus"
Name 241 "o" Name 184 "positions"
Name 243 "d" Name 258 "o"
Name 253 "Ray" Name 260 "d"
MemberName 253(Ray) 0 "pos" Name 270 "Ray"
MemberName 253(Ray) 1 "tmin" MemberName 270(Ray) 0 "pos"
MemberName 253(Ray) 2 "dir" MemberName 270(Ray) 1 "tmin"
MemberName 253(Ray) 3 "tmax" MemberName 270(Ray) 2 "dir"
Name 255 "Rays" MemberName 270(Ray) 3 "tmax"
MemberName 255(Rays) 0 "rays" Name 272 "Rays"
Name 257 "" MemberName 272(Rays) 0 "rays"
Name 274 ""
MemberDecorate 15(Log) 0 Offset 0 MemberDecorate 15(Log) 0 Offset 0
MemberDecorate 15(Log) 1 Offset 4 MemberDecorate 15(Log) 1 Offset 4
Decorate 15(Log) BufferBlock Decorate 15(Log) BufferBlock
@ -52,15 +56,15 @@ rayQuery-allOps.comp
Decorate 17 Binding 0 Decorate 17 Binding 0
Decorate 50(rtas) DescriptorSet 0 Decorate 50(rtas) DescriptorSet 0
Decorate 50(rtas) Binding 1 Decorate 50(rtas) Binding 1
MemberDecorate 253(Ray) 0 Offset 0 MemberDecorate 270(Ray) 0 Offset 0
MemberDecorate 253(Ray) 1 Offset 12 MemberDecorate 270(Ray) 1 Offset 12
MemberDecorate 253(Ray) 2 Offset 16 MemberDecorate 270(Ray) 2 Offset 16
MemberDecorate 253(Ray) 3 Offset 28 MemberDecorate 270(Ray) 3 Offset 28
Decorate 254 ArrayStride 32 Decorate 271 ArrayStride 32
MemberDecorate 255(Rays) 0 Offset 0 MemberDecorate 272(Rays) 0 Offset 0
Decorate 255(Rays) BufferBlock Decorate 272(Rays) BufferBlock
Decorate 257 DescriptorSet 0 Decorate 274 DescriptorSet 0
Decorate 257 Binding 2 Decorate 274 Binding 2
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
8: TypeFloat 32 8: TypeFloat 32
@ -105,13 +109,16 @@ rayQuery-allOps.comp
91: TypeVector 8(float) 2 91: TypeVector 8(float) 2
144: 8(float) Constant 1056964608 144: 8(float) Constant 1056964608
175: 14(int) Constant 1 175: 14(int) Constant 1
198: 14(int) Constant 2 181: 14(int) Constant 3
231: 14(int) Constant 256 182: TypeArray 9(fvec3) 181
253(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float) 183: TypePointer Function 182
254: TypeRuntimeArray 253(Ray) 215: 14(int) Constant 2
255(Rays): TypeStruct 254 248: 14(int) Constant 256
256: TypePointer Uniform 255(Rays) 270(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
257: 256(ptr) Variable Uniform 271: TypeRuntimeArray 270(Ray)
272(Rays): TypeStruct 271
273: TypePointer Uniform 272(Rays)
274: 273(ptr) Variable Uniform
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
43(ray): 25(ptr) Variable Function 43(ray): 25(ptr) Variable Function
@ -120,8 +127,9 @@ rayQuery-allOps.comp
83(_mat3x4): 82(ptr) Variable Function 83(_mat3x4): 82(ptr) Variable Function
143(t): 35(ptr) Variable Function 143(t): 35(ptr) Variable Function
156(committedStatus): 68(ptr) Variable Function 156(committedStatus): 68(ptr) Variable Function
241(o): 29(ptr) Variable Function 184(positions): 183(ptr) Variable Function
243(d): 29(ptr) Variable Function 258(o): 29(ptr) Variable Function
260(d): 29(ptr) Variable Function
44: 10(Ray) FunctionCall 12(makeRayDesc() 44: 10(Ray) FunctionCall 12(makeRayDesc()
Store 43(ray) 44 Store 43(ray) 44
51: 48 Load 50(rtas) 51: 48 Load 50(rtas)
@ -303,110 +311,130 @@ rayQuery-allOps.comp
180: 2 FunctionCall 6(doSomething() 180: 2 FunctionCall 6(doSomething()
Branch 179 Branch 179
179: Label 179: Label
Branch 162 185: 182 RayQueryGetIntersectionTriangleVertexPositionsKHR 47(rayQuery) 23
161: Label Store 184(positions) 185
182: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23 186: 35(ptr) AccessChain 184(positions) 19 20
183: 66(bool) SGreaterThan 182 19 187: 8(float) Load 186
SelectionMerge 185 None 188: 66(bool) FOrdLessThan 187 27
BranchConditional 183 184 185
184: Label
186: 2 FunctionCall 6(doSomething()
Branch 185
185: Label
187: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
188: 66(bool) SGreaterThan 187 19
SelectionMerge 190 None SelectionMerge 190 None
BranchConditional 188 189 190 BranchConditional 188 189 190
189: Label 189: Label
191: 2 FunctionCall 6(doSomething() 191: 35(ptr) AccessChain 184(positions) 31 175
192: 8(float) Load 191
193: 66(bool) FOrdGreaterThan 192 27
Branch 190 Branch 190
190: Label 190: Label
192: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23 194: 66(bool) Phi 188 179 193 189
193: 66(bool) SGreaterThan 192 19 SelectionMerge 196 None
SelectionMerge 195 None BranchConditional 194 195 196
BranchConditional 193 194 195 195: Label
194: Label 197: 2 FunctionCall 6(doSomething()
196: 2 FunctionCall 6(doSomething() Branch 196
Branch 195 196: Label
195: Label Branch 162
197: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23 161: Label
199: 8(float) CompositeExtract 197 2 199: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
200: 66(bool) FOrdGreaterThan 199 27 200: 66(bool) SGreaterThan 199 19
SelectionMerge 202 None SelectionMerge 202 None
BranchConditional 200 201 202 BranchConditional 200 201 202
201: Label 201: Label
203: 2 FunctionCall 6(doSomething() 203: 2 FunctionCall 6(doSomething()
Branch 202 Branch 202
202: Label 202: Label
204: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23 204: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
205: 8(float) CompositeExtract 204 0 205: 66(bool) SGreaterThan 204 19
206: 66(bool) FOrdGreaterThan 205 27 SelectionMerge 207 None
SelectionMerge 208 None BranchConditional 205 206 207
BranchConditional 206 207 208 206: Label
207: Label 208: 2 FunctionCall 6(doSomething()
209: 2 FunctionCall 6(doSomething() Branch 207
Branch 208 207: Label
208: Label 209: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
210: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23 210: 66(bool) SGreaterThan 209 19
211: 66(bool) SGreaterThan 210 19 SelectionMerge 212 None
SelectionMerge 213 None BranchConditional 210 211 212
BranchConditional 211 212 213 211: Label
212: Label 213: 2 FunctionCall 6(doSomething()
214: 2 FunctionCall 6(doSomething() Branch 212
Branch 213 212: Label
213: Label 214: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
215: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23 216: 8(float) CompositeExtract 214 2
216: 66(bool) FOrdGreaterThan 215 27 217: 66(bool) FOrdGreaterThan 216 27
SelectionMerge 218 None SelectionMerge 219 None
BranchConditional 216 217 218 BranchConditional 217 218 219
217: Label 218: Label
219: 2 FunctionCall 6(doSomething() 220: 2 FunctionCall 6(doSomething()
Branch 218 Branch 219
218: Label 219: Label
221: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
222: 8(float) CompositeExtract 221 0
223: 66(bool) FOrdGreaterThan 222 27
SelectionMerge 225 None
BranchConditional 223 224 225
224: Label
226: 2 FunctionCall 6(doSomething()
Branch 225
225: Label
227: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
228: 66(bool) SGreaterThan 227 19
SelectionMerge 230 None
BranchConditional 228 229 230
229: Label
231: 2 FunctionCall 6(doSomething()
Branch 230
230: Label
232: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
233: 66(bool) FOrdGreaterThan 232 27
SelectionMerge 235 None
BranchConditional 233 234 235
234: Label
236: 2 FunctionCall 6(doSomething()
Branch 235
235: Label
Branch 162 Branch 162
162: Label 162: Label
222: 35(ptr) AccessChain 83(_mat3x4) 19 20 239: 35(ptr) AccessChain 83(_mat3x4) 19 20
223: 8(float) Load 222 240: 8(float) Load 239
224: 35(ptr) AccessChain 78(_mat4x3) 19 20 241: 35(ptr) AccessChain 78(_mat4x3) 19 20
225: 8(float) Load 224 242: 8(float) Load 241
226: 66(bool) FOrdEqual 223 225 243: 66(bool) FOrdEqual 240 242
SelectionMerge 228 None SelectionMerge 245 None
BranchConditional 226 227 228 BranchConditional 243 244 245
227: Label 244: Label
229: 2 FunctionCall 6(doSomething() 246: 2 FunctionCall 6(doSomething()
Branch 228 Branch 245
228: Label 245: Label
230: 14(int) RayQueryGetRayFlagsKHR 47(rayQuery) 247: 14(int) RayQueryGetRayFlagsKHR 47(rayQuery)
232: 66(bool) UGreaterThan 230 231 249: 66(bool) UGreaterThan 247 248
SelectionMerge 234 None
BranchConditional 232 233 234
233: Label
235: 2 FunctionCall 6(doSomething()
Branch 234
234: Label
236: 8(float) RayQueryGetRayTMinKHR 47(rayQuery)
237: 66(bool) FOrdGreaterThan 236 27
SelectionMerge 239 None
BranchConditional 237 238 239
238: Label
240: 2 FunctionCall 6(doSomething()
Branch 239
239: Label
242: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery)
Store 241(o) 242
244: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery)
Store 243(d) 244
245: 35(ptr) AccessChain 241(o) 20
246: 8(float) Load 245
247: 35(ptr) AccessChain 243(d) 198
248: 8(float) Load 247
249: 66(bool) FOrdEqual 246 248
SelectionMerge 251 None SelectionMerge 251 None
BranchConditional 249 250 251 BranchConditional 249 250 251
250: Label 250: Label
252: 2 FunctionCall 6(doSomething() 252: 2 FunctionCall 6(doSomething()
Branch 251 Branch 251
251: Label 251: Label
253: 8(float) RayQueryGetRayTMinKHR 47(rayQuery)
254: 66(bool) FOrdGreaterThan 253 27
SelectionMerge 256 None
BranchConditional 254 255 256
255: Label
257: 2 FunctionCall 6(doSomething()
Branch 256
256: Label
259: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery)
Store 258(o) 259
261: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery)
Store 260(d) 261
262: 35(ptr) AccessChain 258(o) 20
263: 8(float) Load 262
264: 35(ptr) AccessChain 260(d) 215
265: 8(float) Load 264
266: 66(bool) FOrdEqual 263 265
SelectionMerge 268 None
BranchConditional 266 267 268
267: Label
269: 2 FunctionCall 6(doSomething()
Branch 268
268: Label
Return Return
FunctionEnd FunctionEnd
6(doSomething(): 2 Function None 3 6(doSomething(): 2 Function None 3

View File

@ -1,19 +1,22 @@
spv.ext.AnyHitShader.rahit spv.ext.AnyHitShader.rahit
// Module Version 10400 // Module Version 10400
// Generated by (magic number): 8000b // Generated by (magic number): 8000b
// Id's are bound by 108 // Id's are bound by 116
Capability GroupNonUniform Capability GroupNonUniform
Capability RayTracingKHR Capability RayTracingKHR
Capability RayTracingPositionFetchKHR
Capability RayCullMaskKHR Capability RayCullMaskKHR
Extension "SPV_KHR_ray_cull_mask" Extension "SPV_KHR_ray_cull_mask"
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
Extension "SPV_KHR_ray_tracing_position_fetch"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 85 99 EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 88 93 107
Source GLSL 460 Source GLSL 460
SourceExtension "GL_EXT_ray_cull_mask" SourceExtension "GL_EXT_ray_cull_mask"
SourceExtension "GL_EXT_ray_tracing" SourceExtension "GL_EXT_ray_tracing"
SourceExtension "GL_EXT_ray_tracing_position_fetch"
SourceExtension "GL_KHR_shader_subgroup_basic" SourceExtension "GL_KHR_shader_subgroup_basic"
Name 4 "main" Name 4 "main"
Name 9 "v0" Name 9 "v0"
@ -52,8 +55,10 @@ spv.ext.AnyHitShader.rahit
Name 78 "v17" Name 78 "v17"
Name 81 "v18" Name 81 "v18"
Name 82 "gl_CullMaskEXT" Name 82 "gl_CullMaskEXT"
Name 85 "incomingPayload" Name 84 "v19"
Name 99 "gl_SubgroupSize" Name 88 "gl_HitTriangleVertexPositionsEXT"
Name 93 "incomingPayload"
Name 107 "gl_SubgroupSize"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
@ -71,10 +76,11 @@ spv.ext.AnyHitShader.rahit
Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR
Decorate 82(gl_CullMaskEXT) BuiltIn CullMaskKHR Decorate 82(gl_CullMaskEXT) BuiltIn CullMaskKHR
Decorate 99(gl_SubgroupSize) RelaxedPrecision Decorate 88(gl_HitTriangleVertexPositionsEXT) BuiltIn HitTriangleVertexPositionsKHR
Decorate 99(gl_SubgroupSize) BuiltIn SubgroupSize Decorate 107(gl_SubgroupSize) RelaxedPrecision
Decorate 100 RelaxedPrecision Decorate 107(gl_SubgroupSize) BuiltIn SubgroupSize
Decorate 101 RelaxedPrecision Decorate 108 RelaxedPrecision
Decorate 109 RelaxedPrecision
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -115,15 +121,20 @@ spv.ext.AnyHitShader.rahit
73: TypeMatrix 72(fvec4) 3 73: TypeMatrix 72(fvec4) 3
74: TypePointer Function 73 74: TypePointer Function 73
82(gl_CullMaskEXT): 57(ptr) Variable Input 82(gl_CullMaskEXT): 57(ptr) Variable Input
84: TypePointer IncomingRayPayloadKHR 72(fvec4) 85: 6(int) Constant 3
85(incomingPayload): 84(ptr) Variable IncomingRayPayloadKHR 86: TypeArray 29(fvec3) 85
86: 28(float) Constant 1056964608 87: TypePointer Input 86
87: 72(fvec4) ConstantComposite 86 86 86 86 88(gl_HitTriangleVertexPositionsEXT): 87(ptr) Variable Input
89: 16(int) Constant 1 89: 16(int) Constant 0
90: TypeBool 92: TypePointer IncomingRayPayloadKHR 72(fvec4)
95: 6(int) Constant 0 93(incomingPayload): 92(ptr) Variable IncomingRayPayloadKHR
99(gl_SubgroupSize): 57(ptr) Variable Input 94: 28(float) Constant 1056964608
102: TypePointer IncomingRayPayloadKHR 28(float) 95: 72(fvec4) ConstantComposite 94 94 94 94
97: 16(int) Constant 1
98: TypeBool
103: 6(int) Constant 0
107(gl_SubgroupSize): 57(ptr) Variable Input
110: TypePointer IncomingRayPayloadKHR 28(float)
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(v0): 8(ptr) Variable Function 9(v0): 8(ptr) Variable Function
@ -145,6 +156,7 @@ spv.ext.AnyHitShader.rahit
75(v16): 74(ptr) Variable Function 75(v16): 74(ptr) Variable Function
78(v17): 74(ptr) Variable Function 78(v17): 74(ptr) Variable Function
81(v18): 55(ptr) Variable Function 81(v18): 55(ptr) Variable Function
84(v19): 30(ptr) Variable Function
12: 7(ivec3) Load 11(gl_LaunchIDEXT) 12: 7(ivec3) Load 11(gl_LaunchIDEXT)
Store 9(v0) 12 Store 9(v0) 12
15: 7(ivec3) Load 14(gl_LaunchSizeEXT) 15: 7(ivec3) Load 14(gl_LaunchSizeEXT)
@ -185,20 +197,23 @@ spv.ext.AnyHitShader.rahit
Store 78(v17) 80 Store 78(v17) 80
83: 6(int) Load 82(gl_CullMaskEXT) 83: 6(int) Load 82(gl_CullMaskEXT)
Store 81(v18) 83 Store 81(v18) 83
Store 85(incomingPayload) 87 90: 32(ptr) AccessChain 88(gl_HitTriangleVertexPositionsEXT) 89
88: 16(int) Load 18(v2) 91: 29(fvec3) Load 90
91: 90(bool) IEqual 88 89 Store 84(v19) 91
SelectionMerge 93 None Store 93(incomingPayload) 95
BranchConditional 91 92 93 96: 16(int) Load 18(v2)
92: Label 99: 98(bool) IEqual 96 97
SelectionMerge 101 None
BranchConditional 99 100 101
100: Label
IgnoreIntersectionKHR IgnoreIntersectionKHR
93: Label 101: Label
100: 6(int) Load 99(gl_SubgroupSize) 108: 6(int) Load 107(gl_SubgroupSize)
101: 28(float) ConvertUToF 100 109: 28(float) ConvertUToF 108
103: 102(ptr) AccessChain 85(incomingPayload) 95 111: 110(ptr) AccessChain 93(incomingPayload) 103
104: 28(float) Load 103 112: 28(float) Load 111
105: 28(float) FAdd 104 101 113: 28(float) FAdd 112 109
106: 102(ptr) AccessChain 85(incomingPayload) 95 114: 110(ptr) AccessChain 93(incomingPayload) 103
Store 106 105 Store 114 113
TerminateRayKHR TerminateRayKHR
FunctionEnd FunctionEnd

View File

@ -1,18 +1,21 @@
spv.ext.ClosestHitShader.rchit spv.ext.ClosestHitShader.rchit
// Module Version 10400 // Module Version 10400
// Generated by (magic number): 8000b // Generated by (magic number): 8000b
// Id's are bound by 102 // Id's are bound by 109
Capability RayTracingKHR Capability RayTracingKHR
Capability RayTracingPositionFetchKHR
Capability RayCullMaskKHR Capability RayCullMaskKHR
Extension "SPV_KHR_ray_cull_mask" Extension "SPV_KHR_ray_cull_mask"
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
Extension "SPV_KHR_ray_tracing_position_fetch"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint ClosestHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 86 99 101 EntryPoint ClosestHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 88 94 106 108
Source GLSL 460 Source GLSL 460
SourceExtension "GL_EXT_ray_cull_mask" SourceExtension "GL_EXT_ray_cull_mask"
SourceExtension "GL_EXT_ray_tracing" SourceExtension "GL_EXT_ray_tracing"
SourceExtension "GL_EXT_ray_tracing_position_fetch"
Name 4 "main" Name 4 "main"
Name 9 "v0" Name 9 "v0"
Name 11 "gl_LaunchIDEXT" Name 11 "gl_LaunchIDEXT"
@ -50,9 +53,11 @@ spv.ext.ClosestHitShader.rchit
Name 78 "v17" Name 78 "v17"
Name 81 "v18" Name 81 "v18"
Name 82 "gl_CullMaskEXT" Name 82 "gl_CullMaskEXT"
Name 86 "accEXT" Name 84 "v19"
Name 99 "incomingPayload" Name 88 "gl_HitTriangleVertexPositionsEXT"
Name 101 "localPayload" Name 94 "accEXT"
Name 106 "incomingPayload"
Name 108 "localPayload"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
@ -70,8 +75,9 @@ spv.ext.ClosestHitShader.rchit
Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR
Decorate 82(gl_CullMaskEXT) BuiltIn CullMaskKHR Decorate 82(gl_CullMaskEXT) BuiltIn CullMaskKHR
Decorate 86(accEXT) DescriptorSet 0 Decorate 88(gl_HitTriangleVertexPositionsEXT) BuiltIn HitTriangleVertexPositionsKHR
Decorate 86(accEXT) Binding 0 Decorate 94(accEXT) DescriptorSet 0
Decorate 94(accEXT) Binding 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -112,23 +118,27 @@ spv.ext.ClosestHitShader.rchit
73: TypeMatrix 72(fvec4) 3 73: TypeMatrix 72(fvec4) 3
74: TypePointer Function 73 74: TypePointer Function 73
82(gl_CullMaskEXT): 57(ptr) Variable Input 82(gl_CullMaskEXT): 57(ptr) Variable Input
84: TypeAccelerationStructureKHR 85: 6(int) Constant 3
85: TypePointer UniformConstant 84 86: TypeArray 29(fvec3) 85
86(accEXT): 85(ptr) Variable UniformConstant 87: TypePointer Input 86
88: 6(int) Constant 0 88(gl_HitTriangleVertexPositionsEXT): 87(ptr) Variable Input
89: 6(int) Constant 1 89: 16(int) Constant 0
90: 6(int) Constant 2 92: TypeAccelerationStructureKHR
91: 6(int) Constant 3 93: TypePointer UniformConstant 92
92: 28(float) Constant 1056964608 94(accEXT): 93(ptr) Variable UniformConstant
93: 29(fvec3) ConstantComposite 92 92 92 96: 6(int) Constant 0
94: 28(float) Constant 1065353216 97: 6(int) Constant 1
95: 29(fvec3) ConstantComposite 94 94 94 98: 6(int) Constant 2
96: 28(float) Constant 1061158912 99: 28(float) Constant 1056964608
97: 16(int) Constant 1 100: 29(fvec3) ConstantComposite 99 99 99
98: TypePointer IncomingRayPayloadKHR 72(fvec4) 101: 28(float) Constant 1065353216
99(incomingPayload): 98(ptr) Variable IncomingRayPayloadKHR 102: 29(fvec3) ConstantComposite 101 101 101
100: TypePointer RayPayloadKHR 72(fvec4) 103: 28(float) Constant 1061158912
101(localPayload): 100(ptr) Variable RayPayloadKHR 104: 16(int) Constant 1
105: TypePointer IncomingRayPayloadKHR 72(fvec4)
106(incomingPayload): 105(ptr) Variable IncomingRayPayloadKHR
107: TypePointer RayPayloadKHR 72(fvec4)
108(localPayload): 107(ptr) Variable RayPayloadKHR
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(v0): 8(ptr) Variable Function 9(v0): 8(ptr) Variable Function
@ -150,6 +160,7 @@ spv.ext.ClosestHitShader.rchit
75(v16): 74(ptr) Variable Function 75(v16): 74(ptr) Variable Function
78(v17): 74(ptr) Variable Function 78(v17): 74(ptr) Variable Function
81(v18): 55(ptr) Variable Function 81(v18): 55(ptr) Variable Function
84(v19): 30(ptr) Variable Function
12: 7(ivec3) Load 11(gl_LaunchIDEXT) 12: 7(ivec3) Load 11(gl_LaunchIDEXT)
Store 9(v0) 12 Store 9(v0) 12
15: 7(ivec3) Load 14(gl_LaunchSizeEXT) 15: 7(ivec3) Load 14(gl_LaunchSizeEXT)
@ -190,7 +201,10 @@ spv.ext.ClosestHitShader.rchit
Store 78(v17) 80 Store 78(v17) 80
83: 6(int) Load 82(gl_CullMaskEXT) 83: 6(int) Load 82(gl_CullMaskEXT)
Store 81(v18) 83 Store 81(v18) 83
87: 84 Load 86(accEXT) 90: 32(ptr) AccessChain 88(gl_HitTriangleVertexPositionsEXT) 89
TraceRayKHR 87 88 89 90 91 88 93 92 95 96 99(incomingPayload) 91: 29(fvec3) Load 90
Store 84(v19) 91
95: 92 Load 94(accEXT)
TraceRayKHR 95 96 97 98 85 96 100 99 102 103 106(incomingPayload)
Return Return
FunctionEnd FunctionEnd

View File

@ -1,6 +1,7 @@
#version 460 #version 460
#extension GL_EXT_ray_query : enable #extension GL_EXT_ray_query : enable
#extension GL_EXT_ray_flags_primitive_culling : enable #extension GL_EXT_ray_flags_primitive_culling : enable
#extension GL_EXT_ray_tracing_position_fetch : enable
layout(primitive_culling); layout(primitive_culling);
struct Ray struct Ray
@ -147,6 +148,14 @@ void main()
{ {
doSomething(); doSomething();
} }
{
vec3 positions[3];
rayQueryGetIntersectionTriangleVertexPositionsEXT(rayQuery, true, positions);
if (positions[0].x < 0 && positions[2].y > 0)
{
doSomething();
}
}
break; break;
case gl_RayQueryCommittedIntersectionGeneratedEXT : case gl_RayQueryCommittedIntersectionGeneratedEXT :

2
Test/spv.ext.AnyHitShader.rahit Normal file → Executable file
View File

@ -2,6 +2,7 @@
#extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_tracing : enable
#extension GL_KHR_shader_subgroup_basic : enable #extension GL_KHR_shader_subgroup_basic : enable
#extension GL_EXT_ray_cull_mask : enable #extension GL_EXT_ray_cull_mask : enable
#extension GL_EXT_ray_tracing_position_fetch : enable
layout(location = 1) rayPayloadInEXT vec4 incomingPayload; layout(location = 1) rayPayloadInEXT vec4 incomingPayload;
void main() void main()
@ -25,6 +26,7 @@ void main()
mat3x4 v16 = gl_ObjectToWorld3x4EXT; mat3x4 v16 = gl_ObjectToWorld3x4EXT;
mat3x4 v17 = gl_WorldToObject3x4EXT; mat3x4 v17 = gl_WorldToObject3x4EXT;
uint v18 = gl_CullMaskEXT; uint v18 = gl_CullMaskEXT;
vec3 v19 = gl_HitTriangleVertexPositionsEXT[0];
incomingPayload = vec4(0.5f); incomingPayload = vec4(0.5f);
if (v2 == 1) { if (v2 == 1) {
ignoreIntersectionEXT; ignoreIntersectionEXT;

2
Test/spv.ext.ClosestHitShader.rchit Normal file → Executable file
View File

@ -1,6 +1,7 @@
#version 460 #version 460
#extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_tracing : enable
#extension GL_EXT_ray_cull_mask : enable #extension GL_EXT_ray_cull_mask : enable
#extension GL_EXT_ray_tracing_position_fetch : enable
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT; layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
layout(location = 0) rayPayloadEXT vec4 localPayload; layout(location = 0) rayPayloadEXT vec4 localPayload;
@ -26,5 +27,6 @@ void main()
mat3x4 v16 = gl_ObjectToWorld3x4EXT; mat3x4 v16 = gl_ObjectToWorld3x4EXT;
mat3x4 v17 = gl_WorldToObject3x4EXT; mat3x4 v17 = gl_WorldToObject3x4EXT;
uint v18 = gl_CullMaskEXT; uint v18 = gl_CullMaskEXT;
vec3 v19 = gl_HitTriangleVertexPositionsEXT[0];
traceRayEXT(accEXT, 0u, 1u, 2u, 3u, 0u, vec3(0.5f), 0.5f, vec3(1.0f), 0.75f, 1); traceRayEXT(accEXT, 0u, 1u, 2u, 3u, 0u, vec3(0.5f), 0.5f, vec3(1.0f), 0.75f, 1);
} }

2
glslang/Include/BaseTypes.h Normal file → Executable file
View File

@ -325,6 +325,8 @@ enum TBuiltInVariable {
EbvWarpIDARM, EbvWarpIDARM,
EbvWarpMaxIDARM, EbvWarpMaxIDARM,
EbvPositionFetch,
EbvLast EbvLast
}; };

View File

@ -1090,6 +1090,9 @@ enum TOperator {
// Shader Clock Ops // Shader Clock Ops
EOpReadClockSubgroupKHR, EOpReadClockSubgroupKHR,
EOpReadClockDeviceKHR, EOpReadClockDeviceKHR,
// GL_EXT_ray_tracing_position_fetch
EOpRayQueryGetIntersectionTriangleVertexPositionsEXT,
}; };
class TIntermTraverser; class TIntermTraverser;

8
glslang/MachineIndependent/Initialize.cpp Normal file → Executable file
View File

@ -4551,7 +4551,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
} }
// Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query/ // Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query/
// GL_NV_shader_invocation_reorder // GL_NV_shader_invocation_reorder/GL_KHR_ray_tracing_position_Fetch
if (profile != EEsProfile && version >= 460) { if (profile != EEsProfile && version >= 460) {
commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);" commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);"
"void rayQueryTerminateEXT(rayQueryEXT);" "void rayQueryTerminateEXT(rayQueryEXT);"
@ -4576,6 +4576,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"vec3 rayQueryGetIntersectionObjectRayOriginEXT(rayQueryEXT, bool);" "vec3 rayQueryGetIntersectionObjectRayOriginEXT(rayQueryEXT, bool);"
"mat4x3 rayQueryGetIntersectionObjectToWorldEXT(rayQueryEXT, bool);" "mat4x3 rayQueryGetIntersectionObjectToWorldEXT(rayQueryEXT, bool);"
"mat4x3 rayQueryGetIntersectionWorldToObjectEXT(rayQueryEXT, bool);" "mat4x3 rayQueryGetIntersectionWorldToObjectEXT(rayQueryEXT, bool);"
"void rayQueryGetIntersectionTriangleVertexPositionsEXT(rayQueryEXT, bool, out vec3[3]);"
"\n"); "\n");
stageBuiltins[EShLangRayGen].append( stageBuiltins[EShLangRayGen].append(
@ -6018,6 +6019,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in uint gl_IncomingRayFlagsEXT;" "in uint gl_IncomingRayFlagsEXT;"
"in float gl_CurrentRayTimeNV;" "in float gl_CurrentRayTimeNV;"
"in uint gl_CullMaskEXT;" "in uint gl_CullMaskEXT;"
"in vec3 gl_HitTriangleVertexPositionsEXT[3];"
"\n"; "\n";
const char *missDecls = const char *missDecls =
"in uvec3 gl_LaunchIDNV;" "in uvec3 gl_LaunchIDNV;"
@ -8235,6 +8237,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("rayQueryGetIntersectionWorldToObjectEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionWorldToObjectEXT", 1, &E_GL_EXT_ray_query);
symbolTable.setFunctionExtensions("rayQueryGetWorldRayOriginEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetWorldRayOriginEXT", 1, &E_GL_EXT_ray_query);
symbolTable.setFunctionExtensions("rayQueryGetWorldRayDirectionEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetWorldRayDirectionEXT", 1, &E_GL_EXT_ray_query);
symbolTable.setFunctionExtensions("rayQueryGetIntersectionTriangleVertexPositionsEXT", 1, &E_GL_EXT_ray_tracing_position_fetch);
symbolTable.setVariableExtensions("gl_RayFlagsSkipAABBEXT", 1, &E_GL_EXT_ray_flags_primitive_culling); symbolTable.setVariableExtensions("gl_RayFlagsSkipAABBEXT", 1, &E_GL_EXT_ray_flags_primitive_culling);
symbolTable.setVariableExtensions("gl_RayFlagsSkipTrianglesEXT", 1, &E_GL_EXT_ray_flags_primitive_culling); symbolTable.setVariableExtensions("gl_RayFlagsSkipTrianglesEXT", 1, &E_GL_EXT_ray_flags_primitive_culling);
symbolTable.setVariableExtensions("gl_RayFlagsForceOpacityMicromap2StateEXT", 1, &E_GL_EXT_opacity_micromap); symbolTable.setVariableExtensions("gl_RayFlagsForceOpacityMicromap2StateEXT", 1, &E_GL_EXT_opacity_micromap);
@ -8932,6 +8935,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setVariableExtensions("gl_IncomingRayFlagsNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_IncomingRayFlagsNV", 1, &E_GL_NV_ray_tracing);
symbolTable.setVariableExtensions("gl_IncomingRayFlagsEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_IncomingRayFlagsEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_CurrentRayTimeNV", 1, &E_GL_NV_ray_tracing_motion_blur); symbolTable.setVariableExtensions("gl_CurrentRayTimeNV", 1, &E_GL_NV_ray_tracing_motion_blur);
symbolTable.setVariableExtensions("gl_HitTriangleVertexPositionsEXT", 1, &E_GL_EXT_ray_tracing_position_fetch);
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
@ -9015,6 +9019,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_IncomingRayFlagsEXT", EbvIncomingRayFlags, symbolTable); BuiltInVariable("gl_IncomingRayFlagsEXT", EbvIncomingRayFlags, symbolTable);
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
BuiltInVariable("gl_CurrentRayTimeNV", EbvCurrentRayTimeNV, symbolTable); BuiltInVariable("gl_CurrentRayTimeNV", EbvCurrentRayTimeNV, symbolTable);
BuiltInVariable("gl_HitTriangleVertexPositionsEXT", EbvPositionFetch, symbolTable);
// GL_ARB_shader_ballot // GL_ARB_shader_ballot
symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot);
@ -9939,6 +9944,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("rayQueryGetWorldRayOriginEXT", EOpRayQueryGetWorldRayOrigin); symbolTable.relateToOperator("rayQueryGetWorldRayOriginEXT", EOpRayQueryGetWorldRayOrigin);
symbolTable.relateToOperator("rayQueryGetIntersectionObjectToWorldEXT", EOpRayQueryGetIntersectionObjectToWorld); symbolTable.relateToOperator("rayQueryGetIntersectionObjectToWorldEXT", EOpRayQueryGetIntersectionObjectToWorld);
symbolTable.relateToOperator("rayQueryGetIntersectionWorldToObjectEXT", EOpRayQueryGetIntersectionWorldToObject); symbolTable.relateToOperator("rayQueryGetIntersectionWorldToObjectEXT", EOpRayQueryGetIntersectionWorldToObject);
symbolTable.relateToOperator("rayQueryGetIntersectionTriangleVertexPositionsEXT", EOpRayQueryGetIntersectionTriangleVertexPositionsEXT);
} }
symbolTable.relateToOperator("interpolateAtCentroid", EOpInterpolateAtCentroid); symbolTable.relateToOperator("interpolateAtCentroid", EOpInterpolateAtCentroid);

View File

@ -2467,6 +2467,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
case EOpRayQueryGetIntersectionObjectRayOrigin: case EOpRayQueryGetIntersectionObjectRayOrigin:
case EOpRayQueryGetIntersectionObjectToWorld: case EOpRayQueryGetIntersectionObjectToWorld:
case EOpRayQueryGetIntersectionWorldToObject: case EOpRayQueryGetIntersectionWorldToObject:
case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT:
if (!(*argp)[1]->getAsConstantUnion()) if (!(*argp)[1]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "committed", ""); error(loc, "argument must be compile-time constant", "committed", "");
break; break;

View File

@ -354,6 +354,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_EXT_spirv_intrinsics] = EBhDisable; extensionBehavior[E_GL_EXT_spirv_intrinsics] = EBhDisable;
extensionBehavior[E_GL_EXT_mesh_shader] = EBhDisable; extensionBehavior[E_GL_EXT_mesh_shader] = EBhDisable;
extensionBehavior[E_GL_EXT_opacity_micromap] = EBhDisable; extensionBehavior[E_GL_EXT_opacity_micromap] = EBhDisable;
extensionBehavior[E_GL_EXT_ray_tracing_position_fetch] = EBhDisable;
// OVR extensions // OVR extensions
extensionBehavior[E_GL_OVR_multiview] = EBhDisable; extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
@ -522,6 +523,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_EXT_ray_query 1\n" "#define GL_EXT_ray_query 1\n"
"#define GL_EXT_ray_flags_primitive_culling 1\n" "#define GL_EXT_ray_flags_primitive_culling 1\n"
"#define GL_EXT_ray_cull_mask 1\n" "#define GL_EXT_ray_cull_mask 1\n"
"#define GL_EXT_ray_tracing_position_fetch 1\n"
"#define GL_EXT_spirv_intrinsics 1\n" "#define GL_EXT_spirv_intrinsics 1\n"
"#define GL_EXT_mesh_shader 1\n" "#define GL_EXT_mesh_shader 1\n"

1
glslang/MachineIndependent/Versions.h Normal file → Executable file
View File

@ -265,6 +265,7 @@ const char* const E_GL_NV_fragment_shader_barycentric = "GL_NV_fragmen
const char* const E_GL_NV_compute_shader_derivatives = "GL_NV_compute_shader_derivatives"; const char* const E_GL_NV_compute_shader_derivatives = "GL_NV_compute_shader_derivatives";
const char* const E_GL_NV_shader_texture_footprint = "GL_NV_shader_texture_footprint"; const char* const E_GL_NV_shader_texture_footprint = "GL_NV_shader_texture_footprint";
const char* const E_GL_NV_mesh_shader = "GL_NV_mesh_shader"; const char* const E_GL_NV_mesh_shader = "GL_NV_mesh_shader";
const char* const E_GL_EXT_ray_tracing_position_fetch = "GL_EXT_ray_tracing_position_fetch";
// ARM // ARM
const char* const E_GL_ARM_shader_core_builtins = "GL_ARM_shader_core_builtins"; const char* const E_GL_ARM_shader_core_builtins = "GL_ARM_shader_core_builtins";

View File

@ -1097,6 +1097,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpRayQueryGetWorldRayOrigin: out.debug << "rayQueryGetWorldRayOriginEXT"; break; case EOpRayQueryGetWorldRayOrigin: out.debug << "rayQueryGetWorldRayOriginEXT"; break;
case EOpRayQueryGetIntersectionObjectToWorld: out.debug << "rayQueryGetIntersectionObjectToWorldEXT"; break; case EOpRayQueryGetIntersectionObjectToWorld: out.debug << "rayQueryGetIntersectionObjectToWorldEXT"; break;
case EOpRayQueryGetIntersectionWorldToObject: out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break; case EOpRayQueryGetIntersectionWorldToObject: out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break;
case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: out.debug << "rayQueryGetIntersectionTriangleVertexPositionsEXT"; break;
case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix"; break; case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix"; break;
case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix"; break; case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix"; break;

View File

@ -5,14 +5,14 @@
"site" : "github", "site" : "github",
"subrepo" : "KhronosGroup/SPIRV-Tools", "subrepo" : "KhronosGroup/SPIRV-Tools",
"subdir" : "External/spirv-tools", "subdir" : "External/spirv-tools",
"commit" : "44d72a9b36702f093dd20815561a56778b2d181e" "commit" : "baa46e103695080f56ac72847993f4ee9151cf63"
}, },
{ {
"name" : "spirv-tools/external/spirv-headers", "name" : "spirv-tools/external/spirv-headers",
"site" : "github", "site" : "github",
"subrepo" : "KhronosGroup/SPIRV-Headers", "subrepo" : "KhronosGroup/SPIRV-Headers",
"subdir" : "External/spirv-tools/external/spirv-headers", "subdir" : "External/spirv-tools/external/spirv-headers",
"commit" : "1feaf4414eb2b353764d01d88f8aa4bcc67b60db" "commit" : "7f1d2f4158704337aff1f739c8e494afc5716e7e"
} }
] ]
} }