Updates for final Vulkan ray tracing extensions (#2466)

* Fix traceRay/executeCallable to have id instead of constant.

Update to final (non-provisional) SPIR-V capabilities
(includes review feedback)
- Change visibilty of findLinkerObjects.

See merge request GLSL/glslang!78

* Add support for OpConvertUToAccelerationStructureKHR.

GLSL : https://gitlab.khronos.org/GLSL/GLSL/-/merge_requests/60

SPV : https://gitlab.khronos.org/spirv/spirv-extensions/-/merge_requests/182

See merge request GLSL/glslang!77

* Add volatile qualifier to certain builtins for ray tracing.

See merge request GLSL/glslang!81

* make gl_RayTmaxEXT volatile in intersection shader

Vulkan Issue #2268

* Add testing for layouts on SBT

vulkan/vulkan#2230

- no layout specified should be same as std430
- explicitly test std140, std430, scalar layouts

See merge request GLSL/glslang!86

* Support for new opcodes OpIgnoreIntersectionKHR and OpTerminateRayKHR

vulkan/vulkan#2374

Add support for ignoreIntersectionEXT and terminateRayEXT as block
terminator statements.

See merge request GLSL/glslang!87

* Fix code-generation issues with global ray query variables

See merge request GLSL/glslang!88

* update dependencies for spirv-headers and tools

And update mesh shader results

* Fix indeterminate argument ordering

Authored-by: David Neto <dneto@google.com>

Co-authored-by: Ashwin Lele (NVIDIA Corporation) <alele@nvidia.com>
Co-authored-by: Neslisah <Neslisah.Torosdagli@amd.com>
This commit is contained in:
Daniel Koch 2020-11-23 15:41:27 -05:00 committed by GitHub
parent 7f6559d280
commit ffccefddfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
76 changed files with 4951 additions and 3663 deletions

View File

@ -190,6 +190,7 @@ protected:
bool originalParam(glslang::TStorageQualifier, const glslang::TType&, bool implicitThisParam); bool originalParam(glslang::TStorageQualifier, const glslang::TType&, bool implicitThisParam);
void makeFunctions(const glslang::TIntermSequence&); void makeFunctions(const glslang::TIntermSequence&);
void makeGlobalInitializers(const glslang::TIntermSequence&); void makeGlobalInitializers(const glslang::TIntermSequence&);
void collectRayTracingLinkerObjects();
void visitFunctions(const glslang::TIntermSequence&); void visitFunctions(const glslang::TIntermSequence&);
void handleFunctionEntry(const glslang::TIntermAggregate* node); void handleFunctionEntry(const glslang::TIntermAggregate* node);
void translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments, void translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments,
@ -273,6 +274,9 @@ protected:
// requiring local translation to and from SPIR-V type on every access. // requiring local translation to and from SPIR-V type on every access.
// Maps <builtin-variable-id -> AST-required-type-id> // Maps <builtin-variable-id -> AST-required-type-id>
std::unordered_map<spv::Id, spv::Id> forceType; std::unordered_map<spv::Id, spv::Id> forceType;
// Used later for generating OpTraceKHR/OpExecuteCallableKHR
std::unordered_map<unsigned int, glslang::TIntermSymbol *> locationToSymbol[2];
}; };
// //
@ -1232,7 +1236,7 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type) spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type)
{ {
if (type.getBasicType() == glslang::EbtRayQuery) if (type.getBasicType() == glslang::EbtRayQuery)
return spv::StorageClassFunction; return spv::StorageClassPrivate;
if (type.getQualifier().isPipeInput()) if (type.getQualifier().isPipeInput())
return spv::StorageClassInput; return spv::StorageClassInput;
if (type.getQualifier().isPipeOutput()) if (type.getQualifier().isPipeOutput())
@ -1501,7 +1505,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
} }
if (glslangIntermediate->getLayoutPrimitiveCulling()) { if (glslangIntermediate->getLayoutPrimitiveCulling()) {
builder.addCapability(spv::CapabilityRayTraversalPrimitiveCullingProvisionalKHR); builder.addCapability(spv::CapabilityRayTraversalPrimitiveCullingKHR);
} }
unsigned int mode; unsigned int mode;
@ -1668,7 +1672,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
{ {
auto& extensions = glslangIntermediate->getRequestedExtensions(); auto& extensions = glslangIntermediate->getRequestedExtensions();
if (extensions.find("GL_NV_ray_tracing") == extensions.end()) { if (extensions.find("GL_NV_ray_tracing") == extensions.end()) {
builder.addCapability(spv::CapabilityRayTracingProvisionalKHR); builder.addCapability(spv::CapabilityRayTracingKHR);
builder.addExtension("SPV_KHR_ray_tracing"); builder.addExtension("SPV_KHR_ray_tracing");
} }
else { else {
@ -2118,8 +2122,9 @@ std::pair<spv::Id, spv::Id> TGlslangToSpvTraverser::getForcedType(glslang::TBuil
// these require changing a 64-bit scaler -> a vector of 32-bit components // these require changing a 64-bit scaler -> a vector of 32-bit components
if (glslangType.isVector()) if (glslangType.isVector())
break; break;
std::pair<spv::Id, spv::Id> ret(builder.makeVectorType(builder.makeUintType(32), 4), spv::Id ivec4_type = builder.makeVectorType(builder.makeUintType(32), 4);
builder.makeUintType(64)); spv::Id uint64_type = builder.makeUintType(64);
std::pair<spv::Id, spv::Id> ret(ivec4_type, uint64_type);
return ret; return ret;
} }
// There are no SPIR-V builtins defined for these and map onto original non-transposed // There are no SPIR-V builtins defined for these and map onto original non-transposed
@ -2490,6 +2495,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
// anything else gets there, so visit out of order, doing them all now. // anything else gets there, so visit out of order, doing them all now.
makeGlobalInitializers(node->getAsAggregate()->getSequence()); makeGlobalInitializers(node->getAsAggregate()->getSequence());
//Pre process linker objects for ray tracing stages
if (glslangIntermediate->isRayTracingStage())
collectRayTracingLinkerObjects();
// Initializers are done, don't want to visit again, but functions and link objects need to be processed, // Initializers are done, don't want to visit again, but functions and link objects need to be processed,
// so do them manually. // so do them manually.
visitFunctions(node->getAsAggregate()->getSequence()); visitFunctions(node->getAsAggregate()->getSequence());
@ -2799,10 +2808,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
binOp = node->getOp(); binOp = node->getOp();
break; break;
case glslang::EOpIgnoreIntersection: case glslang::EOpIgnoreIntersectionNV:
case glslang::EOpTerminateRay: case glslang::EOpTerminateRayNV:
case glslang::EOpTrace: case glslang::EOpTraceNV:
case glslang::EOpExecuteCallable: case glslang::EOpTraceKHR:
case glslang::EOpExecuteCallableNV:
case glslang::EOpExecuteCallableKHR:
case glslang::EOpWritePackedPrimitiveIndices4x8NV: case glslang::EOpWritePackedPrimitiveIndices4x8NV:
noReturnValue = true; noReturnValue = true;
break; break;
@ -2811,7 +2822,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case glslang::EOpRayQueryGenerateIntersection: case glslang::EOpRayQueryGenerateIntersection:
case glslang::EOpRayQueryConfirmIntersection: case glslang::EOpRayQueryConfirmIntersection:
builder.addExtension("SPV_KHR_ray_query"); builder.addExtension("SPV_KHR_ray_query");
builder.addCapability(spv::CapabilityRayQueryProvisionalKHR); builder.addCapability(spv::CapabilityRayQueryKHR);
noReturnValue = true; noReturnValue = true;
break; break;
case glslang::EOpRayQueryProceed: case glslang::EOpRayQueryProceed:
@ -2834,7 +2845,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case glslang::EOpRayQueryGetIntersectionObjectToWorld: case glslang::EOpRayQueryGetIntersectionObjectToWorld:
case glslang::EOpRayQueryGetIntersectionWorldToObject: case glslang::EOpRayQueryGetIntersectionWorldToObject:
builder.addExtension("SPV_KHR_ray_query"); builder.addExtension("SPV_KHR_ray_query");
builder.addCapability(spv::CapabilityRayQueryProvisionalKHR); builder.addCapability(spv::CapabilityRayQueryKHR);
break; break;
case glslang::EOpCooperativeMatrixLoad: case glslang::EOpCooperativeMatrixLoad:
case glslang::EOpCooperativeMatrixStore: case glslang::EOpCooperativeMatrixStore:
@ -3087,11 +3098,18 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
)) { )) {
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));
} } else if ((arg == 10 && glslangOp == glslang::EOpTraceKHR) ||
else { (arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR)) {
const int opdNum = glslangOp == glslang::EOpTraceKHR ? 10 : 1;
const int set = glslangOp == glslang::EOpTraceKHR ? 0 : 1;
const int location = glslangOperands[opdNum]->getAsConstantUnion()->getConstArray()[0].getUConst();
auto itNode = locationToSymbol[set].find(location);
visitSymbol(itNode->second);
spv::Id symId = getSymbolId(itNode->second);
operands.push_back(symId);
} else {
operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType())); operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType()));
} }
} }
} }
@ -3494,11 +3512,11 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T
switch (node->getFlowOp()) { switch (node->getFlowOp()) {
case glslang::EOpKill: case glslang::EOpKill:
builder.makeDiscard(); builder.makeStatementTerminator(spv::OpKill, "post-discard");
break; break;
case glslang::EOpTerminateInvocation: case glslang::EOpTerminateInvocation:
builder.addExtension(spv::E_SPV_KHR_terminate_invocation); builder.addExtension(spv::E_SPV_KHR_terminate_invocation);
builder.makeTerminateInvocation(); builder.makeStatementTerminator(spv::OpTerminateInvocation, "post-terminate-invocation");
break; break;
case glslang::EOpBreak: case glslang::EOpBreak:
if (breakForLoop.top()) if (breakForLoop.top())
@ -3535,6 +3553,12 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T
builder.addExtension(spv::E_SPV_EXT_demote_to_helper_invocation); builder.addExtension(spv::E_SPV_EXT_demote_to_helper_invocation);
builder.addCapability(spv::CapabilityDemoteToHelperInvocationEXT); builder.addCapability(spv::CapabilityDemoteToHelperInvocationEXT);
break; break;
case glslang::EOpTerminateRayKHR:
builder.makeStatementTerminator(spv::OpTerminateRayKHR, "post-terminateRayKHR");
break;
case glslang::EOpIgnoreIntersectionKHR:
builder.makeStatementTerminator(spv::OpIgnoreIntersectionKHR, "post-ignoreIntersectionKHR");
break;
#endif #endif
default: default:
@ -4629,7 +4653,39 @@ void TGlslangToSpvTraverser::makeGlobalInitializers(const glslang::TIntermSequen
} }
} }
} }
// Walk over all linker objects to create a map for payload and callable data linker objects
// and their location to be used during codegen for OpTraceKHR and OpExecuteCallableKHR
// This is done here since it is possible that these linker objects are not be referenced in the AST
void TGlslangToSpvTraverser::collectRayTracingLinkerObjects()
{
glslang::TIntermAggregate* linkerObjects = glslangIntermediate->findLinkerObjects();
for (auto& objSeq : linkerObjects->getSequence()) {
auto objNode = objSeq->getAsSymbolNode();
if (objNode != nullptr) {
if (objNode->getQualifier().hasLocation()) {
unsigned int location = objNode->getQualifier().layoutLocation;
auto st = objNode->getQualifier().storage;
int set;
switch (st)
{
case glslang::EvqPayload:
case glslang::EvqPayloadIn:
set = 0;
break;
case glslang::EvqCallableData:
case glslang::EvqCallableDataIn:
set = 1;
break;
default:
set = -1;
}
if (set != -1)
locationToSymbol[set].insert(std::make_pair(location, objNode));
}
}
}
}
// Process all the functions, while skipping initializers. // Process all the functions, while skipping initializers.
void TGlslangToSpvTraverser::visitFunctions(const glslang::TIntermSequence& glslFunctions) void TGlslangToSpvTraverser::visitFunctions(const glslang::TIntermSequence& glslFunctions)
{ {
@ -6254,6 +6310,11 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
case glslang::EOpConstructReference: case glslang::EOpConstructReference:
unaryOp = spv::OpBitcast; unaryOp = spv::OpBitcast;
break; break;
case glslang::EOpConvUint64ToAccStruct:
case glslang::EOpConvUvec2ToAccStruct:
unaryOp = spv::OpConvertUToAccelerationStructureKHR;
break;
#endif #endif
case glslang::EOpCopyObject: case glslang::EOpCopyObject:
@ -7840,10 +7901,16 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
typeId = builder.makeBoolType(); typeId = builder.makeBoolType();
opCode = spv::OpReportIntersectionKHR; opCode = spv::OpReportIntersectionKHR;
break; break;
case glslang::EOpTrace: case glslang::EOpTraceNV:
builder.createNoResultOp(spv::OpTraceNV, operands);
return 0;
case glslang::EOpTraceKHR:
builder.createNoResultOp(spv::OpTraceRayKHR, operands); builder.createNoResultOp(spv::OpTraceRayKHR, operands);
return 0; return 0;
case glslang::EOpExecuteCallable: case glslang::EOpExecuteCallableNV:
builder.createNoResultOp(spv::OpExecuteCallableNV, operands);
return 0;
case glslang::EOpExecuteCallableKHR:
builder.createNoResultOp(spv::OpExecuteCallableKHR, operands); builder.createNoResultOp(spv::OpExecuteCallableKHR, operands);
return 0; return 0;
@ -8131,11 +8198,11 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
spv::Id id = builder.createBuiltinCall(typeId, getExtBuiltins(spv::E_SPV_AMD_gcn_shader), spv::TimeAMD, args); spv::Id id = builder.createBuiltinCall(typeId, getExtBuiltins(spv::E_SPV_AMD_gcn_shader), spv::TimeAMD, args);
return builder.setPrecision(id, precision); return builder.setPrecision(id, precision);
} }
case glslang::EOpIgnoreIntersection: case glslang::EOpIgnoreIntersectionNV:
builder.createNoResultOp(spv::OpIgnoreIntersectionKHR); builder.createNoResultOp(spv::OpIgnoreIntersectionNV);
return 0; return 0;
case glslang::EOpTerminateRay: case glslang::EOpTerminateRayNV:
builder.createNoResultOp(spv::OpTerminateRayKHR); builder.createNoResultOp(spv::OpTerminateRayNV);
return 0; return 0;
case glslang::EOpRayQueryInitialize: case glslang::EOpRayQueryInitialize:
builder.createNoResultOp(spv::OpRayQueryInitializeKHR); builder.createNoResultOp(spv::OpRayQueryInitializeKHR);
@ -8263,7 +8330,8 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
} }
#ifndef GLSLANG_WEB #ifndef GLSLANG_WEB
if (symbol->getType().isImage()) { // Subgroup builtins which have input storage class are volatile for ray tracing stages.
if (symbol->getType().isImage() || symbol->getQualifier().isPipeInput()) {
std::vector<spv::Decoration> memory; std::vector<spv::Decoration> memory;
TranslateMemoryDecoration(symbol->getType().getQualifier(), memory, TranslateMemoryDecoration(symbol->getType().getQualifier(), memory,
glslangIntermediate->usingVulkanMemoryModel()); glslangIntermediate->usingVulkanMemoryModel());

View File

@ -621,13 +621,13 @@ Id Builder::makeAccelerationStructureType()
Id Builder::makeRayQueryType() Id Builder::makeRayQueryType()
{ {
Instruction *type; Instruction *type;
if (groupedTypes[OpTypeRayQueryProvisionalKHR].size() == 0) { if (groupedTypes[OpTypeRayQueryKHR].size() == 0) {
type = new Instruction(getUniqueId(), NoType, OpTypeRayQueryProvisionalKHR); type = new Instruction(getUniqueId(), NoType, OpTypeRayQueryKHR);
groupedTypes[OpTypeRayQueryProvisionalKHR].push_back(type); groupedTypes[OpTypeRayQueryKHR].push_back(type);
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type)); constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
module.mapInstruction(type); module.mapInstruction(type);
} else { } else {
type = groupedTypes[OpTypeRayQueryProvisionalKHR].back(); type = groupedTypes[OpTypeRayQueryKHR].back();
} }
return type->getResultId(); return type->getResultId();
@ -1447,17 +1447,10 @@ void Builder::leaveFunction()
} }
// Comments in header // Comments in header
void Builder::makeDiscard() void Builder::makeStatementTerminator(spv::Op opcode, const char *name)
{ {
buildPoint->addInstruction(std::unique_ptr<Instruction>(new Instruction(OpKill))); buildPoint->addInstruction(std::unique_ptr<Instruction>(new Instruction(opcode)));
createAndSetNoPredecessorBlock("post-discard"); createAndSetNoPredecessorBlock(name);
}
// Comments in header
void Builder::makeTerminateInvocation()
{
buildPoint->addInstruction(std::unique_ptr<Instruction>(new Instruction(OpTerminateInvocation)));
createAndSetNoPredecessorBlock("post-terminate-invocation");
} }
// Comments in header // Comments in header

View File

@ -357,9 +357,9 @@ public:
// Generate all the code needed to finish up a function. // Generate all the code needed to finish up a function.
void leaveFunction(); void leaveFunction();
// Create a discard or terminate-invocation. // Create block terminator instruction for certain statements like
void makeDiscard(); // discard, terminate-invocation, terminateRayEXT, or ignoreIntersectionEXT
void makeTerminateInvocation(); void makeStatementTerminator(spv::Op opcode, const char *name);
// Create a global or function local or IO variable. // Create a global or function local or IO variable.
Id createVariable(Decoration precision, StorageClass, Id type, const char* name = nullptr, Id createVariable(Decoration precision, StorageClass, Id type, const char* name = nullptr,

View File

@ -915,9 +915,9 @@ const char* CapabilityString(int info)
case CapabilityPerViewAttributesNV: return "PerViewAttributesNV"; case CapabilityPerViewAttributesNV: return "PerViewAttributesNV";
case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV";
case CapabilityRayTracingNV: return "RayTracingNV"; case CapabilityRayTracingNV: return "RayTracingNV";
case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; case CapabilityRayTracingKHR: return "RayTracingKHR";
case CapabilityRayQueryProvisionalKHR: return "RayQueryProvisionalKHR"; case CapabilityRayQueryKHR: return "RayQueryKHR";
case CapabilityRayTraversalPrimitiveCullingProvisionalKHR: return "RayTraversalPrimitiveCullingProvisionalKHR"; case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR";
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV"; case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
@ -1364,17 +1364,23 @@ const char* OpcodeString(int op)
case OpDecorateStringGOOGLE: return "OpDecorateStringGOOGLE"; case OpDecorateStringGOOGLE: return "OpDecorateStringGOOGLE";
case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE"; case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE";
case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV";
case OpReportIntersectionKHR: return "OpReportIntersectionKHR"; case OpReportIntersectionKHR: return "OpReportIntersectionKHR";
case OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV";
case OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR"; case OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR";
case OpTerminateRayNV: return "OpTerminateRayNV";
case OpTerminateRayKHR: return "OpTerminateRayKHR"; case OpTerminateRayKHR: return "OpTerminateRayKHR";
case OpTraceNV: return "OpTraceNV";
case OpTraceRayKHR: return "OpTraceRayKHR"; case OpTraceRayKHR: return "OpTraceRayKHR";
case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR"; case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR";
case OpExecuteCallableNV: return "OpExecuteCallableNV";
case OpExecuteCallableKHR: return "OpExecuteCallableKHR"; case OpExecuteCallableKHR: return "OpExecuteCallableKHR";
case OpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR";
case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV";
case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV";
case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV"; case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
case OpTypeRayQueryProvisionalKHR: return "OpTypeRayQueryProvisionalKHR"; case OpTypeRayQueryKHR: return "OpTypeRayQueryProvisionalKHR";
case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR"; case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR";
case OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR"; case OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR";
case OpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR"; case OpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR";
@ -2771,7 +2777,20 @@ void Parameterize()
InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false); InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'NV Acceleration Structure'"); InstructionDesc[OpTraceNV].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Flags'");
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Cull Mask'");
InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Offset'");
InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Stride'");
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Miss Index'");
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Origin'");
InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMin'");
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Direction'");
InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMax'");
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'");
InstructionDesc[OpTraceNV].setResultAndType(false, false);
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'"); InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'");
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'"); InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'");
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'"); InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'");
@ -2787,17 +2806,28 @@ void Parameterize()
InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'"); InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'");
InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'"); InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'");
InstructionDesc[OpIgnoreIntersectionNV].setResultAndType(false, false);
InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false); InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false);
InstructionDesc[OpTerminateRayNV].setResultAndType(false, false);
InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false); InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false);
InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index");
InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID");
InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false);
InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index"); InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index");
InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData ID"); InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData");
InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false); InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false);
InstructionDesc[OpConvertUToAccelerationStructureKHR].operands.push(OperandId, "Value");
InstructionDesc[OpConvertUToAccelerationStructureKHR].setResultAndType(true, true);
// Ray Query // Ray Query
InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false); InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
InstructionDesc[OpTypeRayQueryProvisionalKHR].setResultAndType(true, false); InstructionDesc[OpTypeRayQueryKHR].setResultAndType(true, false);
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'"); InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'");
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'"); InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'");

View File

@ -50,11 +50,11 @@ namespace spv {
typedef unsigned int Id; typedef unsigned int Id;
#define SPV_VERSION 0x10500 #define SPV_VERSION 0x10500
#define SPV_REVISION 3 #define SPV_REVISION 4
static const unsigned int MagicNumber = 0x07230203; static const unsigned int MagicNumber = 0x07230203;
static const unsigned int Version = 0x00010500; static const unsigned int Version = 0x00010500;
static const unsigned int Revision = 3; static const unsigned int Revision = 4;
static const unsigned int OpCodeMask = 0xffff; static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16; static const unsigned int WordCountShift = 16;
@ -899,7 +899,9 @@ enum Capability {
CapabilityRoundingModeRTE = 4467, CapabilityRoundingModeRTE = 4467,
CapabilityRoundingModeRTZ = 4468, CapabilityRoundingModeRTZ = 4468,
CapabilityRayQueryProvisionalKHR = 4471, CapabilityRayQueryProvisionalKHR = 4471,
CapabilityRayTraversalPrimitiveCullingProvisionalKHR = 4478, CapabilityRayQueryKHR = 4472,
CapabilityRayTraversalPrimitiveCullingKHR = 4478,
CapabilityRayTracingKHR = 4479,
CapabilityFloat16ImageAMD = 5008, CapabilityFloat16ImageAMD = 5008,
CapabilityImageGatherBiasLodAMD = 5009, CapabilityImageGatherBiasLodAMD = 5009,
CapabilityFragmentMaskAMD = 5010, CapabilityFragmentMaskAMD = 5010,
@ -1398,7 +1400,12 @@ enum Op {
OpSubgroupAnyKHR = 4429, OpSubgroupAnyKHR = 4429,
OpSubgroupAllEqualKHR = 4430, OpSubgroupAllEqualKHR = 4430,
OpSubgroupReadInvocationKHR = 4432, OpSubgroupReadInvocationKHR = 4432,
OpTypeRayQueryProvisionalKHR = 4472, OpTraceRayKHR = 4445,
OpExecuteCallableKHR = 4446,
OpConvertUToAccelerationStructureKHR = 4447,
OpIgnoreIntersectionKHR = 4448,
OpTerminateRayKHR = 4449,
OpTypeRayQueryKHR = 4472,
OpRayQueryInitializeKHR = 4473, OpRayQueryInitializeKHR = 4473,
OpRayQueryTerminateKHR = 4474, OpRayQueryTerminateKHR = 4474,
OpRayQueryGenerateIntersectionKHR = 4475, OpRayQueryGenerateIntersectionKHR = 4475,
@ -1421,15 +1428,11 @@ enum Op {
OpWritePackedPrimitiveIndices4x8NV = 5299, OpWritePackedPrimitiveIndices4x8NV = 5299,
OpReportIntersectionKHR = 5334, OpReportIntersectionKHR = 5334,
OpReportIntersectionNV = 5334, OpReportIntersectionNV = 5334,
OpIgnoreIntersectionKHR = 5335,
OpIgnoreIntersectionNV = 5335, OpIgnoreIntersectionNV = 5335,
OpTerminateRayKHR = 5336,
OpTerminateRayNV = 5336, OpTerminateRayNV = 5336,
OpTraceNV = 5337, OpTraceNV = 5337,
OpTraceRayKHR = 5337,
OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341, OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableKHR = 5344,
OpExecuteCallableNV = 5344, OpExecuteCallableNV = 5344,
OpTypeCooperativeMatrixNV = 5358, OpTypeCooperativeMatrixNV = 5358,
OpCooperativeMatrixLoadNV = 5359, OpCooperativeMatrixLoadNV = 5359,
@ -1849,7 +1852,6 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpBranchConditional: *hasResult = false; *hasResultType = false; break; case OpBranchConditional: *hasResult = false; *hasResultType = false; break;
case OpSwitch: *hasResult = false; *hasResultType = false; break; case OpSwitch: *hasResult = false; *hasResultType = false; break;
case OpKill: *hasResult = false; *hasResultType = false; break; case OpKill: *hasResult = false; *hasResultType = false; break;
case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break;
case OpReturn: *hasResult = false; *hasResultType = false; break; case OpReturn: *hasResult = false; *hasResultType = false; break;
case OpReturnValue: *hasResult = false; *hasResultType = false; break; case OpReturnValue: *hasResult = false; *hasResultType = false; break;
case OpUnreachable: *hasResult = false; *hasResultType = false; break; case OpUnreachable: *hasResult = false; *hasResultType = false; break;
@ -1970,7 +1972,12 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
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 OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
case OpTypeRayQueryProvisionalKHR: *hasResult = true; *hasResultType = false; break; case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break;
case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break;
case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break;
case OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break;
case OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break;
case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break;

View File

@ -109,8 +109,8 @@ ERROR: node is still EOpNull!
0:4 Function Parameters: 0:4 Function Parameters:
0:4 'f4' ( in 4-component vector of float) 0:4 'f4' ( in 4-component vector of float)
0:? Sequence 0:? Sequence
0:7 'gl_SubgroupSize' ( in uint SubgroupSize) 0:7 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
0:8 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) 0:8 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
0:9 subgroupBarrier ( global void) 0:9 subgroupBarrier ( global void)
0:10 subgroupMemoryBarrier ( global void) 0:10 subgroupMemoryBarrier ( global void)
0:11 subgroupMemoryBarrierBuffer ( global void) 0:11 subgroupMemoryBarrierBuffer ( global void)
@ -128,11 +128,11 @@ ERROR: node is still EOpNull!
0:19 false (const bool) 0:19 false (const bool)
0:20 subgroupAllEqual ( global bool) 0:20 subgroupAllEqual ( global bool)
0:20 'f4' ( in 4-component vector of float) 0:20 'f4' ( in 4-component vector of float)
0:22 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) 0:22 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
0:23 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) 0:23 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
0:24 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) 0:24 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
0:25 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) 0:25 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
0:26 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) 0:26 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
0:27 subgroupBroadcast ( global 4-component vector of float) 0:27 subgroupBroadcast ( global 4-component vector of float)
0:27 'f4' ( in 4-component vector of float) 0:27 'f4' ( in 4-component vector of float)
0:27 Constant: 0:27 Constant:
@ -359,8 +359,8 @@ ERROR: node is still EOpNull!
0:119 Function Definition: basic_works( ( global void) 0:119 Function Definition: basic_works( ( global void)
0:119 Function Parameters: 0:119 Function Parameters:
0:121 Sequence 0:121 Sequence
0:121 'gl_SubgroupSize' ( in uint SubgroupSize) 0:121 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
0:122 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) 0:122 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
0:123 subgroupBarrier ( global void) 0:123 subgroupBarrier ( global void)
0:124 subgroupMemoryBarrier ( global void) 0:124 subgroupMemoryBarrier ( global void)
0:125 subgroupMemoryBarrierBuffer ( global void) 0:125 subgroupMemoryBarrierBuffer ( global void)
@ -370,11 +370,11 @@ ERROR: node is still EOpNull!
0:131 Function Parameters: 0:131 Function Parameters:
0:131 'f4' ( in 4-component vector of float) 0:131 'f4' ( in 4-component vector of float)
0:132 Sequence 0:132 Sequence
0:132 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) 0:132 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
0:133 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) 0:133 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
0:134 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) 0:134 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
0:135 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) 0:135 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
0:136 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) 0:136 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
0:137 subgroupBroadcast ( global 4-component vector of float) 0:137 subgroupBroadcast ( global 4-component vector of float)
0:137 'f4' ( in 4-component vector of float) 0:137 'f4' ( in 4-component vector of float)
0:137 Constant: 0:137 Constant:
@ -624,15 +624,15 @@ ERROR: node is still EOpNull!
0:247 Sequence 0:247 Sequence
0:247 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV) 0:247 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
0:248 'gl_SMCountNV' ( in uint SMCountNV) 0:248 'gl_SMCountNV' ( in uint SMCountNV)
0:249 'gl_WarpIDNV' ( in uint WarpIDNV) 0:249 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
0:250 'gl_SMIDNV' ( in uint SMIDNV) 0:250 'gl_SMIDNV' ( volatile in uint SMIDNV)
0:257 Function Definition: sm_builtins( ( global void) 0:257 Function Definition: sm_builtins( ( global void)
0:257 Function Parameters: 0:257 Function Parameters:
0:259 Sequence 0:259 Sequence
0:259 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV) 0:259 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
0:260 'gl_SMCountNV' ( in uint SMCountNV) 0:260 'gl_SMCountNV' ( in uint SMCountNV)
0:261 'gl_WarpIDNV' ( in uint WarpIDNV) 0:261 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
0:262 'gl_SMIDNV' ( in uint SMIDNV) 0:262 'gl_SMIDNV' ( volatile in uint SMIDNV)
0:? Linker Objects 0:? Linker Objects
0:? 'data0' (layout( location=0) callableDataNV 4-component vector of float) 0:? 'data0' (layout( location=0) callableDataNV 4-component vector of float)
0:? 'anon@0' (layout( location=1) callableDataInNV block{ callableDataInNV uint data1}) 0:? 'anon@0' (layout( location=1) callableDataInNV block{ callableDataInNV uint data1})

View File

@ -109,8 +109,8 @@ ERROR: node is still EOpNull!
0:4 Function Parameters: 0:4 Function Parameters:
0:4 'f4' ( in 4-component vector of float) 0:4 'f4' ( in 4-component vector of float)
0:? Sequence 0:? Sequence
0:7 'gl_SubgroupSize' ( in uint SubgroupSize) 0:7 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
0:8 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) 0:8 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
0:9 subgroupBarrier ( global void) 0:9 subgroupBarrier ( global void)
0:10 subgroupMemoryBarrier ( global void) 0:10 subgroupMemoryBarrier ( global void)
0:11 subgroupMemoryBarrierBuffer ( global void) 0:11 subgroupMemoryBarrierBuffer ( global void)
@ -128,11 +128,11 @@ ERROR: node is still EOpNull!
0:19 false (const bool) 0:19 false (const bool)
0:20 subgroupAllEqual ( global bool) 0:20 subgroupAllEqual ( global bool)
0:20 'f4' ( in 4-component vector of float) 0:20 'f4' ( in 4-component vector of float)
0:22 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) 0:22 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
0:23 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) 0:23 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
0:24 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) 0:24 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
0:25 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) 0:25 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
0:26 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) 0:26 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
0:27 subgroupBroadcast ( global 4-component vector of float) 0:27 subgroupBroadcast ( global 4-component vector of float)
0:27 'f4' ( in 4-component vector of float) 0:27 'f4' ( in 4-component vector of float)
0:27 Constant: 0:27 Constant:
@ -425,8 +425,8 @@ ERROR: node is still EOpNull!
0:129 Function Definition: basic_works( ( global void) 0:129 Function Definition: basic_works( ( global void)
0:129 Function Parameters: 0:129 Function Parameters:
0:131 Sequence 0:131 Sequence
0:131 'gl_SubgroupSize' ( in uint SubgroupSize) 0:131 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
0:132 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) 0:132 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
0:133 subgroupBarrier ( global void) 0:133 subgroupBarrier ( global void)
0:134 subgroupMemoryBarrier ( global void) 0:134 subgroupMemoryBarrier ( global void)
0:135 subgroupMemoryBarrierBuffer ( global void) 0:135 subgroupMemoryBarrierBuffer ( global void)
@ -436,11 +436,11 @@ ERROR: node is still EOpNull!
0:141 Function Parameters: 0:141 Function Parameters:
0:141 'f4' ( in 4-component vector of float) 0:141 'f4' ( in 4-component vector of float)
0:142 Sequence 0:142 Sequence
0:142 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) 0:142 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
0:143 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) 0:143 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
0:144 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) 0:144 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
0:145 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) 0:145 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
0:146 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) 0:146 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
0:147 subgroupBroadcast ( global 4-component vector of float) 0:147 subgroupBroadcast ( global 4-component vector of float)
0:147 'f4' ( in 4-component vector of float) 0:147 'f4' ( in 4-component vector of float)
0:147 Constant: 0:147 Constant:
@ -690,15 +690,15 @@ ERROR: node is still EOpNull!
0:257 Sequence 0:257 Sequence
0:257 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV) 0:257 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
0:258 'gl_SMCountNV' ( in uint SMCountNV) 0:258 'gl_SMCountNV' ( in uint SMCountNV)
0:259 'gl_WarpIDNV' ( in uint WarpIDNV) 0:259 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
0:260 'gl_SMIDNV' ( in uint SMIDNV) 0:260 'gl_SMIDNV' ( volatile in uint SMIDNV)
0:267 Function Definition: sm_builtins( ( global void) 0:267 Function Definition: sm_builtins( ( global void)
0:267 Function Parameters: 0:267 Function Parameters:
0:269 Sequence 0:269 Sequence
0:269 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV) 0:269 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
0:270 'gl_SMCountNV' ( in uint SMCountNV) 0:270 'gl_SMCountNV' ( in uint SMCountNV)
0:271 'gl_WarpIDNV' ( in uint WarpIDNV) 0:271 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
0:272 'gl_SMIDNV' ( in uint SMIDNV) 0:272 'gl_SMIDNV' ( volatile in uint SMIDNV)
0:? Linker Objects 0:? Linker Objects
0:? 'accNV' (layout( set=0 binding=0) uniform accelerationStructureNV) 0:? 'accNV' (layout( set=0 binding=0) uniform accelerationStructureNV)
0:? 'localPayload' (layout( location=0) rayPayloadNV 4-component vector of float) 0:? 'localPayload' (layout( location=0) rayPayloadNV 4-component vector of float)

View File

@ -109,8 +109,8 @@ ERROR: node is still EOpNull!
0:4 Function Parameters: 0:4 Function Parameters:
0:4 'f4' ( in 4-component vector of float) 0:4 'f4' ( in 4-component vector of float)
0:? Sequence 0:? Sequence
0:7 'gl_SubgroupSize' ( in uint SubgroupSize) 0:7 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
0:8 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) 0:8 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
0:9 subgroupBarrier ( global void) 0:9 subgroupBarrier ( global void)
0:10 subgroupMemoryBarrier ( global void) 0:10 subgroupMemoryBarrier ( global void)
0:11 subgroupMemoryBarrierBuffer ( global void) 0:11 subgroupMemoryBarrierBuffer ( global void)
@ -128,11 +128,11 @@ ERROR: node is still EOpNull!
0:19 false (const bool) 0:19 false (const bool)
0:20 subgroupAllEqual ( global bool) 0:20 subgroupAllEqual ( global bool)
0:20 'f4' ( in 4-component vector of float) 0:20 'f4' ( in 4-component vector of float)
0:22 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) 0:22 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
0:23 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) 0:23 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
0:24 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) 0:24 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
0:25 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) 0:25 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
0:26 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) 0:26 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
0:27 subgroupBroadcast ( global 4-component vector of float) 0:27 subgroupBroadcast ( global 4-component vector of float)
0:27 'f4' ( in 4-component vector of float) 0:27 'f4' ( in 4-component vector of float)
0:27 Constant: 0:27 Constant:
@ -389,8 +389,8 @@ ERROR: node is still EOpNull!
0:123 Function Definition: basic_works( ( global void) 0:123 Function Definition: basic_works( ( global void)
0:123 Function Parameters: 0:123 Function Parameters:
0:125 Sequence 0:125 Sequence
0:125 'gl_SubgroupSize' ( in uint SubgroupSize) 0:125 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
0:126 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) 0:126 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
0:127 subgroupBarrier ( global void) 0:127 subgroupBarrier ( global void)
0:128 subgroupMemoryBarrier ( global void) 0:128 subgroupMemoryBarrier ( global void)
0:129 subgroupMemoryBarrierBuffer ( global void) 0:129 subgroupMemoryBarrierBuffer ( global void)
@ -400,11 +400,11 @@ ERROR: node is still EOpNull!
0:135 Function Parameters: 0:135 Function Parameters:
0:135 'f4' ( in 4-component vector of float) 0:135 'f4' ( in 4-component vector of float)
0:136 Sequence 0:136 Sequence
0:136 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) 0:136 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
0:137 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) 0:137 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
0:138 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) 0:138 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
0:139 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) 0:139 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
0:140 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) 0:140 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
0:141 subgroupBroadcast ( global 4-component vector of float) 0:141 subgroupBroadcast ( global 4-component vector of float)
0:141 'f4' ( in 4-component vector of float) 0:141 'f4' ( in 4-component vector of float)
0:141 Constant: 0:141 Constant:
@ -654,15 +654,15 @@ ERROR: node is still EOpNull!
0:251 Sequence 0:251 Sequence
0:251 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV) 0:251 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
0:252 'gl_SMCountNV' ( in uint SMCountNV) 0:252 'gl_SMCountNV' ( in uint SMCountNV)
0:253 'gl_WarpIDNV' ( in uint WarpIDNV) 0:253 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
0:254 'gl_SMIDNV' ( in uint SMIDNV) 0:254 'gl_SMIDNV' ( volatile in uint SMIDNV)
0:261 Function Definition: sm_builtins( ( global void) 0:261 Function Definition: sm_builtins( ( global void)
0:261 Function Parameters: 0:261 Function Parameters:
0:263 Sequence 0:263 Sequence
0:263 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV) 0:263 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
0:264 'gl_SMCountNV' ( in uint SMCountNV) 0:264 'gl_SMCountNV' ( in uint SMCountNV)
0:265 'gl_WarpIDNV' ( in uint WarpIDNV) 0:265 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
0:266 'gl_SMIDNV' ( in uint SMIDNV) 0:266 'gl_SMIDNV' ( volatile in uint SMIDNV)
0:? Linker Objects 0:? Linker Objects
0:? 'accNV0' (layout( set=0 binding=0) uniform accelerationStructureNV) 0:? 'accNV0' (layout( set=0 binding=0) uniform accelerationStructureNV)
0:? 'accNV1' (layout( set=0 binding=1) uniform accelerationStructureNV) 0:? 'accNV1' (layout( set=0 binding=1) uniform accelerationStructureNV)

View File

@ -109,8 +109,8 @@ ERROR: node is still EOpNull!
0:5 Function Parameters: 0:5 Function Parameters:
0:5 'f4' ( in 4-component vector of float) 0:5 'f4' ( in 4-component vector of float)
0:? Sequence 0:? Sequence
0:8 'gl_SubgroupSize' ( in uint SubgroupSize) 0:8 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
0:9 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) 0:9 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
0:10 subgroupBarrier ( global void) 0:10 subgroupBarrier ( global void)
0:11 subgroupMemoryBarrier ( global void) 0:11 subgroupMemoryBarrier ( global void)
0:12 subgroupMemoryBarrierBuffer ( global void) 0:12 subgroupMemoryBarrierBuffer ( global void)
@ -128,11 +128,11 @@ ERROR: node is still EOpNull!
0:20 false (const bool) 0:20 false (const bool)
0:21 subgroupAllEqual ( global bool) 0:21 subgroupAllEqual ( global bool)
0:21 'f4' ( in 4-component vector of float) 0:21 'f4' ( in 4-component vector of float)
0:23 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) 0:23 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
0:24 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) 0:24 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
0:25 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) 0:25 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
0:26 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) 0:26 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
0:27 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) 0:27 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
0:28 subgroupBroadcast ( global 4-component vector of float) 0:28 subgroupBroadcast ( global 4-component vector of float)
0:28 'f4' ( in 4-component vector of float) 0:28 'f4' ( in 4-component vector of float)
0:28 Constant: 0:28 Constant:
@ -403,8 +403,8 @@ ERROR: node is still EOpNull!
0:129 Function Definition: basic_works( ( global void) 0:129 Function Definition: basic_works( ( global void)
0:129 Function Parameters: 0:129 Function Parameters:
0:131 Sequence 0:131 Sequence
0:131 'gl_SubgroupSize' ( in uint SubgroupSize) 0:131 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
0:132 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) 0:132 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
0:133 subgroupBarrier ( global void) 0:133 subgroupBarrier ( global void)
0:134 subgroupMemoryBarrier ( global void) 0:134 subgroupMemoryBarrier ( global void)
0:135 subgroupMemoryBarrierBuffer ( global void) 0:135 subgroupMemoryBarrierBuffer ( global void)
@ -414,11 +414,11 @@ ERROR: node is still EOpNull!
0:141 Function Parameters: 0:141 Function Parameters:
0:141 'f4' ( in 4-component vector of float) 0:141 'f4' ( in 4-component vector of float)
0:142 Sequence 0:142 Sequence
0:142 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) 0:142 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
0:143 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) 0:143 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
0:144 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) 0:144 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
0:145 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) 0:145 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
0:146 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) 0:146 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
0:147 subgroupBroadcast ( global 4-component vector of float) 0:147 subgroupBroadcast ( global 4-component vector of float)
0:147 'f4' ( in 4-component vector of float) 0:147 'f4' ( in 4-component vector of float)
0:147 Constant: 0:147 Constant:
@ -668,15 +668,15 @@ ERROR: node is still EOpNull!
0:257 Sequence 0:257 Sequence
0:257 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV) 0:257 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
0:258 'gl_SMCountNV' ( in uint SMCountNV) 0:258 'gl_SMCountNV' ( in uint SMCountNV)
0:259 'gl_WarpIDNV' ( in uint WarpIDNV) 0:259 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
0:260 'gl_SMIDNV' ( in uint SMIDNV) 0:260 'gl_SMIDNV' ( volatile in uint SMIDNV)
0:267 Function Definition: sm_builtins( ( global void) 0:267 Function Definition: sm_builtins( ( global void)
0:267 Function Parameters: 0:267 Function Parameters:
0:269 Sequence 0:269 Sequence
0:269 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV) 0:269 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
0:270 'gl_SMCountNV' ( in uint SMCountNV) 0:270 'gl_SMCountNV' ( in uint SMCountNV)
0:271 'gl_WarpIDNV' ( in uint WarpIDNV) 0:271 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
0:272 'gl_SMIDNV' ( in uint SMIDNV) 0:272 'gl_SMIDNV' ( volatile in uint SMIDNV)
0:? Linker Objects 0:? Linker Objects
0:? 'iAttr' ( hitAttributeNV 4-component vector of float) 0:? 'iAttr' ( hitAttributeNV 4-component vector of float)

View File

@ -109,8 +109,8 @@ ERROR: node is still EOpNull!
0:5 Function Parameters: 0:5 Function Parameters:
0:5 'f4' ( in 4-component vector of float) 0:5 'f4' ( in 4-component vector of float)
0:? Sequence 0:? Sequence
0:8 'gl_SubgroupSize' ( in uint SubgroupSize) 0:8 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
0:9 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) 0:9 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
0:10 subgroupBarrier ( global void) 0:10 subgroupBarrier ( global void)
0:11 subgroupMemoryBarrier ( global void) 0:11 subgroupMemoryBarrier ( global void)
0:12 subgroupMemoryBarrierBuffer ( global void) 0:12 subgroupMemoryBarrierBuffer ( global void)
@ -128,11 +128,11 @@ ERROR: node is still EOpNull!
0:20 false (const bool) 0:20 false (const bool)
0:21 subgroupAllEqual ( global bool) 0:21 subgroupAllEqual ( global bool)
0:21 'f4' ( in 4-component vector of float) 0:21 'f4' ( in 4-component vector of float)
0:23 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) 0:23 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
0:24 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) 0:24 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
0:25 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) 0:25 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
0:26 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) 0:26 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
0:27 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) 0:27 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
0:28 subgroupBroadcast ( global 4-component vector of float) 0:28 subgroupBroadcast ( global 4-component vector of float)
0:28 'f4' ( in 4-component vector of float) 0:28 'f4' ( in 4-component vector of float)
0:28 Constant: 0:28 Constant:
@ -397,8 +397,8 @@ ERROR: node is still EOpNull!
0:123 Function Definition: basic_works( ( global void) 0:123 Function Definition: basic_works( ( global void)
0:123 Function Parameters: 0:123 Function Parameters:
0:125 Sequence 0:125 Sequence
0:125 'gl_SubgroupSize' ( in uint SubgroupSize) 0:125 'gl_SubgroupSize' ( volatile in uint SubgroupSize)
0:126 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) 0:126 'gl_SubgroupInvocationID' ( volatile in uint SubgroupInvocationID)
0:127 subgroupBarrier ( global void) 0:127 subgroupBarrier ( global void)
0:128 subgroupMemoryBarrier ( global void) 0:128 subgroupMemoryBarrier ( global void)
0:129 subgroupMemoryBarrierBuffer ( global void) 0:129 subgroupMemoryBarrierBuffer ( global void)
@ -408,11 +408,11 @@ ERROR: node is still EOpNull!
0:135 Function Parameters: 0:135 Function Parameters:
0:135 'f4' ( in 4-component vector of float) 0:135 'f4' ( in 4-component vector of float)
0:136 Sequence 0:136 Sequence
0:136 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) 0:136 'gl_SubgroupEqMask' ( volatile in 4-component vector of uint SubgroupEqMask)
0:137 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) 0:137 'gl_SubgroupGeMask' ( volatile in 4-component vector of uint SubgroupGeMask)
0:138 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) 0:138 'gl_SubgroupGtMask' ( volatile in 4-component vector of uint SubgroupGtMask)
0:139 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) 0:139 'gl_SubgroupLeMask' ( volatile in 4-component vector of uint SubgroupLeMask)
0:140 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) 0:140 'gl_SubgroupLtMask' ( volatile in 4-component vector of uint SubgroupLtMask)
0:141 subgroupBroadcast ( global 4-component vector of float) 0:141 subgroupBroadcast ( global 4-component vector of float)
0:141 'f4' ( in 4-component vector of float) 0:141 'f4' ( in 4-component vector of float)
0:141 Constant: 0:141 Constant:
@ -662,15 +662,15 @@ ERROR: node is still EOpNull!
0:251 Sequence 0:251 Sequence
0:251 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV) 0:251 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
0:252 'gl_SMCountNV' ( in uint SMCountNV) 0:252 'gl_SMCountNV' ( in uint SMCountNV)
0:253 'gl_WarpIDNV' ( in uint WarpIDNV) 0:253 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
0:254 'gl_SMIDNV' ( in uint SMIDNV) 0:254 'gl_SMIDNV' ( volatile in uint SMIDNV)
0:261 Function Definition: sm_builtins( ( global void) 0:261 Function Definition: sm_builtins( ( global void)
0:261 Function Parameters: 0:261 Function Parameters:
0:263 Sequence 0:263 Sequence
0:263 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV) 0:263 'gl_WarpsPerSMNV' ( in uint WarpsPerSMNV)
0:264 'gl_SMCountNV' ( in uint SMCountNV) 0:264 'gl_SMCountNV' ( in uint SMCountNV)
0:265 'gl_WarpIDNV' ( in uint WarpIDNV) 0:265 'gl_WarpIDNV' ( volatile in uint WarpIDNV)
0:266 'gl_SMIDNV' ( in uint SMIDNV) 0:266 'gl_SMIDNV' ( volatile in uint SMIDNV)
0:? Linker Objects 0:? Linker Objects
0:? 'accNV' (layout( set=0 binding=0) uniform accelerationStructureNV) 0:? 'accNV' (layout( set=0 binding=0) uniform accelerationStructureNV)
0:? 'localPayload' (layout( location=0) rayPayloadNV 4-component vector of float) 0:? 'localPayload' (layout( location=0) rayPayloadNV 4-component vector of float)

View File

@ -4,8 +4,8 @@ rayQuery-allOps.comp
// Id's are bound by 258 // Id's are bound by 258
Capability Shader Capability Shader
Capability RayQueryProvisionalKHR Capability RayQueryKHR
Capability RayTraversalPrimitiveCullingProvisionalKHR Capability RayTraversalPrimitiveCullingKHR
Extension "SPV_KHR_ray_query" Extension "SPV_KHR_ray_query"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
@ -87,7 +87,8 @@ rayQuery-allOps.comp
37: 18(int) Constant 3 37: 18(int) Constant 3
38: 8(float) Constant 1176255488 38: 8(float) Constant 1176255488
45: TypeRayQueryProvisionalKHR 45: TypeRayQueryProvisionalKHR
46: TypePointer Function 45 46: TypePointer Private 45
47(rayQuery): 46(ptr) Variable Private
48: TypeAccelerationStructureKHR 48: TypeAccelerationStructureKHR
49: TypePointer UniformConstant 48 49: TypePointer UniformConstant 48
50(rtas): 49(ptr) Variable UniformConstant 50(rtas): 49(ptr) Variable UniformConstant
@ -114,7 +115,6 @@ rayQuery-allOps.comp
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
47(rayQuery): 46(ptr) Variable Function
69(candidateType): 68(ptr) Variable Function 69(candidateType): 68(ptr) Variable Function
78(_mat4x3): 77(ptr) Variable Function 78(_mat4x3): 77(ptr) Variable Function
83(_mat3x4): 82(ptr) Variable Function 83(_mat3x4): 82(ptr) Variable Function

View File

@ -4,7 +4,7 @@ rayQuery-allOps.frag
// Id's are bound by 257 // Id's are bound by 257
Capability Shader Capability Shader
Capability RayQueryProvisionalKHR Capability RayQueryKHR
Extension "SPV_KHR_ray_query" Extension "SPV_KHR_ray_query"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
@ -86,7 +86,8 @@ rayQuery-allOps.frag
37: 18(int) Constant 3 37: 18(int) Constant 3
38: 8(float) Constant 1176255488 38: 8(float) Constant 1176255488
45: TypeRayQueryProvisionalKHR 45: TypeRayQueryProvisionalKHR
46: TypePointer Function 45 46: TypePointer Private 45
47(rayQuery): 46(ptr) Variable Private
48: TypeAccelerationStructureKHR 48: TypeAccelerationStructureKHR
49: TypePointer UniformConstant 48 49: TypePointer UniformConstant 48
50(rtas): 49(ptr) Variable UniformConstant 50(rtas): 49(ptr) Variable UniformConstant
@ -112,7 +113,6 @@ rayQuery-allOps.frag
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
47(rayQuery): 46(ptr) Variable Function
69(candidateType): 68(ptr) Variable Function 69(candidateType): 68(ptr) Variable Function
78(_mat4x3): 77(ptr) Variable Function 78(_mat4x3): 77(ptr) Variable Function
83(_mat3x4): 82(ptr) Variable Function 83(_mat3x4): 82(ptr) Variable Function

View File

@ -3,7 +3,7 @@ rayQuery-allOps.rgen
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 257 // Id's are bound by 257
Capability RayQueryProvisionalKHR Capability RayQueryKHR
Capability RayTracingNV Capability RayTracingNV
Extension "SPV_KHR_ray_query" Extension "SPV_KHR_ray_query"
Extension "SPV_NV_ray_tracing" Extension "SPV_NV_ray_tracing"
@ -86,7 +86,8 @@ rayQuery-allOps.rgen
37: 18(int) Constant 3 37: 18(int) Constant 3
38: 8(float) Constant 1176255488 38: 8(float) Constant 1176255488
45: TypeRayQueryProvisionalKHR 45: TypeRayQueryProvisionalKHR
46: TypePointer Function 45 46: TypePointer Private 45
47(rayQuery): 46(ptr) Variable Private
48: TypeAccelerationStructureKHR 48: TypeAccelerationStructureKHR
49: TypePointer UniformConstant 48 49: TypePointer UniformConstant 48
50(rtas): 49(ptr) Variable UniformConstant 50(rtas): 49(ptr) Variable UniformConstant
@ -112,7 +113,6 @@ rayQuery-allOps.rgen
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
47(rayQuery): 46(ptr) Variable Function
69(candidateType): 68(ptr) Variable Function 69(candidateType): 68(ptr) Variable Function
78(_mat4x3): 77(ptr) Variable Function 78(_mat4x3): 77(ptr) Variable Function
83(_mat3x4): 82(ptr) Variable Function 83(_mat3x4): 82(ptr) Variable Function

View File

@ -0,0 +1,76 @@
rayQuery-global.rgen
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 44
Capability RayQueryKHR
Capability RayTracingKHR
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint RayGenerationKHR 4 "main"
Source GLSL 460
SourceExtension "GL_EXT_ray_flags_primitive_culling"
SourceExtension "GL_EXT_ray_query"
Name 4 "main"
Name 10 "otherWrapper(rq1;"
Name 9 "rq"
Name 13 "wrapper(rq1;"
Name 12 "rq"
Name 17 "rqGlobal"
Name 22 "rq2"
Name 27 "rtas"
Name 40 "rq2"
Decorate 27(rtas) DescriptorSet 0
Decorate 27(rtas) Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeRayQueryProvisionalKHR
7: TypePointer Private 6
8: TypeFunction 2 7(ptr)
15: TypeBool
17(rqGlobal): 7(ptr) Variable Private
22(rq2): 7(ptr) Variable Private
25: TypeAccelerationStructureKHR
26: TypePointer UniformConstant 25
27(rtas): 26(ptr) Variable UniformConstant
29: TypeInt 32 0
30: 29(int) Constant 0
31: 29(int) Constant 255
32: TypeFloat 32
33: TypeVector 32(float) 3
34: 32(float) Constant 0
35: 33(fvec3) ConstantComposite 34 34 34
36: 32(float) Constant 1065353216
37: 33(fvec3) ConstantComposite 36 34 34
40(rq2): 7(ptr) Variable Private
4(main): 2 Function None 3
5: Label
28: 25 Load 27(rtas)
RayQueryInitializeKHR 17(rqGlobal) 28 30 31 35 34 37 36
38: 2 FunctionCall 13(wrapper(rq1;) 17(rqGlobal)
39: 2 FunctionCall 10(otherWrapper(rq1;) 17(rqGlobal)
41: 25 Load 27(rtas)
RayQueryInitializeKHR 40(rq2) 41 30 31 35 34 37 36
42: 2 FunctionCall 13(wrapper(rq1;) 40(rq2)
43: 2 FunctionCall 10(otherWrapper(rq1;) 40(rq2)
Return
FunctionEnd
10(otherWrapper(rq1;): 2 Function None 8
9(rq): 7(ptr) FunctionParameter
11: Label
16: 15(bool) RayQueryProceedKHR 9(rq)
18: 15(bool) RayQueryProceedKHR 17(rqGlobal)
Return
FunctionEnd
13(wrapper(rq1;): 2 Function None 8
12(rq): 7(ptr) FunctionParameter
14: Label
19: 15(bool) RayQueryProceedKHR 12(rq)
20: 15(bool) RayQueryProceedKHR 17(rqGlobal)
21: 2 FunctionCall 10(otherWrapper(rq1;) 12(rq)
23: 2 FunctionCall 10(otherWrapper(rq1;) 22(rq2)
24: 2 FunctionCall 10(otherWrapper(rq1;) 17(rqGlobal)
Return
FunctionEnd

View File

@ -3,7 +3,7 @@ rayQuery-initialize.rgen
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 103 // Id's are bound by 103
Capability RayQueryProvisionalKHR Capability RayQueryKHR
Capability RayTracingNV Capability RayTracingNV
Extension "SPV_KHR_ray_query" Extension "SPV_KHR_ray_query"
Extension "SPV_NV_ray_tracing" Extension "SPV_NV_ray_tracing"
@ -56,7 +56,7 @@ rayQuery-initialize.rgen
6: TypeInt 32 0 6: TypeInt 32 0
7: TypeFunction 6(int) 7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR 10: TypeRayQueryProvisionalKHR
11: TypePointer Function 10 11: TypePointer Private 10
12: TypeFloat 32 12: TypeFloat 32
13: TypeVector 12(float) 3 13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float) 14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
@ -88,12 +88,12 @@ rayQuery-initialize.rgen
75: TypePointer Uniform 74(Rays) 75: TypePointer Uniform 74(Rays)
76: 75(ptr) Variable Uniform 76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray) 78: TypePointer Uniform 72(Ray)
89(rayQuery): 11(ptr) Variable Private
94: 6(int) Constant 32 94: 6(int) Constant 32
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
69(index): 68(ptr) Variable Function 69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function 71(ray): 15(ptr) Variable Function
89(rayQuery): 11(ptr) Variable Function
90(param): 15(ptr) Variable Function 90(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex() 70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70 Store 69(index) 70

View File

@ -3,7 +3,7 @@ rayQuery-no-cse.rgen
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 107 // Id's are bound by 107
Capability RayQueryProvisionalKHR Capability RayQueryKHR
Capability RayTracingNV Capability RayTracingNV
Extension "SPV_KHR_ray_query" Extension "SPV_KHR_ray_query"
Extension "SPV_NV_ray_tracing" Extension "SPV_NV_ray_tracing"
@ -58,7 +58,7 @@ rayQuery-no-cse.rgen
6: TypeInt 32 0 6: TypeInt 32 0
7: TypeFunction 6(int) 7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR 10: TypeRayQueryProvisionalKHR
11: TypePointer Function 10 11: TypePointer Private 10
12: TypeFloat 32 12: TypeFloat 32
13: TypeVector 12(float) 3 13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float) 14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
@ -90,14 +90,14 @@ rayQuery-no-cse.rgen
75: TypePointer Uniform 74(Rays) 75: TypePointer Uniform 74(Rays)
76: 75(ptr) Variable Uniform 76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray) 78: TypePointer Uniform 72(Ray)
89(rayQuery1): 11(ptr) Variable Private
94: 6(int) Constant 32 94: 6(int) Constant 32
103(rayQuery2): 11(ptr) Variable Private
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
69(index): 68(ptr) Variable Function 69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function 71(ray): 15(ptr) Variable Function
89(rayQuery1): 11(ptr) Variable Function
90(param): 15(ptr) Variable Function 90(param): 15(ptr) Variable Function
103(rayQuery2): 11(ptr) Variable Function
104(param): 15(ptr) Variable Function 104(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex() 70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70 Store 69(index) 70

View File

@ -3,7 +3,7 @@ rayQuery.rgen
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 44 // Id's are bound by 44
Capability RayQueryProvisionalKHR Capability RayQueryKHR
Capability RayTracingNV Capability RayTracingNV
Extension "SPV_KHR_ray_query" Extension "SPV_KHR_ray_query"
Extension "SPV_NV_ray_tracing" Extension "SPV_NV_ray_tracing"
@ -40,7 +40,8 @@ rayQuery.rgen
13: 10(float) Constant 0 13: 10(float) Constant 0
15: 10(float) Constant 1148846080 15: 10(float) Constant 1148846080
16: TypeRayQueryProvisionalKHR 16: TypeRayQueryProvisionalKHR
17: TypePointer Function 16 17: TypePointer Private 16
18(localRayQuery): 17(ptr) Variable Private
19: TypeAccelerationStructureKHR 19: TypeAccelerationStructureKHR
20: TypePointer UniformConstant 19 20: TypePointer UniformConstant 19
21(acc0): 20(ptr) Variable UniformConstant 21(acc0): 20(ptr) Variable UniformConstant
@ -59,7 +60,6 @@ rayQuery.rgen
8(rayFlags): 7(ptr) Variable Function 8(rayFlags): 7(ptr) Variable Function
12(tMin): 11(ptr) Variable Function 12(tMin): 11(ptr) Variable Function
14(tMax): 11(ptr) Variable Function 14(tMax): 11(ptr) Variable Function
18(localRayQuery): 17(ptr) Variable Function
Store 8(rayFlags) 9 Store 8(rayFlags) 9
Store 12(tMin) 13 Store 12(tMin) 13
Store 14(tMax) 15 Store 14(tMax) 15

View File

@ -153,10 +153,10 @@ spv.AnyHitShader.rahit
SelectionMerge 79 None SelectionMerge 79 None
BranchConditional 77 78 80 BranchConditional 77 78 80
78: Label 78: Label
IgnoreIntersectionKHR IgnoreIntersectionNV
Branch 79 Branch 79
80: Label 80: Label
TerminateRayKHR TerminateRayNV
Branch 79 Branch 79
79: Label 79: Label
Return Return

View File

@ -164,6 +164,6 @@ spv.ClosestHitShader.rchit
68: 60 Load 67(gl_WorldToObjectNV) 68: 60 Load 67(gl_WorldToObjectNV)
Store 66(v14) 68 Store 66(v14) 68
72: 69 Load 71(accNV) 72: 69 Load 71(accNV)
TraceRayKHR 72 73 74 75 76 73 78 77 80 81 82 TraceNV 72 73 74 75 76 73 78 77 80 81 82
Return Return
FunctionEnd FunctionEnd

View File

@ -108,6 +108,6 @@ spv.MissShader.rmiss
39: 16(float) Load 38(gl_RayTmaxNV) 39: 16(float) Load 38(gl_RayTmaxNV)
Store 37(v7) 39 Store 37(v7) 39
43: 40 Load 42(accNV) 43: 40 Load 42(accNV)
TraceRayKHR 43 44 45 46 47 44 49 48 51 52 54 TraceNV 43 44 45 46 47 44 49 48 51 52 54
Return Return
FunctionEnd FunctionEnd

View File

@ -55,6 +55,6 @@ spv.RayCallable.rcall
Store 13(size) 15 Store 13(size) 15
23: 22(ptr) AccessChain 18 20 23: 22(ptr) AccessChain 18 20
Store 23 21 Store 23 21
ExecuteCallableKHR 24 25 ExecuteCallableNV 24 25
Return Return
FunctionEnd FunctionEnd

View File

@ -41,6 +41,6 @@ spv.RayConstants.rgen
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9: 6 Load 8(accNV) 9: 6 Load 8(accNV)
TraceRayKHR 9 11 12 13 13 12 17 18 20 21 23 TraceNV 9 11 12 13 13 12 17 18 20 21 23
Return Return
FunctionEnd FunctionEnd

View File

@ -92,6 +92,6 @@ spv.RayGenShader.rgen
44: 36(fvec3) Load 43 44: 36(fvec3) Load 43
47: 42(ptr) AccessChain 39 46 47: 42(ptr) AccessChain 39 46
48: 36(fvec3) Load 47 48: 36(fvec3) Load 47
TraceRayKHR 30 31 32 33 34 12 44 45 48 49 41 TraceNV 30 31 32 33 34 12 44 45 48 49 41
Return Return
FunctionEnd FunctionEnd

View File

@ -88,6 +88,6 @@ spv.RayGenShader11.rgen
44: 36(fvec3) Load 43 44: 36(fvec3) Load 43
47: 42(ptr) AccessChain 39 46 47: 42(ptr) AccessChain 39 46
48: 36(fvec3) Load 47 48: 36(fvec3) Load 47
TraceRayKHR 30 31 32 33 34 12 44 45 48 49 41 TraceNV 30 31 32 33 34 12 44 45 48 49 41
Return Return
FunctionEnd FunctionEnd

View File

@ -111,7 +111,7 @@ spv.RayGenShaderArray.rgen
51: 32(fvec3) Load 50 51: 32(fvec3) Load 50
54: 49(ptr) AccessChain 36 53 54: 49(ptr) AccessChain 36 53
55: 32(fvec3) Load 54 55: 32(fvec3) Load 54
TraceRayKHR 43 44 45 46 47 12 51 52 55 56 48 TraceNV 43 44 45 46 47 12 51 52 55 56 48
61: 38(ptr) AccessChain 36 37 61: 38(ptr) AccessChain 36 37
62: 33(int) Load 61 62: 33(int) Load 61
63: 41(ptr) AccessChain 60(accNV1) 62 63: 41(ptr) AccessChain 60(accNV1) 62
@ -124,7 +124,7 @@ spv.RayGenShaderArray.rgen
70: 32(fvec3) Load 69 70: 32(fvec3) Load 69
71: 49(ptr) AccessChain 36 53 71: 49(ptr) AccessChain 36 53
72: 32(fvec3) Load 71 72: 32(fvec3) Load 71
TraceRayKHR 64 65 66 67 68 12 70 52 72 56 48 TraceNV 64 65 66 67 68 12 70 52 72 56 48
73: 38(ptr) AccessChain 36 37 73: 38(ptr) AccessChain 36 37
74: 33(int) Load 73 74: 33(int) Load 73
75: 33(int) CopyObject 74 75: 33(int) CopyObject 74
@ -138,6 +138,6 @@ spv.RayGenShaderArray.rgen
83: 32(fvec3) Load 82 83: 32(fvec3) Load 82
84: 49(ptr) AccessChain 36 53 84: 49(ptr) AccessChain 36 53
85: 32(fvec3) Load 84 85: 32(fvec3) Load 84
TraceRayKHR 77 78 79 80 81 12 83 52 85 56 48 TraceNV 77 78 79 80 81 12 83 52 85 56 48
Return Return
FunctionEnd FunctionEnd

View File

@ -1,15 +1,17 @@
spv.ext.AnyHitShader.rahit spv.ext.AnyHitShader.rahit
// Module Version 10400 // Module Version 10400
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 94 // Id's are bound by 107
Capability RayTracingProvisionalKHR Capability GroupNonUniform
Capability RayTracingKHR
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
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 76 80 84 EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 76 80 84 98
Source GLSL 460 Source GLSL 460
SourceExtension "GL_EXT_ray_tracing" SourceExtension "GL_EXT_ray_tracing"
SourceExtension "GL_KHR_shader_subgroup_basic"
Name 4 "main" Name 4 "main"
Name 9 "v0" Name 9 "v0"
Name 11 "gl_LaunchIDEXT" Name 11 "gl_LaunchIDEXT"
@ -48,6 +50,7 @@ spv.ext.AnyHitShader.rahit
Name 79 "v17" Name 79 "v17"
Name 80 "gl_WorldToObject3x4EXT" Name 80 "gl_WorldToObject3x4EXT"
Name 84 "incomingPayload" Name 84 "incomingPayload"
Name 98 "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
@ -67,6 +70,9 @@ spv.ext.AnyHitShader.rahit
Decorate 76(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR Decorate 76(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR
Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
Decorate 84(incomingPayload) Location 1 Decorate 84(incomingPayload) Location 1
Decorate 98(gl_SubgroupSize) RelaxedPrecision
Decorate 98(gl_SubgroupSize) BuiltIn SubgroupSize
Decorate 99 RelaxedPrecision
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -114,6 +120,9 @@ spv.ext.AnyHitShader.rahit
86: 72(fvec4) ConstantComposite 85 85 85 85 86: 72(fvec4) ConstantComposite 85 85 85 85
88: 16(int) Constant 1 88: 16(int) Constant 1
89: TypeBool 89: TypeBool
94: 6(int) Constant 0
98(gl_SubgroupSize): 57(ptr) Variable Input
101: 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
@ -176,13 +185,16 @@ spv.ext.AnyHitShader.rahit
87: 16(int) Load 18(v2) 87: 16(int) Load 18(v2)
90: 89(bool) IEqual 87 88 90: 89(bool) IEqual 87 88
SelectionMerge 92 None SelectionMerge 92 None
BranchConditional 90 91 93 BranchConditional 90 91 92
91: Label 91: Label
IgnoreIntersectionKHR IgnoreIntersectionKHR
Branch 92
93: Label
TerminateRayKHR
Branch 92
92: Label 92: Label
Return 99: 6(int) Load 98(gl_SubgroupSize)
100: 28(float) ConvertUToF 99
102: 101(ptr) AccessChain 84(incomingPayload) 94
103: 28(float) Load 102
104: 28(float) FAdd 103 100
105: 101(ptr) AccessChain 84(incomingPayload) 94
Store 105 104
TerminateRayKHR
FunctionEnd FunctionEnd

View File

@ -3,7 +3,7 @@ spv.ext.ClosestHitShader.rchit
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 101 // Id's are bound by 101
Capability RayTracingProvisionalKHR Capability RayTracingKHR
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
@ -48,8 +48,8 @@ spv.ext.ClosestHitShader.rchit
Name 79 "v17" Name 79 "v17"
Name 80 "gl_WorldToObject3x4EXT" Name 80 "gl_WorldToObject3x4EXT"
Name 85 "accEXT" Name 85 "accEXT"
Name 98 "localPayload" Name 98 "incomingPayload"
Name 100 "incomingPayload" Name 100 "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 +70,8 @@ spv.ext.ClosestHitShader.rchit
Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
Decorate 85(accEXT) DescriptorSet 0 Decorate 85(accEXT) DescriptorSet 0
Decorate 85(accEXT) Binding 0 Decorate 85(accEXT) Binding 0
Decorate 98(localPayload) Location 0 Decorate 98(incomingPayload) Location 1
Decorate 100(incomingPayload) Location 1 Decorate 100(localPayload) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -126,10 +126,10 @@ spv.ext.ClosestHitShader.rchit
94: 29(fvec3) ConstantComposite 93 93 93 94: 29(fvec3) ConstantComposite 93 93 93
95: 28(float) Constant 1061158912 95: 28(float) Constant 1061158912
96: 16(int) Constant 1 96: 16(int) Constant 1
97: TypePointer RayPayloadKHR 72(fvec4) 97: TypePointer IncomingRayPayloadKHR 72(fvec4)
98(localPayload): 97(ptr) Variable RayPayloadKHR 98(incomingPayload): 97(ptr) Variable IncomingRayPayloadKHR
99: TypePointer IncomingRayPayloadKHR 72(fvec4) 99: TypePointer RayPayloadKHR 72(fvec4)
100(incomingPayload): 99(ptr) Variable IncomingRayPayloadKHR 100(localPayload): 99(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
@ -189,6 +189,6 @@ spv.ext.ClosestHitShader.rchit
82: 73 Transpose 81 82: 73 Transpose 81
Store 79(v17) 82 Store 79(v17) 82
86: 83 Load 85(accEXT) 86: 83 Load 85(accEXT)
TraceRayKHR 86 87 88 89 90 87 92 91 94 95 96 TraceRayKHR 86 87 88 89 90 87 92 91 94 95 98(incomingPayload)
Return Return
FunctionEnd FunctionEnd

View File

@ -1,10 +1,12 @@
spv.ext.ClosestHitShader_Errors.rchit spv.ext.ClosestHitShader_Errors.rchit
ERROR: 0:8: 'assign' : l-value required "payload" (cannot modify hitAttributeNV in this stage) ERROR: 0:6: 'location' : overlapping use of location 2
ERROR: 0:9: 'reportIntersectionEXT' : no matching overloaded function found ERROR: 0:9: 'assign' : l-value required "payload" (cannot modify hitAttributeNV in this stage)
ERROR: 0:10: 'terminateRayEXT' : no matching overloaded function found ERROR: 0:10: 'reportIntersectionEXT' : no matching overloaded function found
ERROR: 0:11: 'ignoreIntersectionEXT' : no matching overloaded function found ERROR: 0:11: 'terminateRayEXT' : not supported in this stage: closest-hit
ERROR: 0:12: 'gl_RayFlagsSkipAABBEXT' : required extension not requested: GL_EXT_ray_flags_primitive_culling ERROR: 0:12: 'ignoreIntersectionEXT' : not supported in this stage: closest-hit
ERROR: 5 compilation errors. No code generated. ERROR: 0:13: 'gl_RayFlagsSkipAABBEXT' : required extension not requested: GL_EXT_ray_flags_primitive_culling
ERROR: 0:14: 'no rayPayloadEXT/rayPayloadInEXT declared' : with layout(location = 0)
ERROR: 7 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link SPIR-V is not generated for failed compile or link

View File

@ -0,0 +1,114 @@
spv.ext.ClosestHitShader_Subgroup.rchit
// Module Version 10400
// Generated by (magic number): 8000a
// Id's are bound by 67
Capability Int64
Capability GroupNonUniform
Capability GroupNonUniformBallot
Capability SubgroupBallotKHR
Capability RayTracingKHR
Capability VulkanMemoryModelKHR
Capability ShaderSMBuiltinsNV
Extension "SPV_KHR_ray_tracing"
Extension "SPV_KHR_shader_ballot"
Extension "SPV_KHR_vulkan_memory_model"
Extension "SPV_NV_shader_sm_builtins"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical VulkanKHR
EntryPoint ClosestHitKHR 4 "main" 8 26 28 34 43 48 53 61
Source GLSL 460
SourceExtension "GL_ARB_shader_ballot"
SourceExtension "GL_EXT_ray_tracing"
SourceExtension "GL_KHR_shader_subgroup_ballot"
SourceExtension "GL_KHR_shader_subgroup_basic"
SourceExtension "GL_NV_shader_sm_builtins"
Name 4 "main"
Name 8 "accEXT"
Name 26 "incomingPayload"
Name 28 "gl_SubgroupInvocationID"
Name 34 "gl_SubGroupGeMaskARB"
Name 43 "gl_SubgroupGtMask"
Name 48 "gl_SubgroupLeMask"
Name 53 "gl_SubGroupLtMaskARB"
Name 61 "gl_SMIDNV"
Decorate 8(accEXT) DescriptorSet 0
Decorate 8(accEXT) Binding 0
Decorate 26(incomingPayload) Location 1
Decorate 28(gl_SubgroupInvocationID) RelaxedPrecision
Decorate 28(gl_SubgroupInvocationID) BuiltIn SubgroupLocalInvocationId
Decorate 29 RelaxedPrecision
Decorate 34(gl_SubGroupGeMaskARB) BuiltIn SubgroupGeMaskKHR
Decorate 43(gl_SubgroupGtMask) BuiltIn SubgroupGtMaskKHR
Decorate 48(gl_SubgroupLeMask) BuiltIn SubgroupLeMaskKHR
Decorate 53(gl_SubGroupLtMaskARB) BuiltIn SubgroupLtMaskKHR
Decorate 61(gl_SMIDNV) BuiltIn SMIDNV
2: TypeVoid
3: TypeFunction 2
6: TypeAccelerationStructureKHR
7: TypePointer UniformConstant 6
8(accEXT): 7(ptr) Variable UniformConstant
10: TypeInt 32 0
11: 10(int) Constant 0
12: 10(int) Constant 1
13: 10(int) Constant 2
14: 10(int) Constant 3
15: TypeFloat 32
16: TypeVector 15(float) 3
17: 15(float) Constant 1056964608
18: 16(fvec3) ConstantComposite 17 17 17
19: 15(float) Constant 1065353216
20: 16(fvec3) ConstantComposite 19 19 19
21: 15(float) Constant 1061158912
22: TypeInt 32 1
23: 22(int) Constant 1
24: TypeVector 15(float) 4
25: TypePointer IncomingRayPayloadKHR 24(fvec4)
26(incomingPayload): 25(ptr) Variable IncomingRayPayloadKHR
27: TypePointer Input 10(int)
28(gl_SubgroupInvocationID): 27(ptr) Variable Input
31: TypeVector 10(int) 4
32: TypeInt 64 0
33: TypePointer Input 31(ivec4)
34(gl_SubGroupGeMaskARB): 33(ptr) Variable Input
38: TypeVector 10(int) 2
43(gl_SubgroupGtMask): 33(ptr) Variable Input
48(gl_SubgroupLeMask): 33(ptr) Variable Input
53(gl_SubGroupLtMaskARB): 33(ptr) Variable Input
61(gl_SMIDNV): 27(ptr) Variable Input
65: TypePointer IncomingRayPayloadKHR 15(float)
4(main): 2 Function None 3
5: Label
9: 6 Load 8(accEXT)
TraceRayKHR 9 11 12 13 14 11 18 17 20 21 26(incomingPayload)
29: 10(int) Load 28(gl_SubgroupInvocationID) Volatile
30: 15(float) ConvertUToF 29
35: 31(ivec4) Load 34(gl_SubGroupGeMaskARB)
36: 10(int) CompositeExtract 35 0
37: 10(int) CompositeExtract 35 1
39: 38(ivec2) CompositeConstruct 36 37
40: 32(int64_t) Bitcast 39
41: 15(float) ConvertUToF 40
42: 15(float) FAdd 30 41
44: 31(ivec4) Load 43(gl_SubgroupGtMask) Volatile
45: 24(fvec4) ConvertUToF 44
46: 15(float) CompositeExtract 45 0
47: 15(float) FAdd 42 46
49: 31(ivec4) Load 48(gl_SubgroupLeMask) Volatile
50: 24(fvec4) ConvertUToF 49
51: 15(float) CompositeExtract 50 0
52: 15(float) FAdd 47 51
54: 31(ivec4) Load 53(gl_SubGroupLtMaskARB)
55: 10(int) CompositeExtract 54 0
56: 10(int) CompositeExtract 54 1
57: 38(ivec2) CompositeConstruct 55 56
58: 32(int64_t) Bitcast 57
59: 15(float) ConvertUToF 58
60: 15(float) FAdd 52 59
62: 10(int) Load 61(gl_SMIDNV) Volatile
63: 15(float) ConvertUToF 62
64: 15(float) FAdd 60 63
66: 65(ptr) AccessChain 26(incomingPayload) 11
Store 66 64
Return
FunctionEnd

View File

@ -3,7 +3,7 @@ spv.ext.IntersectShader.rint
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 81 // Id's are bound by 81
Capability RayTracingProvisionalKHR Capability RayTracingKHR
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
@ -53,6 +53,8 @@ spv.ext.IntersectShader.rint
Decorate 42(gl_ObjectRayDirectionEXT) BuiltIn ObjectRayDirectionKHR Decorate 42(gl_ObjectRayDirectionEXT) BuiltIn ObjectRayDirectionKHR
Decorate 47(gl_RayTminEXT) BuiltIn RayTminKHR Decorate 47(gl_RayTminEXT) BuiltIn RayTminKHR
Decorate 50(gl_RayTmaxEXT) BuiltIn RayTmaxKHR Decorate 50(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
Decorate 50(gl_RayTmaxEXT) Volatile
Decorate 50(gl_RayTmaxEXT) Coherent
Decorate 56(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR Decorate 56(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR
Decorate 59(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR Decorate 59(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
Decorate 65(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR Decorate 65(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR

View File

@ -1,15 +1,25 @@
spv.ext.MissShader.rmiss spv.ext.MissShader.rmiss
// Module Version 10400 // Module Version 10400
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 54 // Id's are bound by 71
Capability RayTracingProvisionalKHR Capability GroupNonUniform
Capability GroupNonUniformBallot
Capability SubgroupBallotKHR
Capability RayTracingKHR
Capability ShaderSMBuiltinsNV
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
Extension "SPV_KHR_shader_ballot"
Extension "SPV_NV_shader_sm_builtins"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint MissKHR 4 "main" 11 14 21 24 29 32 36 51 53 EntryPoint MissKHR 4 "main" 11 14 21 24 29 32 36 51 53 58 63 70
Source GLSL 460 Source GLSL 460
SourceExtension "GL_ARB_shader_ballot"
SourceExtension "GL_EXT_ray_tracing" SourceExtension "GL_EXT_ray_tracing"
SourceExtension "GL_KHR_shader_subgroup_ballot"
SourceExtension "GL_KHR_shader_subgroup_basic"
SourceExtension "GL_NV_shader_sm_builtins"
Name 4 "main" Name 4 "main"
Name 9 "v0" Name 9 "v0"
Name 11 "gl_LaunchIDEXT" Name 11 "gl_LaunchIDEXT"
@ -24,8 +34,11 @@ spv.ext.MissShader.rmiss
Name 31 "v5" Name 31 "v5"
Name 32 "gl_RayTmaxEXT" Name 32 "gl_RayTmaxEXT"
Name 36 "accEXT" Name 36 "accEXT"
Name 51 "localPayload" Name 51 "incomingPayload"
Name 53 "incomingPayload" Name 53 "gl_SubGroupSizeARB"
Name 58 "gl_SubgroupEqMask"
Name 63 "gl_WarpIDNV"
Name 70 "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 21(gl_WorldRayOriginEXT) BuiltIn WorldRayOriginKHR Decorate 21(gl_WorldRayOriginEXT) BuiltIn WorldRayOriginKHR
@ -34,8 +47,17 @@ spv.ext.MissShader.rmiss
Decorate 32(gl_RayTmaxEXT) BuiltIn RayTmaxKHR Decorate 32(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
Decorate 36(accEXT) DescriptorSet 0 Decorate 36(accEXT) DescriptorSet 0
Decorate 36(accEXT) Binding 0 Decorate 36(accEXT) Binding 0
Decorate 51(localPayload) Location 0 Decorate 51(incomingPayload) Location 1
Decorate 53(incomingPayload) Location 1 Decorate 53(gl_SubGroupSizeARB) BuiltIn SubgroupSize
Decorate 53(gl_SubGroupSizeARB) Volatile
Decorate 53(gl_SubGroupSizeARB) Coherent
Decorate 58(gl_SubgroupEqMask) BuiltIn SubgroupEqMaskKHR
Decorate 58(gl_SubgroupEqMask) Volatile
Decorate 58(gl_SubgroupEqMask) Coherent
Decorate 63(gl_WarpIDNV) BuiltIn WarpIDNV
Decorate 63(gl_WarpIDNV) Volatile
Decorate 63(gl_WarpIDNV) Coherent
Decorate 70(localPayload) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -69,10 +91,17 @@ spv.ext.MissShader.rmiss
47: TypeInt 32 1 47: TypeInt 32 1
48: 47(int) Constant 1 48: 47(int) Constant 1
49: TypeVector 16(float) 4 49: TypeVector 16(float) 4
50: TypePointer RayPayloadKHR 49(fvec4) 50: TypePointer IncomingRayPayloadKHR 49(fvec4)
51(localPayload): 50(ptr) Variable RayPayloadKHR 51(incomingPayload): 50(ptr) Variable IncomingRayPayloadKHR
52: TypePointer IncomingRayPayloadKHR 49(fvec4) 52: TypePointer Input 6(int)
53(incomingPayload): 52(ptr) Variable IncomingRayPayloadKHR 53(gl_SubGroupSizeARB): 52(ptr) Variable Input
56: TypeVector 6(int) 4
57: TypePointer Input 56(ivec4)
58(gl_SubgroupEqMask): 57(ptr) Variable Input
63(gl_WarpIDNV): 52(ptr) Variable Input
67: TypePointer IncomingRayPayloadKHR 16(float)
69: TypePointer RayPayloadKHR 49(fvec4)
70(localPayload): 69(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
@ -94,6 +123,17 @@ spv.ext.MissShader.rmiss
33: 16(float) Load 32(gl_RayTmaxEXT) 33: 16(float) Load 32(gl_RayTmaxEXT)
Store 31(v5) 33 Store 31(v5) 33
37: 34 Load 36(accEXT) 37: 34 Load 36(accEXT)
TraceRayKHR 37 38 39 40 41 38 43 42 45 46 48 TraceRayKHR 37 38 39 40 41 38 43 42 45 46 51(incomingPayload)
54: 6(int) Load 53(gl_SubGroupSizeARB)
55: 16(float) ConvertUToF 54
59: 56(ivec4) Load 58(gl_SubgroupEqMask)
60: 49(fvec4) ConvertUToF 59
61: 16(float) CompositeExtract 60 0
62: 16(float) FAdd 55 61
64: 6(int) Load 63(gl_WarpIDNV)
65: 16(float) ConvertUToF 64
66: 16(float) FAdd 62 65
68: 67(ptr) AccessChain 51(incomingPayload) 38
Store 68 66
Return Return
FunctionEnd FunctionEnd

View File

@ -13,8 +13,8 @@ ERROR: 0:10: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix
ERROR: 0:11: 'gl_HitTEXT' : undeclared identifier ERROR: 0:11: 'gl_HitTEXT' : undeclared identifier
ERROR: 0:12: 'gl_HitKindEXT' : undeclared identifier ERROR: 0:12: 'gl_HitKindEXT' : undeclared identifier
ERROR: 0:13: 'reportIntersectionEXT' : no matching overloaded function found ERROR: 0:13: 'reportIntersectionEXT' : no matching overloaded function found
ERROR: 0:14: 'ignoreIntersectionEXT' : no matching overloaded function found ERROR: 0:14: 'ignoreIntersectionEXT' : not supported in this stage: miss
ERROR: 0:15: 'terminateRayEXT' : no matching overloaded function found ERROR: 0:15: 'terminateRayEXT' : not supported in this stage: miss
ERROR: 16 compilation errors. No code generated. ERROR: 16 compilation errors. No code generated.

View File

@ -3,7 +3,7 @@ spv.ext.RayCallable.rcall
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 30 // Id's are bound by 30
Capability RayTracingProvisionalKHR Capability RayTracingKHR
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
@ -55,6 +55,6 @@ spv.ext.RayCallable.rcall
Store 13(size) 15 Store 13(size) 15
23: 22(ptr) AccessChain 18 20 23: 22(ptr) AccessChain 18 20
Store 23 21 Store 23 21
ExecuteCallableKHR 24 25 ExecuteCallableKHR 24 18
Return Return
FunctionEnd FunctionEnd

View File

@ -2,34 +2,36 @@ spv.ext.RayCallable_Errors.rcall
ERROR: 0:3: 'hitAttributeEXT' : not supported in this stage: callable ERROR: 0:3: 'hitAttributeEXT' : not supported in this stage: callable
ERROR: 0:4: 'rayPayloadEXT' : not supported in this stage: callable ERROR: 0:4: 'rayPayloadEXT' : not supported in this stage: callable
ERROR: 0:5: 'rayPayloadInEXT' : not supported in this stage: callable ERROR: 0:5: 'rayPayloadInEXT' : not supported in this stage: callable
ERROR: 0:9: 'gl_PrimitiveID' : undeclared identifier ERROR: 0:7: 'location' : overlapping use of location 0
ERROR: 0:9: '=' : cannot convert from ' temp float' to ' temp highp int' ERROR: 0:10: 'gl_PrimitiveID' : undeclared identifier
ERROR: 0:10: 'gl_InstanceID' : undeclared identifier (Did you mean gl_InstanceIndex?)
ERROR: 0:10: '=' : cannot convert from ' temp float' to ' temp highp int' ERROR: 0:10: '=' : cannot convert from ' temp float' to ' temp highp int'
ERROR: 0:11: 'gl_InstanceCustomIndexEXT' : undeclared identifier ERROR: 0:11: 'gl_InstanceID' : undeclared identifier (Did you mean gl_InstanceIndex?)
ERROR: 0:11: '=' : cannot convert from ' temp float' to ' temp highp int' ERROR: 0:11: '=' : cannot convert from ' temp float' to ' temp highp int'
ERROR: 0:12: 'gl_WorldRayOriginEXT' : undeclared identifier ERROR: 0:12: 'gl_InstanceCustomIndexEXT' : undeclared identifier
ERROR: 0:12: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float' ERROR: 0:12: '=' : cannot convert from ' temp float' to ' temp highp int'
ERROR: 0:13: 'gl_WorldRayDirectionEXT' : undeclared identifier ERROR: 0:13: 'gl_WorldRayOriginEXT' : undeclared identifier
ERROR: 0:13: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float' ERROR: 0:13: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
ERROR: 0:14: 'gl_ObjectRayOriginEXT' : undeclared identifier ERROR: 0:14: 'gl_WorldRayDirectionEXT' : undeclared identifier
ERROR: 0:14: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float' ERROR: 0:14: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
ERROR: 0:15: 'gl_ObjectRayDirectionEXT' : undeclared identifier ERROR: 0:15: 'gl_ObjectRayOriginEXT' : undeclared identifier
ERROR: 0:15: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float' ERROR: 0:15: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
ERROR: 0:16: 'gl_RayTminEXT' : undeclared identifier ERROR: 0:16: 'gl_ObjectRayDirectionEXT' : undeclared identifier
ERROR: 0:17: 'gl_RayTmaxEXT' : undeclared identifier ERROR: 0:16: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
ERROR: 0:18: 'gl_ObjectToWorldEXT' : undeclared identifier ERROR: 0:17: 'gl_RayTminEXT' : undeclared identifier
ERROR: 0:18: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float' ERROR: 0:18: 'gl_RayTmaxEXT' : undeclared identifier
ERROR: 0:19: 'gl_WorldToObjectEXT' : undeclared identifier ERROR: 0:19: 'gl_ObjectToWorldEXT' : undeclared identifier
ERROR: 0:19: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float' ERROR: 0:19: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
ERROR: 0:20: 'gl_HitTEXT' : undeclared identifier ERROR: 0:20: 'gl_WorldToObjectEXT' : undeclared identifier
ERROR: 0:21: 'gl_HitKindEXT' : undeclared identifier ERROR: 0:20: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
ERROR: 0:22: 'gl_IncomingRayFlagsEXT' : undeclared identifier ERROR: 0:21: 'gl_HitTEXT' : undeclared identifier
ERROR: 0:22: '=' : cannot convert from ' temp float' to ' temp highp uint' ERROR: 0:22: 'gl_HitKindEXT' : undeclared identifier
ERROR: 0:23: 'reportIntersectionEXT' : no matching overloaded function found ERROR: 0:23: 'gl_IncomingRayFlagsEXT' : undeclared identifier
ERROR: 0:24: 'ignoreIntersectionEXT' : no matching overloaded function found ERROR: 0:23: '=' : cannot convert from ' temp float' to ' temp highp uint'
ERROR: 0:25: 'terminateRayEXT' : no matching overloaded function found ERROR: 0:24: 'reportIntersectionEXT' : no matching overloaded function found
ERROR: 30 compilation errors. No code generated. ERROR: 0:25: 'ignoreIntersectionEXT' : not supported in this stage: callable
ERROR: 0:26: 'terminateRayEXT' : not supported in this stage: callable
ERROR: 0:27: 'no callableDataEXT/callableDataInEXT declared' : with layout(location = 1)
ERROR: 32 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link SPIR-V is not generated for failed compile or link

View File

@ -3,7 +3,7 @@ spv.ext.RayConstants.rgen
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 27 // Id's are bound by 27
Capability RayTracingProvisionalKHR Capability RayTracingKHR
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
@ -15,7 +15,7 @@ spv.ext.RayConstants.rgen
Name 26 "payload" Name 26 "payload"
Decorate 8(accEXT) DescriptorSet 0 Decorate 8(accEXT) DescriptorSet 0
Decorate 8(accEXT) Binding 0 Decorate 8(accEXT) Binding 0
Decorate 26(payload) Location 0 Decorate 26(payload) Location 1
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeAccelerationStructureKHR 6: TypeAccelerationStructureKHR
@ -41,6 +41,6 @@ spv.ext.RayConstants.rgen
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9: 6 Load 8(accEXT) 9: 6 Load 8(accEXT)
TraceRayKHR 9 11 12 13 13 12 17 18 20 21 23 TraceRayKHR 9 11 12 13 13 12 17 18 20 21 26(payload)
Return Return
FunctionEnd FunctionEnd

View File

@ -0,0 +1,134 @@
spv.ext.RayGenSBTlayout.rgen
// Module Version 10400
// Generated by (magic number): 8000a
// Id's are bound by 74
Capability Int64
Capability RayTracingKHR
Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint RayGenerationKHR 4 "main" 11 21 38 60
Source GLSL 460
SourceExtension "GL_ARB_gpu_shader_int64"
SourceExtension "GL_EXT_ray_tracing"
Name 4 "main"
Name 8 "lx"
Name 11 "gl_LaunchIDEXT"
Name 16 "ly"
Name 20 "sx"
Name 21 "gl_LaunchSizeEXT"
Name 24 "sy"
Name 36 "block"
MemberName 36(block) 0 "dir"
MemberName 36(block) 1 "origin"
MemberName 36(block) 2 "i"
MemberName 36(block) 3 "aHandle32"
MemberName 36(block) 4 "aHandle64"
MemberName 36(block) 5 "arr2"
MemberName 36(block) 6 "a"
MemberName 36(block) 7 "arr3"
MemberName 36(block) 8 "packme"
MemberName 36(block) 9 "b"
MemberName 36(block) 10 "c"
Name 38 ""
Name 60 "payload"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 21(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 34 ArrayStride 8
Decorate 35 ArrayStride 16
MemberDecorate 36(block) 0 Offset 0
MemberDecorate 36(block) 1 Offset 16
MemberDecorate 36(block) 2 Offset 28
MemberDecorate 36(block) 3 Offset 32
MemberDecorate 36(block) 4 Offset 40
MemberDecorate 36(block) 5 Offset 48
MemberDecorate 36(block) 6 Offset 64
MemberDecorate 36(block) 7 Offset 80
MemberDecorate 36(block) 8 Offset 112
MemberDecorate 36(block) 9 Offset 120
MemberDecorate 36(block) 10 Offset 128
Decorate 36(block) Block
Decorate 38 DescriptorSet 0
Decorate 38 Binding 0
Decorate 60(payload) Location 1
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: TypePointer Function 6(int)
9: TypeVector 6(int) 3
10: TypePointer Input 9(ivec3)
11(gl_LaunchIDEXT): 10(ptr) Variable Input
12: 6(int) Constant 0
13: TypePointer Input 6(int)
17: 6(int) Constant 1
21(gl_LaunchSizeEXT): 10(ptr) Variable Input
27: TypeFloat 32
28: TypeVector 27(float) 3
29: TypeInt 32 1
30: TypeVector 6(int) 2
31: TypeInt 64 0
32: TypeVector 27(float) 2
33: 6(int) Constant 2
34: TypeArray 32(fvec2) 33
35: TypeArray 28(fvec3) 33
36(block): TypeStruct 28(fvec3) 28(fvec3) 29(int) 30(ivec2) 31(int64_t) 34 27(float) 35 27(float) 32(fvec2) 27(float)
37: TypePointer ShaderRecordBufferKHR 36(block)
38: 37(ptr) Variable ShaderRecordBufferKHR
39: 29(int) Constant 3
40: TypePointer ShaderRecordBufferKHR 30(ivec2)
43: TypeAccelerationStructureKHR
49: 29(int) Constant 1
50: TypePointer ShaderRecordBufferKHR 28(fvec3)
53: 27(float) Constant 1056964608
54: 29(int) Constant 0
57: 27(float) Constant 1061158912
58: TypeVector 27(float) 4
59: TypePointer RayPayloadKHR 58(fvec4)
60(payload): 59(ptr) Variable RayPayloadKHR
61: 29(int) Constant 4
62: TypePointer ShaderRecordBufferKHR 31(int64_t)
4(main): 2 Function None 3
5: Label
8(lx): 7(ptr) Variable Function
16(ly): 7(ptr) Variable Function
20(sx): 7(ptr) Variable Function
24(sy): 7(ptr) Variable Function
14: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 12
15: 6(int) Load 14
Store 8(lx) 15
18: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 17
19: 6(int) Load 18
Store 16(ly) 19
22: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 12
23: 6(int) Load 22
Store 20(sx) 23
25: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 17
26: 6(int) Load 25
Store 24(sy) 26
41: 40(ptr) AccessChain 38 39
42: 30(ivec2) Load 41
44: 43 ConvertUToAccelerationStructureKHR 42
45: 6(int) Load 8(lx)
46: 6(int) Load 16(ly)
47: 6(int) Load 20(sx)
48: 6(int) Load 24(sy)
51: 50(ptr) AccessChain 38 49
52: 28(fvec3) Load 51
55: 50(ptr) AccessChain 38 54
56: 28(fvec3) Load 55
TraceRayKHR 44 45 46 47 48 12 52 53 56 57 60(payload)
63: 62(ptr) AccessChain 38 61
64: 31(int64_t) Load 63
65: 43 ConvertUToAccelerationStructureKHR 64
66: 6(int) Load 8(lx)
67: 6(int) Load 16(ly)
68: 6(int) Load 20(sx)
69: 6(int) Load 24(sy)
70: 50(ptr) AccessChain 38 49
71: 28(fvec3) Load 70
72: 50(ptr) AccessChain 38 54
73: 28(fvec3) Load 72
TraceRayKHR 65 66 67 68 69 12 71 53 73 57 60(payload)
Return
FunctionEnd

View File

@ -0,0 +1,134 @@
spv.ext.RayGenSBTlayout140.rgen
// Module Version 10400
// Generated by (magic number): 8000a
// Id's are bound by 74
Capability Int64
Capability RayTracingKHR
Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint RayGenerationKHR 4 "main" 11 21 38 60
Source GLSL 460
SourceExtension "GL_ARB_gpu_shader_int64"
SourceExtension "GL_EXT_ray_tracing"
Name 4 "main"
Name 8 "lx"
Name 11 "gl_LaunchIDEXT"
Name 16 "ly"
Name 20 "sx"
Name 21 "gl_LaunchSizeEXT"
Name 24 "sy"
Name 36 "block"
MemberName 36(block) 0 "dir"
MemberName 36(block) 1 "origin"
MemberName 36(block) 2 "i"
MemberName 36(block) 3 "aHandle32"
MemberName 36(block) 4 "aHandle64"
MemberName 36(block) 5 "arr"
MemberName 36(block) 6 "a"
MemberName 36(block) 7 "arr3"
MemberName 36(block) 8 "packme"
MemberName 36(block) 9 "b"
MemberName 36(block) 10 "c"
Name 38 ""
Name 60 "payload"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 21(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 34 ArrayStride 16
Decorate 35 ArrayStride 16
MemberDecorate 36(block) 0 Offset 0
MemberDecorate 36(block) 1 Offset 16
MemberDecorate 36(block) 2 Offset 28
MemberDecorate 36(block) 3 Offset 32
MemberDecorate 36(block) 4 Offset 40
MemberDecorate 36(block) 5 Offset 48
MemberDecorate 36(block) 6 Offset 80
MemberDecorate 36(block) 7 Offset 96
MemberDecorate 36(block) 8 Offset 128
MemberDecorate 36(block) 9 Offset 136
MemberDecorate 36(block) 10 Offset 144
Decorate 36(block) Block
Decorate 38 DescriptorSet 0
Decorate 38 Binding 0
Decorate 60(payload) Location 1
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: TypePointer Function 6(int)
9: TypeVector 6(int) 3
10: TypePointer Input 9(ivec3)
11(gl_LaunchIDEXT): 10(ptr) Variable Input
12: 6(int) Constant 0
13: TypePointer Input 6(int)
17: 6(int) Constant 1
21(gl_LaunchSizeEXT): 10(ptr) Variable Input
27: TypeFloat 32
28: TypeVector 27(float) 3
29: TypeInt 32 1
30: TypeVector 6(int) 2
31: TypeInt 64 0
32: TypeVector 27(float) 2
33: 6(int) Constant 2
34: TypeArray 32(fvec2) 33
35: TypeArray 28(fvec3) 33
36(block): TypeStruct 28(fvec3) 28(fvec3) 29(int) 30(ivec2) 31(int64_t) 34 27(float) 35 27(float) 32(fvec2) 27(float)
37: TypePointer ShaderRecordBufferKHR 36(block)
38: 37(ptr) Variable ShaderRecordBufferKHR
39: 29(int) Constant 3
40: TypePointer ShaderRecordBufferKHR 30(ivec2)
43: TypeAccelerationStructureKHR
49: 29(int) Constant 1
50: TypePointer ShaderRecordBufferKHR 28(fvec3)
53: 27(float) Constant 1056964608
54: 29(int) Constant 0
57: 27(float) Constant 1061158912
58: TypeVector 27(float) 4
59: TypePointer RayPayloadKHR 58(fvec4)
60(payload): 59(ptr) Variable RayPayloadKHR
61: 29(int) Constant 4
62: TypePointer ShaderRecordBufferKHR 31(int64_t)
4(main): 2 Function None 3
5: Label
8(lx): 7(ptr) Variable Function
16(ly): 7(ptr) Variable Function
20(sx): 7(ptr) Variable Function
24(sy): 7(ptr) Variable Function
14: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 12
15: 6(int) Load 14
Store 8(lx) 15
18: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 17
19: 6(int) Load 18
Store 16(ly) 19
22: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 12
23: 6(int) Load 22
Store 20(sx) 23
25: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 17
26: 6(int) Load 25
Store 24(sy) 26
41: 40(ptr) AccessChain 38 39
42: 30(ivec2) Load 41
44: 43 ConvertUToAccelerationStructureKHR 42
45: 6(int) Load 8(lx)
46: 6(int) Load 16(ly)
47: 6(int) Load 20(sx)
48: 6(int) Load 24(sy)
51: 50(ptr) AccessChain 38 49
52: 28(fvec3) Load 51
55: 50(ptr) AccessChain 38 54
56: 28(fvec3) Load 55
TraceRayKHR 44 45 46 47 48 12 52 53 56 57 60(payload)
63: 62(ptr) AccessChain 38 61
64: 31(int64_t) Load 63
65: 43 ConvertUToAccelerationStructureKHR 64
66: 6(int) Load 8(lx)
67: 6(int) Load 16(ly)
68: 6(int) Load 20(sx)
69: 6(int) Load 24(sy)
70: 50(ptr) AccessChain 38 49
71: 28(fvec3) Load 70
72: 50(ptr) AccessChain 38 54
73: 28(fvec3) Load 72
TraceRayKHR 65 66 67 68 69 12 71 53 73 57 60(payload)
Return
FunctionEnd

View File

@ -0,0 +1,134 @@
spv.ext.RayGenSBTlayout430.rgen
// Module Version 10400
// Generated by (magic number): 8000a
// Id's are bound by 74
Capability Int64
Capability RayTracingKHR
Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint RayGenerationKHR 4 "main" 11 21 38 60
Source GLSL 460
SourceExtension "GL_ARB_gpu_shader_int64"
SourceExtension "GL_EXT_ray_tracing"
Name 4 "main"
Name 8 "lx"
Name 11 "gl_LaunchIDEXT"
Name 16 "ly"
Name 20 "sx"
Name 21 "gl_LaunchSizeEXT"
Name 24 "sy"
Name 36 "block"
MemberName 36(block) 0 "dir"
MemberName 36(block) 1 "origin"
MemberName 36(block) 2 "i"
MemberName 36(block) 3 "aHandle32"
MemberName 36(block) 4 "aHandle64"
MemberName 36(block) 5 "arr"
MemberName 36(block) 6 "a"
MemberName 36(block) 7 "arr3"
MemberName 36(block) 8 "packme"
MemberName 36(block) 9 "b"
MemberName 36(block) 10 "c"
Name 38 ""
Name 60 "payload"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 21(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 34 ArrayStride 8
Decorate 35 ArrayStride 16
MemberDecorate 36(block) 0 Offset 0
MemberDecorate 36(block) 1 Offset 16
MemberDecorate 36(block) 2 Offset 28
MemberDecorate 36(block) 3 Offset 32
MemberDecorate 36(block) 4 Offset 40
MemberDecorate 36(block) 5 Offset 48
MemberDecorate 36(block) 6 Offset 64
MemberDecorate 36(block) 7 Offset 80
MemberDecorate 36(block) 8 Offset 112
MemberDecorate 36(block) 9 Offset 120
MemberDecorate 36(block) 10 Offset 128
Decorate 36(block) Block
Decorate 38 DescriptorSet 0
Decorate 38 Binding 0
Decorate 60(payload) Location 1
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: TypePointer Function 6(int)
9: TypeVector 6(int) 3
10: TypePointer Input 9(ivec3)
11(gl_LaunchIDEXT): 10(ptr) Variable Input
12: 6(int) Constant 0
13: TypePointer Input 6(int)
17: 6(int) Constant 1
21(gl_LaunchSizeEXT): 10(ptr) Variable Input
27: TypeFloat 32
28: TypeVector 27(float) 3
29: TypeInt 32 1
30: TypeVector 6(int) 2
31: TypeInt 64 0
32: TypeVector 27(float) 2
33: 6(int) Constant 2
34: TypeArray 32(fvec2) 33
35: TypeArray 28(fvec3) 33
36(block): TypeStruct 28(fvec3) 28(fvec3) 29(int) 30(ivec2) 31(int64_t) 34 27(float) 35 27(float) 32(fvec2) 27(float)
37: TypePointer ShaderRecordBufferKHR 36(block)
38: 37(ptr) Variable ShaderRecordBufferKHR
39: 29(int) Constant 3
40: TypePointer ShaderRecordBufferKHR 30(ivec2)
43: TypeAccelerationStructureKHR
49: 29(int) Constant 1
50: TypePointer ShaderRecordBufferKHR 28(fvec3)
53: 27(float) Constant 1056964608
54: 29(int) Constant 0
57: 27(float) Constant 1061158912
58: TypeVector 27(float) 4
59: TypePointer RayPayloadKHR 58(fvec4)
60(payload): 59(ptr) Variable RayPayloadKHR
61: 29(int) Constant 4
62: TypePointer ShaderRecordBufferKHR 31(int64_t)
4(main): 2 Function None 3
5: Label
8(lx): 7(ptr) Variable Function
16(ly): 7(ptr) Variable Function
20(sx): 7(ptr) Variable Function
24(sy): 7(ptr) Variable Function
14: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 12
15: 6(int) Load 14
Store 8(lx) 15
18: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 17
19: 6(int) Load 18
Store 16(ly) 19
22: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 12
23: 6(int) Load 22
Store 20(sx) 23
25: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 17
26: 6(int) Load 25
Store 24(sy) 26
41: 40(ptr) AccessChain 38 39
42: 30(ivec2) Load 41
44: 43 ConvertUToAccelerationStructureKHR 42
45: 6(int) Load 8(lx)
46: 6(int) Load 16(ly)
47: 6(int) Load 20(sx)
48: 6(int) Load 24(sy)
51: 50(ptr) AccessChain 38 49
52: 28(fvec3) Load 51
55: 50(ptr) AccessChain 38 54
56: 28(fvec3) Load 55
TraceRayKHR 44 45 46 47 48 12 52 53 56 57 60(payload)
63: 62(ptr) AccessChain 38 61
64: 31(int64_t) Load 63
65: 43 ConvertUToAccelerationStructureKHR 64
66: 6(int) Load 8(lx)
67: 6(int) Load 16(ly)
68: 6(int) Load 20(sx)
69: 6(int) Load 24(sy)
70: 50(ptr) AccessChain 38 49
71: 28(fvec3) Load 70
72: 50(ptr) AccessChain 38 54
73: 28(fvec3) Load 72
TraceRayKHR 65 66 67 68 69 12 71 53 73 57 60(payload)
Return
FunctionEnd

View File

@ -0,0 +1,135 @@
spv.ext.RayGenSBTlayoutscalar.rgen
// Module Version 10400
// Generated by (magic number): 8000a
// Id's are bound by 74
Capability Int64
Capability RayTracingKHR
Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint RayGenerationKHR 4 "main" 11 21 38 60
Source GLSL 460
SourceExtension "GL_ARB_gpu_shader_int64"
SourceExtension "GL_EXT_ray_tracing"
SourceExtension "GL_EXT_scalar_block_layout"
Name 4 "main"
Name 8 "lx"
Name 11 "gl_LaunchIDEXT"
Name 16 "ly"
Name 20 "sx"
Name 21 "gl_LaunchSizeEXT"
Name 24 "sy"
Name 36 "block"
MemberName 36(block) 0 "dir"
MemberName 36(block) 1 "origin"
MemberName 36(block) 2 "i"
MemberName 36(block) 3 "aHandle32"
MemberName 36(block) 4 "aHandle64"
MemberName 36(block) 5 "arr"
MemberName 36(block) 6 "a"
MemberName 36(block) 7 "arr3"
MemberName 36(block) 8 "packme"
MemberName 36(block) 9 "b"
MemberName 36(block) 10 "c"
Name 38 ""
Name 60 "payload"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 21(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 34 ArrayStride 8
Decorate 35 ArrayStride 12
MemberDecorate 36(block) 0 Offset 0
MemberDecorate 36(block) 1 Offset 12
MemberDecorate 36(block) 2 Offset 24
MemberDecorate 36(block) 3 Offset 28
MemberDecorate 36(block) 4 Offset 40
MemberDecorate 36(block) 5 Offset 48
MemberDecorate 36(block) 6 Offset 64
MemberDecorate 36(block) 7 Offset 68
MemberDecorate 36(block) 8 Offset 92
MemberDecorate 36(block) 9 Offset 96
MemberDecorate 36(block) 10 Offset 104
Decorate 36(block) Block
Decorate 38 DescriptorSet 0
Decorate 38 Binding 0
Decorate 60(payload) Location 1
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: TypePointer Function 6(int)
9: TypeVector 6(int) 3
10: TypePointer Input 9(ivec3)
11(gl_LaunchIDEXT): 10(ptr) Variable Input
12: 6(int) Constant 0
13: TypePointer Input 6(int)
17: 6(int) Constant 1
21(gl_LaunchSizeEXT): 10(ptr) Variable Input
27: TypeFloat 32
28: TypeVector 27(float) 3
29: TypeInt 32 1
30: TypeVector 6(int) 2
31: TypeInt 64 0
32: TypeVector 27(float) 2
33: 6(int) Constant 2
34: TypeArray 32(fvec2) 33
35: TypeArray 28(fvec3) 33
36(block): TypeStruct 28(fvec3) 28(fvec3) 29(int) 30(ivec2) 31(int64_t) 34 27(float) 35 27(float) 32(fvec2) 27(float)
37: TypePointer ShaderRecordBufferKHR 36(block)
38: 37(ptr) Variable ShaderRecordBufferKHR
39: 29(int) Constant 3
40: TypePointer ShaderRecordBufferKHR 30(ivec2)
43: TypeAccelerationStructureKHR
49: 29(int) Constant 1
50: TypePointer ShaderRecordBufferKHR 28(fvec3)
53: 27(float) Constant 1056964608
54: 29(int) Constant 0
57: 27(float) Constant 1061158912
58: TypeVector 27(float) 4
59: TypePointer RayPayloadKHR 58(fvec4)
60(payload): 59(ptr) Variable RayPayloadKHR
61: 29(int) Constant 4
62: TypePointer ShaderRecordBufferKHR 31(int64_t)
4(main): 2 Function None 3
5: Label
8(lx): 7(ptr) Variable Function
16(ly): 7(ptr) Variable Function
20(sx): 7(ptr) Variable Function
24(sy): 7(ptr) Variable Function
14: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 12
15: 6(int) Load 14
Store 8(lx) 15
18: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 17
19: 6(int) Load 18
Store 16(ly) 19
22: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 12
23: 6(int) Load 22
Store 20(sx) 23
25: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 17
26: 6(int) Load 25
Store 24(sy) 26
41: 40(ptr) AccessChain 38 39
42: 30(ivec2) Load 41
44: 43 ConvertUToAccelerationStructureKHR 42
45: 6(int) Load 8(lx)
46: 6(int) Load 16(ly)
47: 6(int) Load 20(sx)
48: 6(int) Load 24(sy)
51: 50(ptr) AccessChain 38 49
52: 28(fvec3) Load 51
55: 50(ptr) AccessChain 38 54
56: 28(fvec3) Load 55
TraceRayKHR 44 45 46 47 48 12 52 53 56 57 60(payload)
63: 62(ptr) AccessChain 38 61
64: 31(int64_t) Load 63
65: 43 ConvertUToAccelerationStructureKHR 64
66: 6(int) Load 8(lx)
67: 6(int) Load 16(ly)
68: 6(int) Load 20(sx)
69: 6(int) Load 24(sy)
70: 50(ptr) AccessChain 38 49
71: 28(fvec3) Load 70
72: 50(ptr) AccessChain 38 54
73: 28(fvec3) Load 72
TraceRayKHR 65 66 67 68 69 12 71 53 73 57 60(payload)
Return
FunctionEnd

View File

@ -3,12 +3,12 @@ spv.ext.RayGenShader.rgen
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 58 // Id's are bound by 58
Capability RayTraversalPrimitiveCullingProvisionalKHR Capability RayTraversalPrimitiveCullingKHR
Capability RayTracingProvisionalKHR Capability RayTracingKHR
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint RayGenerationKHR 4 "main" 11 21 29 40 51 54 57 EntryPoint RayGenerationKHR 4 "main" 11 21 29 40 53 54 57
Source GLSL 460 Source GLSL 460
SourceExtension "GL_EXT_ray_flags_primitive_culling" SourceExtension "GL_EXT_ray_flags_primitive_culling"
SourceExtension "GL_EXT_ray_tracing" SourceExtension "GL_EXT_ray_tracing"
@ -24,9 +24,9 @@ spv.ext.RayGenShader.rgen
MemberName 38(block) 0 "dir" MemberName 38(block) 0 "dir"
MemberName 38(block) 1 "origin" MemberName 38(block) 1 "origin"
Name 40 "" Name 40 ""
Name 51 "accEXT1" Name 53 "payload"
Name 54 "imageu" Name 54 "accEXT1"
Name 57 "payload" Name 57 "imageu"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 21(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR Decorate 21(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 29(accEXT0) DescriptorSet 0 Decorate 29(accEXT0) DescriptorSet 0
@ -36,11 +36,11 @@ spv.ext.RayGenShader.rgen
Decorate 38(block) Block Decorate 38(block) Block
Decorate 40 DescriptorSet 0 Decorate 40 DescriptorSet 0
Decorate 40 Binding 3 Decorate 40 Binding 3
Decorate 51(accEXT1) DescriptorSet 0 Decorate 53(payload) Location 1
Decorate 51(accEXT1) Binding 1 Decorate 54(accEXT1) DescriptorSet 0
Decorate 54(imageu) DescriptorSet 0 Decorate 54(accEXT1) Binding 1
Decorate 54(imageu) Binding 2 Decorate 57(imageu) DescriptorSet 0
Decorate 57(payload) Location 0 Decorate 57(imageu) Binding 2
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -67,13 +67,13 @@ spv.ext.RayGenShader.rgen
46: 36(float) Constant 1056964608 46: 36(float) Constant 1056964608
47: 41(int) Constant 0 47: 41(int) Constant 0
50: 36(float) Constant 1061158912 50: 36(float) Constant 1061158912
51(accEXT1): 28(ptr) Variable UniformConstant 51: TypeVector 36(float) 4
52: TypeImage 6(int) 2D nonsampled format:R32ui 52: TypePointer RayPayloadKHR 51(fvec4)
53: TypePointer UniformConstant 52 53(payload): 52(ptr) Variable RayPayloadKHR
54(imageu): 53(ptr) Variable UniformConstant 54(accEXT1): 28(ptr) Variable UniformConstant
55: TypeVector 36(float) 4 55: TypeImage 6(int) 2D nonsampled format:R32ui
56: TypePointer RayPayloadKHR 55(fvec4) 56: TypePointer UniformConstant 55
57(payload): 56(ptr) Variable RayPayloadKHR 57(imageu): 56(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(lx): 7(ptr) Variable Function 8(lx): 7(ptr) Variable Function
@ -101,6 +101,6 @@ spv.ext.RayGenShader.rgen
45: 37(fvec3) Load 44 45: 37(fvec3) Load 44
48: 43(ptr) AccessChain 40 47 48: 43(ptr) AccessChain 40 47
49: 37(fvec3) Load 48 49: 37(fvec3) Load 48
TraceRayKHR 30 31 32 33 34 35 45 46 49 50 42 TraceRayKHR 30 31 32 33 34 35 45 46 49 50 53(payload)
Return Return
FunctionEnd FunctionEnd

View File

@ -3,7 +3,7 @@ spv.ext.RayGenShader11.rgen
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 53 // Id's are bound by 53
Capability RayTracingProvisionalKHR Capability RayTracingKHR
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
@ -32,7 +32,7 @@ spv.ext.RayGenShader11.rgen
Decorate 37(block) Block Decorate 37(block) Block
Decorate 39 DescriptorSet 0 Decorate 39 DescriptorSet 0
Decorate 39 Binding 1 Decorate 39 Binding 1
Decorate 52(payload) Location 0 Decorate 52(payload) Location 1
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -88,6 +88,6 @@ spv.ext.RayGenShader11.rgen
44: 36(fvec3) Load 43 44: 36(fvec3) Load 43
47: 42(ptr) AccessChain 39 46 47: 42(ptr) AccessChain 39 46
48: 36(fvec3) Load 47 48: 36(fvec3) Load 47
TraceRayKHR 30 31 32 33 34 12 44 45 48 49 41 TraceRayKHR 30 31 32 33 34 12 44 45 48 49 52(payload)
Return Return
FunctionEnd FunctionEnd

View File

@ -1,17 +1,19 @@
spv.ext.RayGenShaderArray.rgen spv.ext.RayGenShaderArray.rgen
// Module Version 10400 // Module Version 10400
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 89 // Id's are bound by 117
Capability Int64
Capability RayTracingKHR
Capability ShaderNonUniformEXT Capability ShaderNonUniformEXT
Capability RuntimeDescriptorArrayEXT Capability RuntimeDescriptorArrayEXT
Capability RayTracingProvisionalKHR
Extension "SPV_EXT_descriptor_indexing" Extension "SPV_EXT_descriptor_indexing"
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint RayGenerationKHR 4 "main" 11 21 30 36 60 88 EntryPoint RayGenerationKHR 4 "main" 11 21 30 38 61 65
Source GLSL 460 Source GLSL 460
SourceExtension "GL_ARB_gpu_shader_int64"
SourceExtension "GL_EXT_nonuniform_qualifier" SourceExtension "GL_EXT_nonuniform_qualifier"
SourceExtension "GL_EXT_ray_tracing" SourceExtension "GL_EXT_ray_tracing"
Name 4 "main" Name 4 "main"
@ -22,29 +24,33 @@ spv.ext.RayGenShaderArray.rgen
Name 21 "gl_LaunchSizeEXT" Name 21 "gl_LaunchSizeEXT"
Name 24 "sy" Name 24 "sy"
Name 30 "accEXT0" Name 30 "accEXT0"
Name 34 "block" Name 36 "block"
MemberName 34(block) 0 "dir" MemberName 36(block) 0 "dir"
MemberName 34(block) 1 "origin" MemberName 36(block) 1 "origin"
MemberName 34(block) 2 "i" MemberName 36(block) 2 "i"
Name 36 "" MemberName 36(block) 3 "aHandle32"
Name 60 "accEXT1" MemberName 36(block) 4 "aHandle64"
Name 88 "payload" Name 38 ""
Name 61 "payload"
Name 65 "accEXT1"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 21(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR Decorate 21(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 30(accEXT0) DescriptorSet 0 Decorate 30(accEXT0) DescriptorSet 0
Decorate 30(accEXT0) Binding 0 Decorate 30(accEXT0) Binding 0
MemberDecorate 34(block) 0 Offset 0 MemberDecorate 36(block) 0 Offset 0
MemberDecorate 34(block) 1 Offset 16 MemberDecorate 36(block) 1 Offset 16
MemberDecorate 34(block) 2 Offset 28 MemberDecorate 36(block) 2 Offset 28
Decorate 34(block) Block MemberDecorate 36(block) 3 Offset 32
Decorate 36 DescriptorSet 0 MemberDecorate 36(block) 4 Offset 40
Decorate 36 Binding 2 Decorate 36(block) Block
Decorate 60(accEXT1) DescriptorSet 0 Decorate 38 DescriptorSet 0
Decorate 60(accEXT1) Binding 1 Decorate 38 Binding 2
Decorate 75 DecorationNonUniformEXT Decorate 61(payload) Location 1
Decorate 76 DecorationNonUniformEXT Decorate 65(accEXT1) DescriptorSet 0
Decorate 77 DecorationNonUniformEXT Decorate 65(accEXT1) Binding 1
Decorate 88(payload) Location 0 Decorate 80 DecorationNonUniformEXT
Decorate 81 DecorationNonUniformEXT
Decorate 82 DecorationNonUniformEXT
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -63,24 +69,30 @@ spv.ext.RayGenShaderArray.rgen
31: TypeFloat 32 31: TypeFloat 32
32: TypeVector 31(float) 3 32: TypeVector 31(float) 3
33: TypeInt 32 1 33: TypeInt 32 1
34(block): TypeStruct 32(fvec3) 32(fvec3) 33(int) 34: TypeVector 6(int) 2
35: TypePointer ShaderRecordBufferKHR 34(block) 35: TypeInt 64 0
36: 35(ptr) Variable ShaderRecordBufferKHR 36(block): TypeStruct 32(fvec3) 32(fvec3) 33(int) 34(ivec2) 35(int64_t)
37: 33(int) Constant 2 37: TypePointer ShaderRecordBufferKHR 36(block)
38: TypePointer ShaderRecordBufferKHR 33(int) 38: 37(ptr) Variable ShaderRecordBufferKHR
41: TypePointer UniformConstant 27 39: 33(int) Constant 2
48: 33(int) Constant 1 40: TypePointer ShaderRecordBufferKHR 33(int)
49: TypePointer ShaderRecordBufferKHR 32(fvec3) 43: TypePointer UniformConstant 27
52: 31(float) Constant 1056964608 50: 33(int) Constant 1
53: 33(int) Constant 0 51: TypePointer ShaderRecordBufferKHR 32(fvec3)
56: 31(float) Constant 1061158912 54: 31(float) Constant 1056964608
57: 6(int) Constant 2 55: 33(int) Constant 0
58: TypeArray 27 57 58: 31(float) Constant 1061158912
59: TypePointer UniformConstant 58 59: TypeVector 31(float) 4
60(accEXT1): 59(ptr) Variable UniformConstant 60: TypePointer RayPayloadKHR 59(fvec4)
86: TypeVector 31(float) 4 61(payload): 60(ptr) Variable RayPayloadKHR
87: TypePointer RayPayloadKHR 86(fvec4) 62: 6(int) Constant 2
88(payload): 87(ptr) Variable RayPayloadKHR 63: TypeArray 27 62
64: TypePointer UniformConstant 63
65(accEXT1): 64(ptr) Variable UniformConstant
91: 33(int) Constant 3
92: TypePointer ShaderRecordBufferKHR 34(ivec2)
104: 33(int) Constant 4
105: TypePointer ShaderRecordBufferKHR 35(int64_t)
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(lx): 7(ptr) Variable Function 8(lx): 7(ptr) Variable Function
@ -99,45 +111,69 @@ spv.ext.RayGenShaderArray.rgen
25: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 17 25: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 17
26: 6(int) Load 25 26: 6(int) Load 25
Store 24(sy) 26 Store 24(sy) 26
39: 38(ptr) AccessChain 36 37 41: 40(ptr) AccessChain 38 39
40: 33(int) Load 39 42: 33(int) Load 41
42: 41(ptr) AccessChain 30(accEXT0) 40 44: 43(ptr) AccessChain 30(accEXT0) 42
43: 27 Load 42 45: 27 Load 44
44: 6(int) Load 8(lx) 46: 6(int) Load 8(lx)
45: 6(int) Load 16(ly) 47: 6(int) Load 16(ly)
46: 6(int) Load 20(sx) 48: 6(int) Load 20(sx)
47: 6(int) Load 24(sy) 49: 6(int) Load 24(sy)
50: 49(ptr) AccessChain 36 48 52: 51(ptr) AccessChain 38 50
51: 32(fvec3) Load 50 53: 32(fvec3) Load 52
54: 49(ptr) AccessChain 36 53 56: 51(ptr) AccessChain 38 55
55: 32(fvec3) Load 54 57: 32(fvec3) Load 56
TraceRayKHR 43 44 45 46 47 12 51 52 55 56 48 TraceRayKHR 45 46 47 48 49 12 53 54 57 58 61(payload)
61: 38(ptr) AccessChain 36 37 66: 40(ptr) AccessChain 38 39
62: 33(int) Load 61 67: 33(int) Load 66
63: 41(ptr) AccessChain 60(accEXT1) 62 68: 43(ptr) AccessChain 65(accEXT1) 67
64: 27 Load 63 69: 27 Load 68
65: 6(int) Load 8(lx) 70: 6(int) Load 8(lx)
66: 6(int) Load 16(ly) 71: 6(int) Load 16(ly)
67: 6(int) Load 20(sx) 72: 6(int) Load 20(sx)
68: 6(int) Load 24(sy) 73: 6(int) Load 24(sy)
69: 49(ptr) AccessChain 36 48 74: 51(ptr) AccessChain 38 50
70: 32(fvec3) Load 69 75: 32(fvec3) Load 74
71: 49(ptr) AccessChain 36 53 76: 51(ptr) AccessChain 38 55
72: 32(fvec3) Load 71 77: 32(fvec3) Load 76
TraceRayKHR 64 65 66 67 68 12 70 52 72 56 48 TraceRayKHR 69 70 71 72 73 12 75 54 77 58 61(payload)
73: 38(ptr) AccessChain 36 37 78: 40(ptr) AccessChain 38 39
74: 33(int) Load 73 79: 33(int) Load 78
75: 33(int) CopyObject 74 80: 33(int) CopyObject 79
76: 41(ptr) AccessChain 30(accEXT0) 75 81: 43(ptr) AccessChain 30(accEXT0) 80
77: 27 Load 76 82: 27 Load 81
78: 6(int) Load 8(lx) 83: 6(int) Load 8(lx)
79: 6(int) Load 16(ly) 84: 6(int) Load 16(ly)
80: 6(int) Load 20(sx) 85: 6(int) Load 20(sx)
81: 6(int) Load 24(sy) 86: 6(int) Load 24(sy)
82: 49(ptr) AccessChain 36 48 87: 51(ptr) AccessChain 38 50
83: 32(fvec3) Load 82 88: 32(fvec3) Load 87
84: 49(ptr) AccessChain 36 53 89: 51(ptr) AccessChain 38 55
85: 32(fvec3) Load 84 90: 32(fvec3) Load 89
TraceRayKHR 77 78 79 80 81 12 83 52 85 56 48 TraceRayKHR 82 83 84 85 86 12 88 54 90 58 61(payload)
93: 92(ptr) AccessChain 38 91
94: 34(ivec2) Load 93
95: 27 ConvertUToAccelerationStructureKHR 94
96: 6(int) Load 8(lx)
97: 6(int) Load 16(ly)
98: 6(int) Load 20(sx)
99: 6(int) Load 24(sy)
100: 51(ptr) AccessChain 38 50
101: 32(fvec3) Load 100
102: 51(ptr) AccessChain 38 55
103: 32(fvec3) Load 102
TraceRayKHR 95 96 97 98 99 12 101 54 103 58 61(payload)
106: 105(ptr) AccessChain 38 104
107: 35(int64_t) Load 106
108: 27 ConvertUToAccelerationStructureKHR 107
109: 6(int) Load 8(lx)
110: 6(int) Load 16(ly)
111: 6(int) Load 20(sx)
112: 6(int) Load 24(sy)
113: 51(ptr) AccessChain 38 50
114: 32(fvec3) Load 113
115: 51(ptr) AccessChain 38 55
116: 32(fvec3) Load 115
TraceRayKHR 108 109 110 111 112 12 114 54 116 58 61(payload)
Return Return
FunctionEnd FunctionEnd

View File

@ -4,8 +4,9 @@ ERROR: 0:4: 'rayPayloadInEXT' : not supported in this stage: ray-generation
ERROR: 0:5: 'shaderRecordNV' : can only be used with a buffer ERROR: 0:5: 'shaderRecordNV' : can only be used with a buffer
ERROR: 0:9: 'binding' : cannot be used with shaderRecordNV ERROR: 0:9: 'binding' : cannot be used with shaderRecordNV
ERROR: 0:12: 'set' : cannot be used with shaderRecordNV ERROR: 0:12: 'set' : cannot be used with shaderRecordNV
ERROR: 0:23: ' temp accelerationStructureNV' : cannot construct with these arguments
ERROR: 0:23: 'accelerationStructureNV' : accelerationStructureNV can only be used in uniform variables or function parameters: a ERROR: 0:23: 'accelerationStructureNV' : accelerationStructureNV can only be used in uniform variables or function parameters: a
ERROR: 0:23: '=' : cannot convert from ' const int' to ' temp accelerationStructureNV' ERROR: 0:23: '=' : cannot convert from ' const float' to ' temp accelerationStructureNV'
ERROR: 0:24: 'gl_PrimitiveID' : undeclared identifier ERROR: 0:24: 'gl_PrimitiveID' : undeclared identifier
ERROR: 0:24: '=' : cannot convert from ' temp float' to ' temp highp int' ERROR: 0:24: '=' : cannot convert from ' temp float' to ' temp highp int'
ERROR: 0:25: 'gl_InstanceID' : undeclared identifier (Did you mean gl_InstanceIndex?) ERROR: 0:25: 'gl_InstanceID' : undeclared identifier (Did you mean gl_InstanceIndex?)
@ -28,11 +29,13 @@ ERROR: 0:34: 'gl_WorldToObjectEXT' : undeclared identifier
ERROR: 0:34: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float' ERROR: 0:34: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
ERROR: 0:35: 'gl_HitTEXT' : undeclared identifier ERROR: 0:35: 'gl_HitTEXT' : undeclared identifier
ERROR: 0:36: 'gl_HitKindEXT' : undeclared identifier ERROR: 0:36: 'gl_HitKindEXT' : undeclared identifier
ERROR: 0:37: 'reportIntersectionEXT' : no matching overloaded function found ERROR: 0:37: 'gl_RayFlagsSkipAABBEXT' : required extension not requested: GL_EXT_ray_flags_primitive_culling
ERROR: 0:38: 'ignoreIntersectionEXT' : no matching overloaded function found ERROR: 0:37: '=' : cannot convert from ' const uint' to ' temp highp int'
ERROR: 0:39: 'terminateRayEXT' : no matching overloaded function found ERROR: 0:38: 'reportIntersectionEXT' : no matching overloaded function found
ERROR: 0:40: 'assign' : l-value required "anon@3" (can't modify a shaderrecordnv qualified buffer) ERROR: 0:39: 'ignoreIntersectionEXT' : not supported in this stage: ray-generation
ERROR: 33 compilation errors. No code generated. ERROR: 0:40: 'terminateRayEXT' : not supported in this stage: ray-generation
ERROR: 0:41: 'assign' : l-value required "anon@3" (can't modify a shaderrecordnv qualified buffer)
ERROR: 36 compilation errors. No code generated.
ERROR: Linking ray-generation stage: Only one shaderRecordNV buffer block is allowed per stage ERROR: Linking ray-generation stage: Only one shaderRecordNV buffer block is allowed per stage

View File

@ -3,7 +3,7 @@ spv.ext.World3x4.rahit
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 90 // Id's are bound by 90
Capability RayTracingProvisionalKHR Capability RayTracingKHR
Extension "SPV_KHR_ray_tracing" Extension "SPV_KHR_ray_tracing"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450

View File

@ -1,5 +1,4 @@
spv.meshShaderPerViewBuiltins.mesh spv.meshShaderPerViewBuiltins.mesh
Validation failed
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 126 // Id's are bound by 126

31
Test/rayQuery-global.rgen Normal file
View File

@ -0,0 +1,31 @@
#version 460
#extension GL_EXT_ray_query : enable
#extension GL_EXT_ray_flags_primitive_culling : enable
layout(binding = 1, set = 0) uniform accelerationStructureEXT rtas;
rayQueryEXT rqGlobal;
void otherWrapper(rayQueryEXT rq) {
rayQueryProceedEXT(rq);
rayQueryProceedEXT(rqGlobal);
}
void wrapper(rayQueryEXT rq) {
rayQueryEXT rq2;
rayQueryProceedEXT(rq);
rayQueryProceedEXT(rqGlobal);
otherWrapper(rq);
otherWrapper(rq2);
otherWrapper(rqGlobal);
}
void main() {
rayQueryInitializeEXT(rqGlobal, rtas, gl_RayFlagsNoneEXT, 0xFF, vec3(0,0,0), 0.0, vec3(1,0,0), 1.0);
wrapper(rqGlobal);
otherWrapper(rqGlobal);
rayQueryEXT rq2;
rayQueryInitializeEXT(rq2, rtas, gl_RayFlagsNoneEXT, 0xFF, vec3(0,0,0), 0.0, vec3(1,0,0), 1.0);
wrapper(rq2);
otherWrapper(rq2);
}

View File

@ -1,5 +1,6 @@
#version 460 #version 460
#extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_tracing : enable
#extension GL_KHR_shader_subgroup_basic : enable
layout(location = 1) rayPayloadInEXT vec4 incomingPayload; layout(location = 1) rayPayloadInEXT vec4 incomingPayload;
void main() void main()
{ {
@ -22,8 +23,10 @@ void main()
mat3x4 v16 = gl_ObjectToWorld3x4EXT; mat3x4 v16 = gl_ObjectToWorld3x4EXT;
mat3x4 v17 = gl_WorldToObject3x4EXT; mat3x4 v17 = gl_WorldToObject3x4EXT;
incomingPayload = vec4(0.5f); incomingPayload = vec4(0.5f);
if (v2 == 1) if (v2 == 1) {
ignoreIntersectionEXT(); ignoreIntersectionEXT;
else v0.x++;
terminateRayEXT(); }
incomingPayload.x += float(gl_SubgroupSize);
terminateRayEXT;
} }

View File

@ -2,12 +2,14 @@
#extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_tracing : enable
hitAttributeEXT vec4 payload; hitAttributeEXT vec4 payload;
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT; layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
layout(location = 2) rayPayloadEXT vec4 payload0;
layout(location = 2) rayPayloadInEXT block { vec4 data; }; // ERROR : location already used
void main() void main()
{ {
payload.x = 1.0f; // ERROR, cannot write to hitattributeEXT in stage payload.x = 1.0f; // ERROR, cannot write to hitattributeEXT in stage
reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage
terminateRayEXT(); terminateRayEXT;
ignoreIntersectionEXT(); ignoreIntersectionEXT;
bool e1 = gl_IncomingRayFlagsEXT == gl_RayFlagsSkipAABBEXT; bool e1 = gl_IncomingRayFlagsEXT == gl_RayFlagsSkipAABBEXT;
traceRayEXT(accEXT, 0, 0, 0, 0, 0, vec3(0.0), 0.0, vec3(1.0), 1.0, 0); //ERROR no payload variable with location = 0
} }

View File

@ -0,0 +1,16 @@
#version 460
#pragma use_vulkan_memory_model
#extension GL_EXT_ray_tracing : enable
#extension GL_NV_shader_sm_builtins : enable
#extension GL_KHR_shader_subgroup_ballot : enable
#extension GL_ARB_shader_ballot : enable
#extension GL_NV_shader_sm_builtins : enable
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
layout(location = 1) rayPayloadInEXT vec4 incomingPayload;
void main()
{
traceRayEXT(accEXT, 0u, 1u, 2u, 3u, 0u, vec3(0.5f), 0.5f, vec3(1.0f), 0.75f, 1);
incomingPayload.x = float(gl_SubgroupInvocationID) + float(gl_SubGroupGeMaskARB) +
float(gl_SubgroupGtMask) + float(gl_SubgroupLeMask) +
float(gl_SubGroupLtMaskARB) + float(gl_SMIDNV);
}

View File

@ -1,5 +1,9 @@
#version 460 #version 460
#extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_tracing : enable
#extension GL_NV_shader_sm_builtins : enable
#extension GL_KHR_shader_subgroup_ballot : enable
#extension GL_ARB_shader_ballot : enable
#extension GL_NV_shader_sm_builtins : 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;
layout(location = 1) rayPayloadInEXT vec4 incomingPayload; layout(location = 1) rayPayloadInEXT vec4 incomingPayload;
@ -12,4 +16,5 @@ void main()
float v4 = gl_RayTminEXT; float v4 = gl_RayTminEXT;
float v5 = gl_RayTmaxEXT; float v5 = gl_RayTmaxEXT;
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);
incomingPayload.x = float(gl_SubGroupSizeARB) + float(gl_SubgroupEqMask) + float(gl_WarpIDNV);
} }

View File

@ -11,6 +11,6 @@ void main()
float e12 = gl_HitTEXT; // ERROR, unsupported builtin in stage float e12 = gl_HitTEXT; // ERROR, unsupported builtin in stage
float e13 = gl_HitKindEXT; // ERROR, unsupported builtin in stage float e13 = gl_HitKindEXT; // ERROR, unsupported builtin in stage
reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage
ignoreIntersectionEXT(); // ERROR, unsupported builtin in stage ignoreIntersectionEXT; // ERROR, unsupported in stage
terminateRayEXT(); // ERROR, unsupported builtin in stage terminateRayEXT; // ERROR, unsupported in stage
} }

View File

@ -3,7 +3,8 @@
hitAttributeEXT vec4 hitattr; // ERROR, hitattributeEXT unsupported in this stage hitAttributeEXT vec4 hitattr; // ERROR, hitattributeEXT unsupported in this stage
rayPayloadEXT vec4 payload; // ERROR, rayPayloadEXT unsupported in this stage rayPayloadEXT vec4 payload; // ERROR, rayPayloadEXT unsupported in this stage
rayPayloadInEXT vec4 payloadIn; // ERROR, rayPayloadInEXT unsupported in this stage rayPayloadInEXT vec4 payloadIn; // ERROR, rayPayloadInEXT unsupported in this stage
layout(location = 0) callableDataEXT vec4 cd0;
layout(location = 0) callableDataEXT float cd1; // ERROR, location already used
void main() void main()
{ {
int e0 = gl_PrimitiveID; // ERROR, unsupported builtin in stage int e0 = gl_PrimitiveID; // ERROR, unsupported builtin in stage
@ -21,6 +22,7 @@ void main()
float e13 = gl_HitKindEXT; // ERROR, unsupported builtin in stage float e13 = gl_HitKindEXT; // ERROR, unsupported builtin in stage
uint curFlags = gl_IncomingRayFlagsEXT; // ERROR, unsupported builtin in stage uint curFlags = gl_IncomingRayFlagsEXT; // ERROR, unsupported builtin in stage
reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage
ignoreIntersectionEXT(); // ERROR, unsupported builtin in stage ignoreIntersectionEXT; // ERROR, unsupported in stage
terminateRayEXT(); // ERROR, unsupported builtin in stage terminateRayEXT; // ERROR, unsupported in stage
executeCallableEXT(1,1); // ERROR, no callable data with location 1
} }

View File

@ -1,7 +1,7 @@
#version 460 #version 460
#extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_tracing : enable
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT; layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
layout(location = 0) rayPayloadEXT vec4 payload; layout(location = 1) rayPayloadEXT vec4 payload;
void main() void main()
{ {
const uint rayFlags = gl_RayFlagsNoneEXT | gl_RayFlagsOpaqueEXT | const uint rayFlags = gl_RayFlagsNoneEXT | gl_RayFlagsOpaqueEXT |

View File

@ -0,0 +1,28 @@
#version 460
#extension GL_EXT_ray_tracing : enable
#extension GL_ARB_gpu_shader_int64 : enable
layout(location = 1) rayPayloadEXT vec4 payload;
// should get std430 layout
layout(shaderRecordEXT) buffer block
{
vec3 dir;
vec3 origin;
int i;
uvec2 aHandle32;
uint64_t aHandle64;
vec2 arr2[2];
float a;
vec3 arr3[2];
float packme;
vec2 b;
float c;
};
void main()
{
uint lx = gl_LaunchIDEXT.x;
uint ly = gl_LaunchIDEXT.y;
uint sx = gl_LaunchSizeEXT.x;
uint sy = gl_LaunchSizeEXT.y;
traceRayEXT(accelerationStructureEXT(aHandle32), lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
traceRayEXT(accelerationStructureEXT(aHandle64), lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
}

View File

@ -0,0 +1,27 @@
#version 460
#extension GL_EXT_ray_tracing : enable
#extension GL_ARB_gpu_shader_int64 : enable
layout(location = 1) rayPayloadEXT vec4 payload;
layout(shaderRecordEXT, std140) buffer block
{
vec3 dir;
vec3 origin;
int i;
uvec2 aHandle32;
uint64_t aHandle64;
vec2 arr[2];
float a;
vec3 arr3[2];
float packme;
vec2 b;
float c;
};
void main()
{
uint lx = gl_LaunchIDEXT.x;
uint ly = gl_LaunchIDEXT.y;
uint sx = gl_LaunchSizeEXT.x;
uint sy = gl_LaunchSizeEXT.y;
traceRayEXT(accelerationStructureEXT(aHandle32), lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
traceRayEXT(accelerationStructureEXT(aHandle64), lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
}

View File

@ -0,0 +1,27 @@
#version 460
#extension GL_EXT_ray_tracing : enable
#extension GL_ARB_gpu_shader_int64 : enable
layout(location = 1) rayPayloadEXT vec4 payload;
layout(shaderRecordEXT, std430) buffer block
{
vec3 dir;
vec3 origin;
int i;
uvec2 aHandle32;
uint64_t aHandle64;
vec2 arr[2];
float a;
vec3 arr3[2];
float packme;
vec2 b;
float c;
};
void main()
{
uint lx = gl_LaunchIDEXT.x;
uint ly = gl_LaunchIDEXT.y;
uint sx = gl_LaunchSizeEXT.x;
uint sy = gl_LaunchSizeEXT.y;
traceRayEXT(accelerationStructureEXT(aHandle32), lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
traceRayEXT(accelerationStructureEXT(aHandle64), lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
}

View File

@ -0,0 +1,28 @@
#version 460
#extension GL_EXT_ray_tracing : enable
#extension GL_ARB_gpu_shader_int64 : enable
#extension GL_EXT_scalar_block_layout : enable
layout(location = 1) rayPayloadEXT vec4 payload;
layout(shaderRecordEXT, scalar) buffer block
{
vec3 dir;
vec3 origin;
int i;
uvec2 aHandle32;
uint64_t aHandle64;
vec2 arr[2];
float a;
vec3 arr3[2];
float packme;
vec2 b;
float c;
};
void main()
{
uint lx = gl_LaunchIDEXT.x;
uint ly = gl_LaunchIDEXT.y;
uint sx = gl_LaunchSizeEXT.x;
uint sy = gl_LaunchSizeEXT.y;
traceRayEXT(accelerationStructureEXT(aHandle32), lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
traceRayEXT(accelerationStructureEXT(aHandle64), lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
}

View File

@ -4,7 +4,7 @@
layout(binding = 0) uniform accelerationStructureEXT accEXT0; layout(binding = 0) uniform accelerationStructureEXT accEXT0;
layout(binding = 1, set = 0) uniform accelerationStructureEXT accEXT1; // Unused layout(binding = 1, set = 0) uniform accelerationStructureEXT accEXT1; // Unused
layout(binding = 2, r32ui) shadercallcoherent uniform uimage2D imageu; layout(binding = 2, r32ui) shadercallcoherent uniform uimage2D imageu;
layout(location = 0) rayPayloadEXT vec4 payload; layout(location = 1) rayPayloadEXT vec4 payload;
layout(shaderRecordEXT) buffer block layout(shaderRecordEXT) buffer block
{ {
vec3 dir; vec3 dir;

View File

@ -1,7 +1,7 @@
#version 460 #version 460
#extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_tracing : enable
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT; layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
layout(location = 0) rayPayloadEXT vec4 payload; layout(location = 1) rayPayloadEXT vec4 payload;
layout(shaderRecordEXT) buffer block layout(shaderRecordEXT) buffer block
{ {
vec3 dir; vec3 dir;

View File

@ -1,14 +1,17 @@
#version 460 #version 460
#extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_tracing : enable
#extension GL_EXT_nonuniform_qualifier : enable #extension GL_EXT_nonuniform_qualifier : enable
#extension GL_ARB_gpu_shader_int64 : enable
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT0[]; layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT0[];
layout(binding = 1, set = 0) uniform accelerationStructureEXT accEXT1[2]; layout(binding = 1, set = 0) uniform accelerationStructureEXT accEXT1[2];
layout(location = 0) rayPayloadEXT vec4 payload; layout(location = 1) rayPayloadEXT vec4 payload;
layout(shaderRecordEXT) buffer block layout(shaderRecordEXT) buffer block
{ {
vec3 dir; vec3 dir;
vec3 origin; vec3 origin;
int i; int i;
uvec2 aHandle32;
uint64_t aHandle64;
}; };
void main() void main()
{ {
@ -19,4 +22,6 @@ void main()
traceRayEXT(accEXT0[i], lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1); traceRayEXT(accEXT0[i], lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
traceRayEXT(accEXT1[i], lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1); traceRayEXT(accEXT1[i], lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
traceRayEXT(accEXT0[nonuniformEXT(i)], lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1); traceRayEXT(accEXT0[nonuniformEXT(i)], lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
traceRayEXT(accelerationStructureEXT(aHandle32), lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
traceRayEXT(accelerationStructureEXT(aHandle64), lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
} }

View File

@ -20,7 +20,7 @@ layout(shaderRecordEXT) buffer bblock4 { // ERROR, cannot ha
}; };
void main() void main()
{ {
accelerationStructureEXT a = 0; accelerationStructureEXT a = accelerationStructureEXT(c);
int e0 = gl_PrimitiveID; // ERROR, unsupported builtin in stage int e0 = gl_PrimitiveID; // ERROR, unsupported builtin in stage
int e1 = gl_InstanceID; // ERROR, unsupported builtin in stage int e1 = gl_InstanceID; // ERROR, unsupported builtin in stage
int e3 = gl_InstanceCustomIndexEXT; // ERROR, unsupported builtin in stage int e3 = gl_InstanceCustomIndexEXT; // ERROR, unsupported builtin in stage
@ -36,7 +36,7 @@ void main()
float e13 = gl_HitKindEXT; // ERROR, unsupported builtin in stage float e13 = gl_HitKindEXT; // ERROR, unsupported builtin in stage
int e14 = gl_RayFlagsSkipAABBEXT; // ERROR, unsupported builtin in stage int e14 = gl_RayFlagsSkipAABBEXT; // ERROR, unsupported builtin in stage
reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage
ignoreIntersectionEXT(); // ERROR, unsupported builtin in stage ignoreIntersectionEXT; // ERROR, unsupported builtin in stage
terminateRayEXT(); // ERROR, unsupported builtin in stage terminateRayEXT; // ERROR, unsupported builtin in stage
d = 1.0f; // ERROR, can't modify shaderRecordEXT block d = 1.0f; // ERROR, can't modify shaderRecordEXT block
} }

View File

@ -757,6 +757,12 @@ public:
bool isPerPrimitive() const { return perPrimitiveNV; } bool isPerPrimitive() const { return perPrimitiveNV; }
bool isPerView() const { return perViewNV; } bool isPerView() const { return perViewNV; }
bool isTaskMemory() const { return perTaskNV; } bool isTaskMemory() const { return perTaskNV; }
bool isAnyPayload() const {
return storage == EvqPayload || storage == EvqPayloadIn;
}
bool isAnyCallable() const {
return storage == EvqCallableData || storage == EvqCallableDataIn;
}
// True if this type of IO is supposed to be arrayed with extra level for per-vertex data // True if this type of IO is supposed to be arrayed with extra level for per-vertex data
bool isArrayedIo(EShLanguage language) const bool isArrayedIo(EShLanguage language) const

View File

@ -280,6 +280,12 @@ enum TOperator {
EOpConvUvec2ToPtr, EOpConvUvec2ToPtr,
EOpConvPtrToUvec2, EOpConvPtrToUvec2,
// uint64_t -> accelerationStructureEXT
EOpConvUint64ToAccStruct,
// uvec2 -> accelerationStructureEXT
EOpConvUvec2ToAccStruct,
// //
// binary operations // binary operations
// //
@ -631,6 +637,8 @@ enum TOperator {
EOpKill, // Fragment only EOpKill, // Fragment only
EOpTerminateInvocation, // Fragment only EOpTerminateInvocation, // Fragment only
EOpDemote, // Fragment only EOpDemote, // Fragment only
EOpTerminateRayKHR, // Any-hit only
EOpIgnoreIntersectionKHR, // Any-hit only
EOpReturn, EOpReturn,
EOpBreak, EOpBreak,
EOpContinue, EOpContinue,
@ -752,6 +760,7 @@ enum TOperator {
EOpConstructNonuniform, // expected to be transformed away, not present in final AST EOpConstructNonuniform, // expected to be transformed away, not present in final AST
EOpConstructReference, EOpConstructReference,
EOpConstructCooperativeMatrix, EOpConstructCooperativeMatrix,
EOpConstructAccStruct,
EOpConstructGuardEnd, EOpConstructGuardEnd,
// //
@ -912,11 +921,13 @@ enum TOperator {
EOpAverageRounded, EOpAverageRounded,
EOpMul32x16, EOpMul32x16,
EOpTrace, EOpTraceNV,
EOpTraceKHR,
EOpReportIntersection, EOpReportIntersection,
EOpIgnoreIntersection, EOpIgnoreIntersectionNV,
EOpTerminateRay, EOpTerminateRayNV,
EOpExecuteCallable, EOpExecuteCallableNV,
EOpExecuteCallableKHR,
EOpWritePackedPrimitiveIndices4x8NV, EOpWritePackedPrimitiveIndices4x8NV,
// //

View File

@ -4421,9 +4421,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n"); "\n");
stageBuiltins[EShLangAnyHit].append( stageBuiltins[EShLangAnyHit].append(
"void ignoreIntersectionNV();" "void ignoreIntersectionNV();"
"void ignoreIntersectionEXT();"
"void terminateRayNV();" "void terminateRayNV();"
"void terminateRayEXT();"
"\n"); "\n");
stageBuiltins[EShLangClosestHit].append( stageBuiltins[EShLangClosestHit].append(
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
@ -5454,6 +5452,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in uint64_t gl_SubGroupLeMaskARB;" "in uint64_t gl_SubGroupLeMaskARB;"
"in uint64_t gl_SubGroupLtMaskARB;" "in uint64_t gl_SubGroupLtMaskARB;"
"\n"; "\n";
const char* rtBallotDecls =
"uniform volatile uint gl_SubGroupSizeARB;"
"in volatile uint gl_SubGroupInvocationARB;"
"in volatile uint64_t gl_SubGroupEqMaskARB;"
"in volatile uint64_t gl_SubGroupGeMaskARB;"
"in volatile uint64_t gl_SubGroupGtMaskARB;"
"in volatile uint64_t gl_SubGroupLeMaskARB;"
"in volatile uint64_t gl_SubGroupLtMaskARB;"
"\n";
const char* fragmentBallotDecls = const char* fragmentBallotDecls =
"uniform uint gl_SubGroupSizeARB;" "uniform uint gl_SubGroupSizeARB;"
"flat in uint gl_SubGroupInvocationARB;" "flat in uint gl_SubGroupInvocationARB;"
@ -5471,6 +5478,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
stageBuiltins[EShLangFragment] .append(fragmentBallotDecls); stageBuiltins[EShLangFragment] .append(fragmentBallotDecls);
stageBuiltins[EShLangMeshNV] .append(ballotDecls); stageBuiltins[EShLangMeshNV] .append(ballotDecls);
stageBuiltins[EShLangTaskNV] .append(ballotDecls); stageBuiltins[EShLangTaskNV] .append(ballotDecls);
stageBuiltins[EShLangRayGen] .append(rtBallotDecls);
stageBuiltins[EShLangIntersect] .append(rtBallotDecls);
// No volatile qualifier on these builtins in any-hit
stageBuiltins[EShLangAnyHit] .append(ballotDecls);
stageBuiltins[EShLangClosestHit] .append(rtBallotDecls);
stageBuiltins[EShLangMiss] .append(rtBallotDecls);
stageBuiltins[EShLangCallable] .append(rtBallotDecls);
} }
// GL_KHR_shader_subgroup // GL_KHR_shader_subgroup
@ -5508,6 +5522,21 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in highp uint gl_NumSubgroups;" "in highp uint gl_NumSubgroups;"
"in highp uint gl_SubgroupID;" "in highp uint gl_SubgroupID;"
"\n"; "\n";
// These builtins are volatile for RT stages
const char* rtSubgroupDecls =
"in mediump volatile uint gl_SubgroupSize;"
"in mediump volatile uint gl_SubgroupInvocationID;"
"in highp volatile uvec4 gl_SubgroupEqMask;"
"in highp volatile uvec4 gl_SubgroupGeMask;"
"in highp volatile uvec4 gl_SubgroupGtMask;"
"in highp volatile uvec4 gl_SubgroupLeMask;"
"in highp volatile uvec4 gl_SubgroupLtMask;"
// GL_NV_shader_sm_builtins
"in highp uint gl_WarpsPerSMNV;"
"in highp uint gl_SMCountNV;"
"in highp volatile uint gl_WarpIDNV;"
"in highp volatile uint gl_SMIDNV;"
"\n";
stageBuiltins[EShLangVertex] .append(subgroupDecls); stageBuiltins[EShLangVertex] .append(subgroupDecls);
stageBuiltins[EShLangTessControl] .append(subgroupDecls); stageBuiltins[EShLangTessControl] .append(subgroupDecls);
@ -5520,12 +5549,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
stageBuiltins[EShLangMeshNV] .append(computeSubgroupDecls); stageBuiltins[EShLangMeshNV] .append(computeSubgroupDecls);
stageBuiltins[EShLangTaskNV] .append(subgroupDecls); stageBuiltins[EShLangTaskNV] .append(subgroupDecls);
stageBuiltins[EShLangTaskNV] .append(computeSubgroupDecls); stageBuiltins[EShLangTaskNV] .append(computeSubgroupDecls);
stageBuiltins[EShLangRayGen] .append(subgroupDecls); stageBuiltins[EShLangRayGen] .append(rtSubgroupDecls);
stageBuiltins[EShLangIntersect] .append(subgroupDecls); stageBuiltins[EShLangIntersect] .append(rtSubgroupDecls);
// No volatile qualifier on these builtins in any-hit
stageBuiltins[EShLangAnyHit] .append(subgroupDecls); stageBuiltins[EShLangAnyHit] .append(subgroupDecls);
stageBuiltins[EShLangClosestHit] .append(subgroupDecls); stageBuiltins[EShLangClosestHit] .append(rtSubgroupDecls);
stageBuiltins[EShLangMiss] .append(subgroupDecls); stageBuiltins[EShLangMiss] .append(rtSubgroupDecls);
stageBuiltins[EShLangCallable] .append(subgroupDecls); stageBuiltins[EShLangCallable] .append(rtSubgroupDecls);
} }
// GL_NV_ray_tracing/GL_EXT_ray_tracing // GL_NV_ray_tracing/GL_EXT_ray_tracing
@ -5593,7 +5623,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in float gl_RayTminNV;" "in float gl_RayTminNV;"
"in float gl_RayTminEXT;" "in float gl_RayTminEXT;"
"in float gl_RayTmaxNV;" "in float gl_RayTmaxNV;"
"in float gl_RayTmaxEXT;" "in volatile float gl_RayTmaxEXT;"
"in mat4x3 gl_ObjectToWorldNV;" "in mat4x3 gl_ObjectToWorldNV;"
"in mat4x3 gl_ObjectToWorldEXT;" "in mat4x3 gl_ObjectToWorldEXT;"
"in mat3x4 gl_ObjectToWorld3x4EXT;" "in mat3x4 gl_ObjectToWorld3x4EXT;"
@ -8454,9 +8484,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("reportIntersectionNV", 1, &E_GL_NV_ray_tracing); symbolTable.setFunctionExtensions("reportIntersectionNV", 1, &E_GL_NV_ray_tracing);
symbolTable.setFunctionExtensions("reportIntersectionEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setFunctionExtensions("reportIntersectionEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setFunctionExtensions("ignoreIntersectionNV", 1, &E_GL_NV_ray_tracing); symbolTable.setFunctionExtensions("ignoreIntersectionNV", 1, &E_GL_NV_ray_tracing);
symbolTable.setFunctionExtensions("ignoreIntersectionEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setFunctionExtensions("terminateRayNV", 1, &E_GL_NV_ray_tracing); symbolTable.setFunctionExtensions("terminateRayNV", 1, &E_GL_NV_ray_tracing);
symbolTable.setFunctionExtensions("terminateRayEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setFunctionExtensions("executeCallableNV", 1, &E_GL_NV_ray_tracing); symbolTable.setFunctionExtensions("executeCallableNV", 1, &E_GL_NV_ray_tracing);
symbolTable.setFunctionExtensions("executeCallableEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setFunctionExtensions("executeCallableEXT", 1, &E_GL_EXT_ray_tracing);
@ -9286,10 +9314,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
case EShLangClosestHit: case EShLangClosestHit:
case EShLangMiss: case EShLangMiss:
if (profile != EEsProfile && version >= 460) { if (profile != EEsProfile && version >= 460) {
symbolTable.relateToOperator("traceNV", EOpTrace); symbolTable.relateToOperator("traceNV", EOpTraceNV);
symbolTable.relateToOperator("traceRayEXT", EOpTrace); symbolTable.relateToOperator("traceRayEXT", EOpTraceKHR);
symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallable); symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV);
symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallable); symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR);
} }
break; break;
case EShLangIntersect: case EShLangIntersect:
@ -9300,16 +9328,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
break; break;
case EShLangAnyHit: case EShLangAnyHit:
if (profile != EEsProfile && version >= 460) { if (profile != EEsProfile && version >= 460) {
symbolTable.relateToOperator("ignoreIntersectionNV", EOpIgnoreIntersection); symbolTable.relateToOperator("ignoreIntersectionNV", EOpIgnoreIntersectionNV);
symbolTable.relateToOperator("ignoreIntersectionEXT", EOpIgnoreIntersection); symbolTable.relateToOperator("terminateRayNV", EOpTerminateRayNV);
symbolTable.relateToOperator("terminateRayNV", EOpTerminateRay);
symbolTable.relateToOperator("terminateRayEXT", EOpTerminateRay);
} }
break; break;
case EShLangCallable: case EShLangCallable:
if (profile != EEsProfile && version >= 460) { if (profile != EEsProfile && version >= 460) {
symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallable); symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV);
symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallable); symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR);
} }
break; break;
case EShLangMeshNV: case EShLangMeshNV:

View File

@ -2298,6 +2298,10 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
case EbtReference: case EbtReference:
op = EOpConstructReference; op = EOpConstructReference;
break; break;
case EbtAccStruct:
op = EOpConstructAccStruct;
break;
#endif #endif
default: default:
break; break;

View File

@ -2076,14 +2076,32 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
} }
#ifndef GLSLANG_WEB #ifndef GLSLANG_WEB
case EOpTrace: case EOpTraceNV:
if (!(*argp)[10]->getAsConstantUnion()) if (!(*argp)[10]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "payload number", ""); error(loc, "argument must be compile-time constant", "payload number", "a");
break; break;
case EOpExecuteCallable: case EOpTraceKHR:
if (!(*argp)[10]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "payload number", "a");
else {
unsigned int location = (*argp)[10]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
if (intermediate.checkLocationRT(0, location) < 0)
error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location);
}
break;
case EOpExecuteCallableNV:
if (!(*argp)[1]->getAsConstantUnion()) if (!(*argp)[1]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "callable data number", ""); error(loc, "argument must be compile-time constant", "callable data number", "");
break; break;
case EOpExecuteCallableKHR:
if (!(*argp)[1]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "callable data number", "");
else {
unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
if (intermediate.checkLocationRT(1, location) < 0)
error(loc, "with layout(location =", "no callableDataEXT/callableDataInEXT declared", "%d)", location);
}
break;
case EOpRayQueryGetIntersectionType: case EOpRayQueryGetIntersectionType:
case EOpRayQueryGetIntersectionT: case EOpRayQueryGetIntersectionT:
@ -3440,7 +3458,7 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
if (! symbolTable.atGlobalLevel()) if (! symbolTable.atGlobalLevel())
return; return;
if (!(publicType.userDef && publicType.userDef->isReference())) { if (!(publicType.userDef && publicType.userDef->isReference()) && !parsingBuiltins) {
if (qualifier.isMemoryQualifierImageAndSSBOOnly() && ! publicType.isImage() && publicType.qualifier.storage != EvqBuffer) { if (qualifier.isMemoryQualifierImageAndSSBOOnly() && ! publicType.isImage() && publicType.qualifier.storage != EvqBuffer) {
error(loc, "memory qualifiers cannot be used on this type", "", ""); error(loc, "memory qualifiers cannot be used on this type", "", "");
} else if (qualifier.isMemory() && (publicType.basicType != EbtSampler) && !publicType.qualifier.isUniformOrBuffer()) { } else if (qualifier.isMemory() && (publicType.basicType != EbtSampler) && !publicType.qualifier.isUniformOrBuffer()) {
@ -7460,6 +7478,19 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
return node; return node;
case EOpConstructAccStruct:
if ((node->getType().isScalar() && node->getType().getBasicType() == EbtUint64)) {
// construct acceleration structure from uint64
requireExtensions(loc, 1, &E_GL_EXT_ray_tracing, "uint64_t conversion to acclerationStructureEXT");
return intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvUint64ToAccStruct, true, node,
type);
} else if (node->getType().isVector() && node->getType().getBasicType() == EbtUint && node->getVectorSize() == 2) {
// construct acceleration structure from uint64
requireExtensions(loc, 1, &E_GL_EXT_ray_tracing, "uvec2 conversion to accelerationStructureEXT");
return intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvUvec2ToAccStruct, true, node,
type);
} else
return nullptr;
#endif // GLSLANG_WEB #endif // GLSLANG_WEB
default: default:

View File

@ -366,6 +366,8 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["else"] = ELSE; (*KeywordMap)["else"] = ELSE;
(*KeywordMap)["discard"] = DISCARD; (*KeywordMap)["discard"] = DISCARD;
(*KeywordMap)["terminateInvocation"] = TERMINATE_INVOCATION; (*KeywordMap)["terminateInvocation"] = TERMINATE_INVOCATION;
(*KeywordMap)["terminateRayEXT"] = TERMINATE_RAY;
(*KeywordMap)["ignoreIntersectionEXT"] = IGNORE_INTERSECTION;
(*KeywordMap)["return"] = RETURN; (*KeywordMap)["return"] = RETURN;
(*KeywordMap)["void"] = VOID; (*KeywordMap)["void"] = VOID;
(*KeywordMap)["bool"] = BOOL; (*KeywordMap)["bool"] = BOOL;
@ -942,6 +944,12 @@ int TScanContext::tokenizeIdentifier()
return identifierOrType(); return identifierOrType();
return keyword; return keyword;
case TERMINATE_RAY:
case IGNORE_INTERSECTION:
if (!parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing))
return identifierOrType();
return keyword;
case BUFFER: case BUFFER:
afterBuffer = true; afterBuffer = true;
if ((parseContext.isEsProfile() && parseContext.version < 310) || if ((parseContext.isEsProfile() && parseContext.version < 310) ||

View File

@ -294,6 +294,7 @@ GLSLANG_WEB_EXCLUDE_OFF
%token <lex> STRUCT VOID WHILE %token <lex> STRUCT VOID WHILE
%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT %token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
%token <lex> TERMINATE_INVOCATION %token <lex> TERMINATE_INVOCATION
%token <lex> TERMINATE_RAY IGNORE_INTERSECTION
%token <lex> UNIFORM SHARED BUFFER %token <lex> UNIFORM SHARED BUFFER
%token <lex> FLAT SMOOTH LAYOUT %token <lex> FLAT SMOOTH LAYOUT
@ -3932,6 +3933,16 @@ jump_statement
parseContext.requireStage($1.loc, EShLangFragment, "terminateInvocation"); parseContext.requireStage($1.loc, EShLangFragment, "terminateInvocation");
$$ = parseContext.intermediate.addBranch(EOpTerminateInvocation, $1.loc); $$ = parseContext.intermediate.addBranch(EOpTerminateInvocation, $1.loc);
} }
GLSLANG_WEB_EXCLUDE_ON
| TERMINATE_RAY SEMICOLON {
parseContext.requireStage($1.loc, EShLangAnyHit, "terminateRayEXT");
$$ = parseContext.intermediate.addBranch(EOpTerminateRayKHR, $1.loc);
}
| IGNORE_INTERSECTION SEMICOLON {
parseContext.requireStage($1.loc, EShLangAnyHit, "ignoreIntersectionEXT");
$$ = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, $1.loc);
}
GLSLANG_WEB_EXCLUDE_OFF
; ;
// Grammar Note: No 'goto'. Gotos are not supported. // Grammar Note: No 'goto'. Gotos are not supported.

View File

@ -294,6 +294,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> STRUCT VOID WHILE %token <lex> STRUCT VOID WHILE
%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT %token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
%token <lex> TERMINATE_INVOCATION %token <lex> TERMINATE_INVOCATION
%token <lex> TERMINATE_RAY IGNORE_INTERSECTION
%token <lex> UNIFORM SHARED BUFFER %token <lex> UNIFORM SHARED BUFFER
%token <lex> FLAT SMOOTH LAYOUT %token <lex> FLAT SMOOTH LAYOUT
@ -3932,6 +3933,16 @@ jump_statement
parseContext.requireStage($1.loc, EShLangFragment, "terminateInvocation"); parseContext.requireStage($1.loc, EShLangFragment, "terminateInvocation");
$$ = parseContext.intermediate.addBranch(EOpTerminateInvocation, $1.loc); $$ = parseContext.intermediate.addBranch(EOpTerminateInvocation, $1.loc);
} }
| TERMINATE_RAY SEMICOLON {
parseContext.requireStage($1.loc, EShLangAnyHit, "terminateRayEXT");
$$ = parseContext.intermediate.addBranch(EOpTerminateRayKHR, $1.loc);
}
| IGNORE_INTERSECTION SEMICOLON {
parseContext.requireStage($1.loc, EShLangAnyHit, "ignoreIntersectionEXT");
$$ = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, $1.loc);
}
; ;
// Grammar Note: No 'goto'. Gotos are not supported. // Grammar Note: No 'goto'. Gotos are not supported.

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/* A Bison parser, made by GNU Bison 3.7.2. */ /* A Bison parser, made by GNU Bison 3.7.4. */
/* Bison interface for Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
@ -35,8 +35,8 @@
especially those whose name start with YY_ or yy_. They are especially those whose name start with YY_ or yy_. They are
private implementation details that can be changed or removed. */ private implementation details that can be changed or removed. */
#ifndef YY_YY_GLSLANG_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED #ifndef YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED
# define YY_YY_GLSLANG_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED # define YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED
/* Debug traces. */ /* Debug traces. */
#ifndef YYDEBUG #ifndef YYDEBUG
# define YYDEBUG 1 # define YYDEBUG 1
@ -447,53 +447,55 @@ extern int yydebug;
CASE = 648, /* CASE */ CASE = 648, /* CASE */
DEFAULT = 649, /* DEFAULT */ DEFAULT = 649, /* DEFAULT */
TERMINATE_INVOCATION = 650, /* TERMINATE_INVOCATION */ TERMINATE_INVOCATION = 650, /* TERMINATE_INVOCATION */
UNIFORM = 651, /* UNIFORM */ TERMINATE_RAY = 651, /* TERMINATE_RAY */
SHARED = 652, /* SHARED */ IGNORE_INTERSECTION = 652, /* IGNORE_INTERSECTION */
BUFFER = 653, /* BUFFER */ UNIFORM = 653, /* UNIFORM */
FLAT = 654, /* FLAT */ SHARED = 654, /* SHARED */
SMOOTH = 655, /* SMOOTH */ BUFFER = 655, /* BUFFER */
LAYOUT = 656, /* LAYOUT */ FLAT = 656, /* FLAT */
DOUBLECONSTANT = 657, /* DOUBLECONSTANT */ SMOOTH = 657, /* SMOOTH */
INT16CONSTANT = 658, /* INT16CONSTANT */ LAYOUT = 658, /* LAYOUT */
UINT16CONSTANT = 659, /* UINT16CONSTANT */ DOUBLECONSTANT = 659, /* DOUBLECONSTANT */
FLOAT16CONSTANT = 660, /* FLOAT16CONSTANT */ INT16CONSTANT = 660, /* INT16CONSTANT */
INT32CONSTANT = 661, /* INT32CONSTANT */ UINT16CONSTANT = 661, /* UINT16CONSTANT */
UINT32CONSTANT = 662, /* UINT32CONSTANT */ FLOAT16CONSTANT = 662, /* FLOAT16CONSTANT */
INT64CONSTANT = 663, /* INT64CONSTANT */ INT32CONSTANT = 663, /* INT32CONSTANT */
UINT64CONSTANT = 664, /* UINT64CONSTANT */ UINT32CONSTANT = 664, /* UINT32CONSTANT */
SUBROUTINE = 665, /* SUBROUTINE */ INT64CONSTANT = 665, /* INT64CONSTANT */
DEMOTE = 666, /* DEMOTE */ UINT64CONSTANT = 666, /* UINT64CONSTANT */
PAYLOADNV = 667, /* PAYLOADNV */ SUBROUTINE = 667, /* SUBROUTINE */
PAYLOADINNV = 668, /* PAYLOADINNV */ DEMOTE = 668, /* DEMOTE */
HITATTRNV = 669, /* HITATTRNV */ PAYLOADNV = 669, /* PAYLOADNV */
CALLDATANV = 670, /* CALLDATANV */ PAYLOADINNV = 670, /* PAYLOADINNV */
CALLDATAINNV = 671, /* CALLDATAINNV */ HITATTRNV = 671, /* HITATTRNV */
PAYLOADEXT = 672, /* PAYLOADEXT */ CALLDATANV = 672, /* CALLDATANV */
PAYLOADINEXT = 673, /* PAYLOADINEXT */ CALLDATAINNV = 673, /* CALLDATAINNV */
HITATTREXT = 674, /* HITATTREXT */ PAYLOADEXT = 674, /* PAYLOADEXT */
CALLDATAEXT = 675, /* CALLDATAEXT */ PAYLOADINEXT = 675, /* PAYLOADINEXT */
CALLDATAINEXT = 676, /* CALLDATAINEXT */ HITATTREXT = 676, /* HITATTREXT */
PATCH = 677, /* PATCH */ CALLDATAEXT = 677, /* CALLDATAEXT */
SAMPLE = 678, /* SAMPLE */ CALLDATAINEXT = 678, /* CALLDATAINEXT */
NONUNIFORM = 679, /* NONUNIFORM */ PATCH = 679, /* PATCH */
COHERENT = 680, /* COHERENT */ SAMPLE = 680, /* SAMPLE */
VOLATILE = 681, /* VOLATILE */ NONUNIFORM = 681, /* NONUNIFORM */
RESTRICT = 682, /* RESTRICT */ COHERENT = 682, /* COHERENT */
READONLY = 683, /* READONLY */ VOLATILE = 683, /* VOLATILE */
WRITEONLY = 684, /* WRITEONLY */ RESTRICT = 684, /* RESTRICT */
DEVICECOHERENT = 685, /* DEVICECOHERENT */ READONLY = 685, /* READONLY */
QUEUEFAMILYCOHERENT = 686, /* QUEUEFAMILYCOHERENT */ WRITEONLY = 686, /* WRITEONLY */
WORKGROUPCOHERENT = 687, /* WORKGROUPCOHERENT */ DEVICECOHERENT = 687, /* DEVICECOHERENT */
SUBGROUPCOHERENT = 688, /* SUBGROUPCOHERENT */ QUEUEFAMILYCOHERENT = 688, /* QUEUEFAMILYCOHERENT */
NONPRIVATE = 689, /* NONPRIVATE */ WORKGROUPCOHERENT = 689, /* WORKGROUPCOHERENT */
SHADERCALLCOHERENT = 690, /* SHADERCALLCOHERENT */ SUBGROUPCOHERENT = 690, /* SUBGROUPCOHERENT */
NOPERSPECTIVE = 691, /* NOPERSPECTIVE */ NONPRIVATE = 691, /* NONPRIVATE */
EXPLICITINTERPAMD = 692, /* EXPLICITINTERPAMD */ SHADERCALLCOHERENT = 692, /* SHADERCALLCOHERENT */
PERVERTEXNV = 693, /* PERVERTEXNV */ NOPERSPECTIVE = 693, /* NOPERSPECTIVE */
PERPRIMITIVENV = 694, /* PERPRIMITIVENV */ EXPLICITINTERPAMD = 694, /* EXPLICITINTERPAMD */
PERVIEWNV = 695, /* PERVIEWNV */ PERVERTEXNV = 695, /* PERVERTEXNV */
PERTASKNV = 696, /* PERTASKNV */ PERPRIMITIVENV = 696, /* PERPRIMITIVENV */
PRECISE = 697 /* PRECISE */ PERVIEWNV = 697, /* PERVIEWNV */
PERTASKNV = 698, /* PERTASKNV */
PRECISE = 699 /* PRECISE */
}; };
typedef enum yytokentype yytoken_kind_t; typedef enum yytokentype yytoken_kind_t;
#endif #endif
@ -502,7 +504,7 @@ extern int yydebug;
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE union YYSTYPE
{ {
#line 97 "glslang/MachineIndependent/glslang.y" #line 97 "MachineIndependent/glslang.y"
struct { struct {
glslang::TSourceLoc loc; glslang::TSourceLoc loc;
@ -538,7 +540,7 @@ union YYSTYPE
glslang::TArraySizes* typeParameters; glslang::TArraySizes* typeParameters;
} interm; } interm;
#line 542 "glslang/MachineIndependent/glslang_tab.cpp.h" #line 544 "MachineIndependent/glslang_tab.cpp.h"
}; };
typedef union YYSTYPE YYSTYPE; typedef union YYSTYPE YYSTYPE;
@ -550,4 +552,4 @@ typedef union YYSTYPE YYSTYPE;
int yyparse (glslang::TParseContext* pParseContext); int yyparse (glslang::TParseContext* pParseContext);
#endif /* !YY_YY_GLSLANG_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */ #endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */

View File

@ -438,6 +438,9 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
case EOpConvUint64ToPtr: out.debug << "Convert uint64_t to pointer"; break; case EOpConvUint64ToPtr: out.debug << "Convert uint64_t to pointer"; break;
case EOpConvPtrToUint64: out.debug << "Convert pointer to uint64_t"; break; case EOpConvPtrToUint64: out.debug << "Convert pointer to uint64_t"; break;
case EOpConvUint64ToAccStruct: out.debug << "Convert uint64_t to acceleration structure"; break;
case EOpConvUvec2ToAccStruct: out.debug << "Convert uvec2 to acceleration strucuture "; break;
case EOpRadians: out.debug << "radians"; break; case EOpRadians: out.debug << "radians"; break;
case EOpDegrees: out.debug << "degrees"; break; case EOpDegrees: out.debug << "degrees"; break;
case EOpSin: out.debug << "sine"; break; case EOpSin: out.debug << "sine"; break;
@ -829,6 +832,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break; case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break;
case EOpConstructReference: out.debug << "Construct reference"; break; case EOpConstructReference: out.debug << "Construct reference"; break;
case EOpConstructCooperativeMatrix: out.debug << "Construct cooperative matrix"; break; case EOpConstructCooperativeMatrix: out.debug << "Construct cooperative matrix"; break;
case EOpConstructAccStruct: out.debug << "Construct acceleration structure"; break;
case EOpLessThan: out.debug << "Compare Less Than"; break; case EOpLessThan: out.debug << "Compare Less Than"; break;
case EOpGreaterThan: out.debug << "Compare Greater Than"; break; case EOpGreaterThan: out.debug << "Compare Greater Than"; break;
@ -1079,11 +1083,15 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpSubpassLoad: out.debug << "subpassLoad"; break; case EOpSubpassLoad: out.debug << "subpassLoad"; break;
case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break; case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
case EOpTrace: out.debug << "traceNV"; break; case EOpTraceNV: out.debug << "traceNV"; break;
case EOpTraceKHR: out.debug << "traceRayKHR"; break;
case EOpReportIntersection: out.debug << "reportIntersectionNV"; break; case EOpReportIntersection: out.debug << "reportIntersectionNV"; break;
case EOpIgnoreIntersection: out.debug << "ignoreIntersectionNV"; break; case EOpIgnoreIntersectionNV: out.debug << "ignoreIntersectionNV"; break;
case EOpTerminateRay: out.debug << "terminateRayNV"; break; case EOpIgnoreIntersectionKHR: out.debug << "ignoreIntersectionKHR"; break;
case EOpExecuteCallable: out.debug << "executeCallableNV"; break; case EOpTerminateRayNV: out.debug << "terminateRayNV"; break;
case EOpTerminateRayKHR: out.debug << "terminateRayKHR"; break;
case EOpExecuteCallableNV: out.debug << "executeCallableNV"; break;
case EOpExecuteCallableKHR: out.debug << "executeCallableKHR"; break;
case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; break; case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; break;
case EOpRayQueryInitialize: out.debug << "rayQueryInitializeEXT"; break; case EOpRayQueryInitialize: out.debug << "rayQueryInitializeEXT"; break;
@ -1411,6 +1419,8 @@ bool TOutputTraverser::visitBranch(TVisit /* visit*/, TIntermBranch* node)
switch (node->getFlowOp()) { switch (node->getFlowOp()) {
case EOpKill: out.debug << "Branch: Kill"; break; case EOpKill: out.debug << "Branch: Kill"; break;
case EOpTerminateInvocation: out.debug << "Branch: TerminateInvocation"; break; case EOpTerminateInvocation: out.debug << "Branch: TerminateInvocation"; break;
case EOpIgnoreIntersectionKHR: out.debug << "Branch: IgnoreIntersectionKHR"; break;
case EOpTerminateRayKHR: out.debug << "Branch: TerminateRayKHR"; break;
case EOpBreak: out.debug << "Branch: Break"; break; case EOpBreak: out.debug << "Branch: Break"; break;
case EOpContinue: out.debug << "Branch: Continue"; break; case EOpContinue: out.debug << "Branch: Continue"; break;
case EOpReturn: out.debug << "Branch: Return"; break; case EOpReturn: out.debug << "Branch: Return"; break;

View File

@ -1057,8 +1057,8 @@ bool TIntermediate::userOutputUsed() const
return found; return found;
} }
// Accumulate locations used for inputs, outputs, and uniforms, and check for collisions // Accumulate locations used for inputs, outputs, and uniforms, payload and callable data
// as the accumulation is done. // and check for collisions as the accumulation is done.
// //
// Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value. // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value.
// //
@ -1070,6 +1070,7 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
typeCollision = false; typeCollision = false;
int set; int set;
int setRT;
if (qualifier.isPipeInput()) if (qualifier.isPipeInput())
set = 0; set = 0;
else if (qualifier.isPipeOutput()) else if (qualifier.isPipeOutput())
@ -1078,11 +1079,17 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
set = 2; set = 2;
else if (qualifier.storage == EvqBuffer) else if (qualifier.storage == EvqBuffer)
set = 3; set = 3;
else if (qualifier.isAnyPayload())
setRT = 0;
else if (qualifier.isAnyCallable())
setRT = 1;
else else
return -1; return -1;
int size; int size;
if (qualifier.isUniformOrBuffer() || qualifier.isTaskMemory()) { if (qualifier.isAnyPayload() || qualifier.isAnyCallable()) {
size = 1;
} else if (qualifier.isUniformOrBuffer() || qualifier.isTaskMemory()) {
if (type.isSizedArray()) if (type.isSizedArray())
size = type.getCumulativeArraySize(); size = type.getCumulativeArraySize();
else else
@ -1110,10 +1117,17 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
// (A vertex shader input will show using only one location, even for a dvec3/4.) // (A vertex shader input will show using only one location, even for a dvec3/4.)
// //
// So, for the case of dvec3, we need two independent ioRanges. // So, for the case of dvec3, we need two independent ioRanges.
//
// For raytracing IO (payloads and callabledata) each declaration occupies a single
// slot irrespective of type.
int collision = -1; // no collision int collision = -1; // no collision
#ifndef GLSLANG_WEB #ifndef GLSLANG_WEB
if (size == 2 && type.getBasicType() == EbtDouble && type.getVectorSize() == 3 && if (qualifier.isAnyPayload() || qualifier.isAnyCallable()) {
TRange range(qualifier.layoutLocation, qualifier.layoutLocation);
collision = checkLocationRT(setRT, qualifier.layoutLocation);
if (collision < 0)
usedIoRT[setRT].push_back(range);
} else if (size == 2 && type.getBasicType() == EbtDouble && type.getVectorSize() == 3 &&
(qualifier.isPipeInput() || qualifier.isPipeOutput())) { (qualifier.isPipeInput() || qualifier.isPipeOutput())) {
// Dealing with dvec3 in/out split across two locations. // Dealing with dvec3 in/out split across two locations.
// Need two io-ranges. // Need two io-ranges.
@ -1189,6 +1203,16 @@ int TIntermediate::checkLocationRange(int set, const TIoRange& range, const TTyp
return -1; // no collision return -1; // no collision
} }
int TIntermediate::checkLocationRT(int set, int location) {
TRange range(location, location);
for (size_t r = 0; r < usedIoRT[set].size(); ++r) {
if (range.overlap(usedIoRT[set][r])) {
return range.start;
}
}
return -1; // no collision
}
// Accumulate bindings and offsets, and check for collisions // Accumulate bindings and offsets, and check for collisions
// as the accumulation is done. // as the accumulation is done.
// //

View File

@ -416,6 +416,9 @@ public:
EShLanguage getStage() const { return language; } EShLanguage getStage() const { return language; }
void addRequestedExtension(const char* extension) { requestedExtensions.insert(extension); } void addRequestedExtension(const char* extension) { requestedExtensions.insert(extension); }
const std::set<std::string>& getRequestedExtensions() const { return requestedExtensions; } const std::set<std::string>& getRequestedExtensions() const { return requestedExtensions; }
bool isRayTracingStage() const {
return language >= EShLangRayGen && language <= EShLangCallableNV;
}
void setTreeRoot(TIntermNode* r) { treeRoot = r; } void setTreeRoot(TIntermNode* r) { treeRoot = r; }
TIntermNode* getTreeRoot() const { return treeRoot; } TIntermNode* getTreeRoot() const { return treeRoot; }
@ -531,6 +534,7 @@ public:
// Linkage related // Linkage related
void addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage, TSymbolTable&); void addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage, TSymbolTable&);
void addSymbolLinkageNode(TIntermAggregate*& linkage, const TSymbol&); void addSymbolLinkageNode(TIntermAggregate*& linkage, const TSymbol&);
TIntermAggregate* findLinkerObjects() const;
void setUseStorageBuffer() { useStorageBuffer = true; } void setUseStorageBuffer() { useStorageBuffer = true; }
bool usingStorageBuffer() const { return useStorageBuffer; } bool usingStorageBuffer() const { return useStorageBuffer; }
@ -866,6 +870,7 @@ public:
int addUsedLocation(const TQualifier&, const TType&, bool& typeCollision); int addUsedLocation(const TQualifier&, const TType&, bool& typeCollision);
int checkLocationRange(int set, const TIoRange& range, const TType&, bool& typeCollision); int checkLocationRange(int set, const TIoRange& range, const TType&, bool& typeCollision);
int checkLocationRT(int set, int location);
int addUsedOffsets(int binding, int offset, int numOffsets); int addUsedOffsets(int binding, int offset, int numOffsets);
bool addUsedConstantId(int id); bool addUsedConstantId(int id);
static int computeTypeLocationSize(const TType&, EShLanguage); static int computeTypeLocationSize(const TType&, EShLanguage);
@ -941,7 +946,6 @@ protected:
void checkCallGraphCycles(TInfoSink&); void checkCallGraphCycles(TInfoSink&);
void checkCallGraphBodies(TInfoSink&, bool keepUncalled); void checkCallGraphBodies(TInfoSink&, bool keepUncalled);
void inOutLocationCheck(TInfoSink&); void inOutLocationCheck(TInfoSink&);
TIntermAggregate* findLinkerObjects() const;
bool userOutputUsed() const; bool userOutputUsed() const;
bool isSpecializationOperation(const TIntermOperator&) const; bool isSpecializationOperation(const TIntermOperator&) const;
bool isNonuniformPropagating(TOperator) const; bool isNonuniformPropagating(TOperator) const;
@ -1050,6 +1054,8 @@ protected:
std::unordered_set<int> usedConstantId; // specialization constant ids used std::unordered_set<int> usedConstantId; // specialization constant ids used
std::vector<TOffsetRange> usedAtomics; // sets of bindings used by atomic counters std::vector<TOffsetRange> usedAtomics; // sets of bindings used by atomic counters
std::vector<TIoRange> usedIo[4]; // sets of used locations, one for each of in, out, uniform, and buffers std::vector<TIoRange> usedIo[4]; // sets of used locations, one for each of in, out, uniform, and buffers
std::vector<TRange> usedIoRT[2]; // sets of used location, one for rayPayload/rayPayloadIN and other
// for callableData/callableDataIn
// set of names of statically read/written I/O that might need extra checking // set of names of statically read/written I/O that might need extra checking
std::set<TString> ioAccessed; std::set<TString> ioAccessed;
// source code of shader, useful as part of debug information // source code of shader, useful as part of debug information

View File

@ -240,6 +240,7 @@ INSTANTIATE_TEST_SUITE_P(
"rayQuery-allOps.comp", "rayQuery-allOps.comp",
"rayQuery-allOps.frag", "rayQuery-allOps.frag",
"rayQuery-initialization.Error.comp", "rayQuery-initialization.Error.comp",
"rayQuery-global.rgen",
"spv.set.vert", "spv.set.vert",
"spv.double.comp", "spv.double.comp",
"spv.100ops.frag", "spv.100ops.frag",
@ -557,6 +558,7 @@ INSTANTIATE_TEST_SUITE_P(
"spv.ext.AnyHitShader.rahit", "spv.ext.AnyHitShader.rahit",
"spv.ext.AnyHitShader_Errors.rahit", "spv.ext.AnyHitShader_Errors.rahit",
"spv.ext.ClosestHitShader.rchit", "spv.ext.ClosestHitShader.rchit",
"spv.ext.ClosestHitShader_Subgroup.rchit",
"spv.ext.ClosestHitShader_Errors.rchit", "spv.ext.ClosestHitShader_Errors.rchit",
"spv.ext.IntersectShader.rint", "spv.ext.IntersectShader.rint",
"spv.ext.IntersectShader_Errors.rint", "spv.ext.IntersectShader_Errors.rint",
@ -567,8 +569,13 @@ INSTANTIATE_TEST_SUITE_P(
"spv.ext.RayCallable_Errors.rcall", "spv.ext.RayCallable_Errors.rcall",
"spv.ext.RayConstants.rgen", "spv.ext.RayConstants.rgen",
"spv.ext.RayGenShader.rgen", "spv.ext.RayGenShader.rgen",
"spv.ext.RayGenShader_Errors.rgen",
"spv.ext.RayGenShader11.rgen", "spv.ext.RayGenShader11.rgen",
"spv.ext.RayGenShaderArray.rgen", "spv.ext.RayGenShaderArray.rgen",
"spv.ext.RayGenSBTlayout.rgen",
"spv.ext.RayGenSBTlayout140.rgen",
"spv.ext.RayGenSBTlayout430.rgen",
"spv.ext.RayGenSBTlayoutscalar.rgen",
"spv.ext.World3x4.rahit", "spv.ext.World3x4.rahit",
})), })),
FileNameAsCustomTestSuffix FileNameAsCustomTestSuffix

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" : "56d0f50357a192602216bfc4873e714905323e35" "commit" : "cd590fa3341284cd6d1ee82366155786cfd44c96"
}, },
{ {
"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" : "05836bdba63e7debce9fa9feaed42f20cd43af9d" "commit" : "104ecc356c1bea4476320faca64440cd1df655a3"
} }
] ]
} }