Add support for GL_NV_shader_invocation_reorder. (#3054)
This commit is contained in:
parent
19d816c8c9
commit
4fc43cd3c1
@ -81,4 +81,7 @@ const char* const E_SPV_NV_cooperative_matrix = "SPV_NV_cooperative_matrix";
|
||||
//SPV_NV_shader_sm_builtins
|
||||
const char* const E_SPV_NV_shader_sm_builtins = "SPV_NV_shader_sm_builtins";
|
||||
|
||||
//SPV_NV_shader_execution_reorder
|
||||
const char* const E_SPV_NV_shader_invocation_reorder = "SPV_NV_shader_invocation_reorder";
|
||||
|
||||
#endif // #ifndef GLSLextNV_H
|
||||
|
@ -278,12 +278,10 @@ protected:
|
||||
// requiring local translation to and from SPIR-V type on every access.
|
||||
// Maps <builtin-variable-id -> AST-required-type-id>
|
||||
std::unordered_map<spv::Id, spv::Id> forceType;
|
||||
|
||||
// Used later for generating OpTraceKHR/OpExecuteCallableKHR
|
||||
std::unordered_map<unsigned int, glslang::TIntermSymbol *> locationToSymbol[2];
|
||||
|
||||
// Used by Task shader while generating opearnds for OpEmitMeshTasksEXT
|
||||
spv::Id taskPayloadID;
|
||||
// Used later for generating OpTraceKHR/OpExecuteCallableKHR/OpHitObjectRecordHit*/OpHitObjectGetShaderBindingTableData
|
||||
std::unordered_map<unsigned int, glslang::TIntermSymbol *> locationToSymbol[4];
|
||||
};
|
||||
|
||||
//
|
||||
@ -392,6 +390,7 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useSto
|
||||
case glslang::EvqHitAttr: return spv::DecorationBlock;
|
||||
case glslang::EvqCallableData: return spv::DecorationBlock;
|
||||
case glslang::EvqCallableDataIn: return spv::DecorationBlock;
|
||||
case glslang::EvqHitObjectAttrNV: return spv::DecorationBlock;
|
||||
#endif
|
||||
default:
|
||||
assert(0);
|
||||
@ -469,6 +468,7 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T
|
||||
case glslang::EvqHitAttr:
|
||||
case glslang::EvqCallableData:
|
||||
case glslang::EvqCallableDataIn:
|
||||
case glslang::EvqHitObjectAttrNV:
|
||||
return spv::DecorationMax;
|
||||
#endif
|
||||
default:
|
||||
@ -1299,7 +1299,7 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
|
||||
// Translate glslang type to SPIR-V storage class.
|
||||
spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type)
|
||||
{
|
||||
if (type.getBasicType() == glslang::EbtRayQuery)
|
||||
if (type.getBasicType() == glslang::EbtRayQuery || type.getBasicType() == glslang::EbtHitObjectNV)
|
||||
return spv::StorageClassPrivate;
|
||||
#ifndef GLSLANG_WEB
|
||||
if (type.getQualifier().isSpirvByReference()) {
|
||||
@ -1356,6 +1356,7 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
||||
case glslang::EvqCallableData: return spv::StorageClassCallableDataKHR;
|
||||
case glslang::EvqCallableDataIn: return spv::StorageClassIncomingCallableDataKHR;
|
||||
case glslang::EvqtaskPayloadSharedEXT : return spv::StorageClassTaskPayloadWorkgroupEXT;
|
||||
case glslang::EvqHitObjectAttrNV: return spv::StorageClassHitObjectAttributeNV;
|
||||
case glslang::EvqSpirvStorageClass: return static_cast<spv::StorageClass>(type.getQualifier().spirvStorageClass);
|
||||
#endif
|
||||
default:
|
||||
@ -2582,6 +2583,35 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
|
||||
|
||||
spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags;
|
||||
|
||||
const auto hitObjectOpsWithLvalue = [](glslang::TOperator op) {
|
||||
switch(op) {
|
||||
case glslang::EOpReorderThreadNV:
|
||||
case glslang::EOpHitObjectGetCurrentTimeNV:
|
||||
case glslang::EOpHitObjectGetHitKindNV:
|
||||
case glslang::EOpHitObjectGetPrimitiveIndexNV:
|
||||
case glslang::EOpHitObjectGetGeometryIndexNV:
|
||||
case glslang::EOpHitObjectGetInstanceIdNV:
|
||||
case glslang::EOpHitObjectGetInstanceCustomIndexNV:
|
||||
case glslang::EOpHitObjectGetObjectRayDirectionNV:
|
||||
case glslang::EOpHitObjectGetObjectRayOriginNV:
|
||||
case glslang::EOpHitObjectGetWorldRayDirectionNV:
|
||||
case glslang::EOpHitObjectGetWorldRayOriginNV:
|
||||
case glslang::EOpHitObjectGetWorldToObjectNV:
|
||||
case glslang::EOpHitObjectGetObjectToWorldNV:
|
||||
case glslang::EOpHitObjectGetRayTMaxNV:
|
||||
case glslang::EOpHitObjectGetRayTMinNV:
|
||||
case glslang::EOpHitObjectIsEmptyNV:
|
||||
case glslang::EOpHitObjectIsHitNV:
|
||||
case glslang::EOpHitObjectIsMissNV:
|
||||
case glslang::EOpHitObjectRecordEmptyNV:
|
||||
case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV:
|
||||
case glslang::EOpHitObjectGetShaderRecordBufferHandleNV:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if (node->getOp() == glslang::EOpAtomicCounterIncrement ||
|
||||
node->getOp() == glslang::EOpAtomicCounterDecrement ||
|
||||
@ -2596,7 +2626,8 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
|
||||
node->getOp() == glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque ||
|
||||
node->getOp() == glslang::EOpRayQueryTerminate ||
|
||||
node->getOp() == glslang::EOpRayQueryConfirmIntersection ||
|
||||
(node->getOp() == glslang::EOpSpirvInst && operandNode->getAsTyped()->getQualifier().isSpirvByReference())) {
|
||||
(node->getOp() == glslang::EOpSpirvInst && operandNode->getAsTyped()->getQualifier().isSpirvByReference()) ||
|
||||
hitObjectOpsWithLvalue(node->getOp())) {
|
||||
operand = builder.accessChainGetLValue(); // Special case l-value operands
|
||||
lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
|
||||
lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType());
|
||||
@ -2731,6 +2762,12 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
|
||||
case glslang::EOpRayQueryConfirmIntersection:
|
||||
builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operand);
|
||||
return false;
|
||||
case glslang::EOpReorderThreadNV:
|
||||
builder.createNoResultOp(spv::OpReorderThreadWithHitObjectNV, operand);
|
||||
return false;
|
||||
case glslang::EOpHitObjectRecordEmptyNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordEmptyNV, operand);
|
||||
return false;
|
||||
#endif
|
||||
|
||||
default:
|
||||
@ -3222,6 +3259,43 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
builder.addExtension(spv::E_SPV_EXT_fragment_shader_interlock);
|
||||
noReturnValue = true;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectTraceRayNV:
|
||||
case glslang::EOpHitObjectTraceRayMotionNV:
|
||||
case glslang::EOpHitObjectGetAttributesNV:
|
||||
case glslang::EOpHitObjectExecuteShaderNV:
|
||||
case glslang::EOpHitObjectRecordEmptyNV:
|
||||
case glslang::EOpHitObjectRecordMissNV:
|
||||
case glslang::EOpHitObjectRecordMissMotionNV:
|
||||
case glslang::EOpHitObjectRecordHitNV:
|
||||
case glslang::EOpHitObjectRecordHitMotionNV:
|
||||
case glslang::EOpHitObjectRecordHitWithIndexNV:
|
||||
case glslang::EOpHitObjectRecordHitWithIndexMotionNV:
|
||||
case glslang::EOpReorderThreadNV:
|
||||
noReturnValue = true;
|
||||
//Fallthrough
|
||||
case glslang::EOpHitObjectIsEmptyNV:
|
||||
case glslang::EOpHitObjectIsMissNV:
|
||||
case glslang::EOpHitObjectIsHitNV:
|
||||
case glslang::EOpHitObjectGetRayTMinNV:
|
||||
case glslang::EOpHitObjectGetRayTMaxNV:
|
||||
case glslang::EOpHitObjectGetObjectRayOriginNV:
|
||||
case glslang::EOpHitObjectGetObjectRayDirectionNV:
|
||||
case glslang::EOpHitObjectGetWorldRayOriginNV:
|
||||
case glslang::EOpHitObjectGetWorldRayDirectionNV:
|
||||
case glslang::EOpHitObjectGetObjectToWorldNV:
|
||||
case glslang::EOpHitObjectGetWorldToObjectNV:
|
||||
case glslang::EOpHitObjectGetInstanceCustomIndexNV:
|
||||
case glslang::EOpHitObjectGetInstanceIdNV:
|
||||
case glslang::EOpHitObjectGetGeometryIndexNV:
|
||||
case glslang::EOpHitObjectGetPrimitiveIndexNV:
|
||||
case glslang::EOpHitObjectGetHitKindNV:
|
||||
case glslang::EOpHitObjectGetCurrentTimeNV:
|
||||
case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV:
|
||||
case glslang::EOpHitObjectGetShaderRecordBufferHandleNV:
|
||||
builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder);
|
||||
builder.addCapability(spv::CapabilityShaderInvocationReorderNV);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case glslang::EOpDebugPrintf:
|
||||
@ -3279,6 +3353,22 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
lvalue = true;
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case glslang::EOpHitObjectRecordHitNV:
|
||||
case glslang::EOpHitObjectRecordHitMotionNV:
|
||||
case glslang::EOpHitObjectRecordHitWithIndexNV:
|
||||
case glslang::EOpHitObjectRecordHitWithIndexMotionNV:
|
||||
case glslang::EOpHitObjectTraceRayNV:
|
||||
case glslang::EOpHitObjectTraceRayMotionNV:
|
||||
case glslang::EOpHitObjectExecuteShaderNV:
|
||||
case glslang::EOpHitObjectRecordMissNV:
|
||||
case glslang::EOpHitObjectRecordMissMotionNV:
|
||||
case glslang::EOpHitObjectGetAttributesNV:
|
||||
if (arg == 0)
|
||||
lvalue = true;
|
||||
break;
|
||||
|
||||
case glslang::EOpRayQueryInitialize:
|
||||
case glslang::EOpRayQueryTerminate:
|
||||
case glslang::EOpRayQueryConfirmIntersection:
|
||||
@ -3379,6 +3469,11 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvByReference())
|
||||
lvalue = true;
|
||||
break;
|
||||
case glslang::EOpReorderThreadNV:
|
||||
//Three variants of reorderThreadNV, two of them use hitObjectNV
|
||||
if (arg == 0 && glslangOperands.size() != 2)
|
||||
lvalue = true;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
@ -3477,11 +3572,23 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
operands.push_back(builder.makeIntConstant(cond ? 1 : 0));
|
||||
} else if ((arg == 10 && glslangOp == glslang::EOpTraceKHR) ||
|
||||
(arg == 11 && glslangOp == glslang::EOpTraceRayMotionNV) ||
|
||||
(arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR)) {
|
||||
const int opdNum = glslangOp == glslang::EOpTraceKHR ? 10 : (glslangOp == glslang::EOpTraceRayMotionNV ? 11 : 1);
|
||||
(arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR) ||
|
||||
(arg == 1 && glslangOp == glslang::EOpHitObjectExecuteShaderNV) ||
|
||||
(arg == 11 && glslangOp == glslang::EOpHitObjectTraceRayNV) ||
|
||||
(arg == 12 && glslangOp == glslang::EOpHitObjectTraceRayMotionNV)) {
|
||||
const int set = glslangOp == glslang::EOpExecuteCallableKHR ? 1 : 0;
|
||||
|
||||
const int location = glslangOperands[opdNum]->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
const int location = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
auto itNode = locationToSymbol[set].find(location);
|
||||
visitSymbol(itNode->second);
|
||||
spv::Id symId = getSymbolId(itNode->second);
|
||||
operands.push_back(symId);
|
||||
} else if ((arg == 12 && glslangOp == glslang::EOpHitObjectRecordHitNV) ||
|
||||
(arg == 13 && glslangOp == glslang::EOpHitObjectRecordHitMotionNV) ||
|
||||
(arg == 11 && glslangOp == glslang::EOpHitObjectRecordHitWithIndexNV) ||
|
||||
(arg == 12 && glslangOp == glslang::EOpHitObjectRecordHitWithIndexMotionNV) ||
|
||||
(arg == 1 && glslangOp == glslang::EOpHitObjectGetAttributesNV)) {
|
||||
const int location = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
const int set = 2;
|
||||
auto itNode = locationToSymbol[set].find(location);
|
||||
visitSymbol(itNode->second);
|
||||
spv::Id symId = getSymbolId(itNode->second);
|
||||
@ -4307,6 +4414,13 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
||||
case glslang::EbtString:
|
||||
// no type used for OpString
|
||||
return 0;
|
||||
|
||||
case glslang::EbtHitObjectNV: {
|
||||
builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder);
|
||||
builder.addCapability(spv::CapabilityShaderInvocationReorderNV);
|
||||
spvType = builder.makeHitObjectNVType();
|
||||
}
|
||||
break;
|
||||
#ifndef GLSLANG_WEB
|
||||
case glslang::EbtSpirvType: {
|
||||
// GL_EXT_spirv_intrinsics
|
||||
@ -4726,6 +4840,9 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
||||
// Decorate the structure
|
||||
builder.addDecoration(spvType, TranslateLayoutDecoration(type, qualifier.layoutMatrix));
|
||||
builder.addDecoration(spvType, TranslateBlockDecoration(type, glslangIntermediate->usingStorageBuffer()));
|
||||
|
||||
if (qualifier.hasHitObjectShaderRecordNV())
|
||||
builder.addDecoration(spvType, spv::DecorationHitObjectShaderRecordBufferNV);
|
||||
}
|
||||
|
||||
// Turn the expression forming the array size into an id.
|
||||
@ -5253,6 +5370,10 @@ void TGlslangToSpvTraverser::collectRayTracingLinkerObjects()
|
||||
set = 1;
|
||||
break;
|
||||
|
||||
case glslang::EvqHitObjectAttrNV:
|
||||
set = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
set = -1;
|
||||
}
|
||||
@ -6897,6 +7018,83 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
|
||||
case glslang::EOpConvUvec2ToAccStruct:
|
||||
unaryOp = spv::OpConvertUToAccelerationStructureKHR;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectIsEmptyNV:
|
||||
unaryOp = spv::OpHitObjectIsEmptyNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectIsMissNV:
|
||||
unaryOp = spv::OpHitObjectIsMissNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectIsHitNV:
|
||||
unaryOp = spv::OpHitObjectIsHitNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetObjectRayOriginNV:
|
||||
unaryOp = spv::OpHitObjectGetObjectRayOriginNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetObjectRayDirectionNV:
|
||||
unaryOp = spv::OpHitObjectGetObjectRayDirectionNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetWorldRayOriginNV:
|
||||
unaryOp = spv::OpHitObjectGetWorldRayOriginNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetWorldRayDirectionNV:
|
||||
unaryOp = spv::OpHitObjectGetWorldRayDirectionNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetObjectToWorldNV:
|
||||
unaryOp = spv::OpHitObjectGetObjectToWorldNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetWorldToObjectNV:
|
||||
unaryOp = spv::OpHitObjectGetWorldToObjectNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetRayTMinNV:
|
||||
unaryOp = spv::OpHitObjectGetRayTMinNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetRayTMaxNV:
|
||||
unaryOp = spv::OpHitObjectGetRayTMaxNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetPrimitiveIndexNV:
|
||||
unaryOp = spv::OpHitObjectGetPrimitiveIndexNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetInstanceIdNV:
|
||||
unaryOp = spv::OpHitObjectGetInstanceIdNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetInstanceCustomIndexNV:
|
||||
unaryOp = spv::OpHitObjectGetInstanceCustomIndexNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetGeometryIndexNV:
|
||||
unaryOp = spv::OpHitObjectGetGeometryIndexNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetHitKindNV:
|
||||
unaryOp = spv::OpHitObjectGetHitKindNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetCurrentTimeNV:
|
||||
unaryOp = spv::OpHitObjectGetCurrentTimeNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV:
|
||||
unaryOp = spv::OpHitObjectGetShaderBindingTableRecordIndexNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetShaderRecordBufferHandleNV:
|
||||
unaryOp = spv::OpHitObjectGetShaderRecordBufferHandleNV;
|
||||
break;
|
||||
|
||||
#endif
|
||||
|
||||
case glslang::EOpCopyObject:
|
||||
@ -8638,6 +8836,122 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
||||
case glslang::EOpCooperativeMatrixMulAdd:
|
||||
opCode = spv::OpCooperativeMatrixMulAddNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectTraceRayNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectTraceRayNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectTraceRayMotionNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectTraceRayMotionNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectRecordHitNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordHitNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectRecordHitMotionNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordHitMotionNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectRecordHitWithIndexNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordHitWithIndexNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectRecordHitWithIndexMotionNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordHitWithIndexMotionNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectRecordMissNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordMissNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectRecordMissMotionNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordMissMotionNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectExecuteShaderNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectExecuteShaderNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectIsEmptyNV:
|
||||
typeId = builder.makeBoolType();
|
||||
opCode = spv::OpHitObjectIsEmptyNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectIsMissNV:
|
||||
typeId = builder.makeBoolType();
|
||||
opCode = spv::OpHitObjectIsMissNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectIsHitNV:
|
||||
typeId = builder.makeBoolType();
|
||||
opCode = spv::OpHitObjectIsHitNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetRayTMinNV:
|
||||
typeId = builder.makeFloatType(32);
|
||||
opCode = spv::OpHitObjectGetRayTMinNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetRayTMaxNV:
|
||||
typeId = builder.makeFloatType(32);
|
||||
opCode = spv::OpHitObjectGetRayTMaxNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetObjectRayOriginNV:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
|
||||
opCode = spv::OpHitObjectGetObjectRayOriginNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetObjectRayDirectionNV:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
|
||||
opCode = spv::OpHitObjectGetObjectRayDirectionNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetWorldRayOriginNV:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
|
||||
opCode = spv::OpHitObjectGetWorldRayOriginNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetWorldRayDirectionNV:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
|
||||
opCode = spv::OpHitObjectGetWorldRayDirectionNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetWorldToObjectNV:
|
||||
typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3);
|
||||
opCode = spv::OpHitObjectGetWorldToObjectNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetObjectToWorldNV:
|
||||
typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3);
|
||||
opCode = spv::OpHitObjectGetObjectToWorldNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetInstanceCustomIndexNV:
|
||||
typeId = builder.makeIntegerType(32, 1);
|
||||
opCode = spv::OpHitObjectGetInstanceCustomIndexNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetInstanceIdNV:
|
||||
typeId = builder.makeIntegerType(32, 1);
|
||||
opCode = spv::OpHitObjectGetInstanceIdNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetGeometryIndexNV:
|
||||
typeId = builder.makeIntegerType(32, 1);
|
||||
opCode = spv::OpHitObjectGetGeometryIndexNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetPrimitiveIndexNV:
|
||||
typeId = builder.makeIntegerType(32, 1);
|
||||
opCode = spv::OpHitObjectGetPrimitiveIndexNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetHitKindNV:
|
||||
typeId = builder.makeIntegerType(32, 0);
|
||||
opCode = spv::OpHitObjectGetHitKindNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetCurrentTimeNV:
|
||||
typeId = builder.makeFloatType(32);
|
||||
opCode = spv::OpHitObjectGetCurrentTimeNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV:
|
||||
typeId = builder.makeIntegerType(32, 0);
|
||||
opCode = spv::OpHitObjectGetShaderBindingTableRecordIndexNV;
|
||||
return 0;
|
||||
case glslang::EOpHitObjectGetAttributesNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectGetAttributesNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectGetShaderRecordBufferHandleNV:
|
||||
typeId = builder.makeVectorType(builder.makeUintType(32), 2);
|
||||
opCode = spv::OpHitObjectGetShaderRecordBufferHandleNV;
|
||||
break;
|
||||
case glslang::EOpReorderThreadNV: {
|
||||
if (operands.size() == 2) {
|
||||
builder.createNoResultOp(spv::OpReorderThreadWithHintNV, operands);
|
||||
} else {
|
||||
builder.createNoResultOp(spv::OpReorderThreadWithHitObjectNV, operands);
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
break;
|
||||
#endif // GLSLANG_WEB
|
||||
default:
|
||||
return 0;
|
||||
@ -8947,13 +9261,17 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
||||
}
|
||||
|
||||
if (symbol->getQualifier().hasLocation()) {
|
||||
if (!(glslangIntermediate->isRayTracingStage() && glslangIntermediate->IsRequestedExtension(glslang::E_GL_EXT_ray_tracing)
|
||||
if (!(glslangIntermediate->isRayTracingStage() &&
|
||||
(glslangIntermediate->IsRequestedExtension(glslang::E_GL_EXT_ray_tracing) ||
|
||||
glslangIntermediate->IsRequestedExtension(glslang::E_GL_NV_shader_invocation_reorder))
|
||||
&& (builder.getStorageClass(id) == spv::StorageClassRayPayloadKHR ||
|
||||
builder.getStorageClass(id) == spv::StorageClassIncomingRayPayloadKHR ||
|
||||
builder.getStorageClass(id) == spv::StorageClassCallableDataKHR ||
|
||||
builder.getStorageClass(id) == spv::StorageClassIncomingCallableDataKHR))) {
|
||||
// Location values are used to link TraceRayKHR and ExecuteCallableKHR to corresponding variables
|
||||
// but are not valid in SPIRV since they are supported only for Input/Output Storage classes.
|
||||
builder.getStorageClass(id) == spv::StorageClassIncomingCallableDataKHR ||
|
||||
builder.getStorageClass(id) == spv::StorageClassHitObjectAttributeNV))) {
|
||||
// Location values are used to link TraceRayKHR/ExecuteCallableKHR/HitObjectGetAttributesNV
|
||||
// to corresponding variables but are not valid in SPIRV since they are supported only
|
||||
// for Input/Output Storage classes.
|
||||
builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation);
|
||||
}
|
||||
}
|
||||
|
@ -1176,6 +1176,21 @@ Id Builder::makeRayQueryType()
|
||||
|
||||
return type->getResultId();
|
||||
}
|
||||
|
||||
Id Builder::makeHitObjectNVType()
|
||||
{
|
||||
Instruction *type;
|
||||
if (groupedTypes[OpTypeHitObjectNV].size() == 0) {
|
||||
type = new Instruction(getUniqueId(), NoType, OpTypeHitObjectNV);
|
||||
groupedTypes[OpTypeHitObjectNV].push_back(type);
|
||||
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||
module.mapInstruction(type);
|
||||
} else {
|
||||
type = groupedTypes[OpTypeHitObjectNV].back();
|
||||
}
|
||||
|
||||
return type->getResultId();
|
||||
}
|
||||
#endif
|
||||
|
||||
Id Builder::getDerefTypeId(Id resultId) const
|
||||
|
@ -240,6 +240,8 @@ public:
|
||||
Id makeAccelerationStructureType();
|
||||
// rayQueryEXT type
|
||||
Id makeRayQueryType();
|
||||
// hitObjectNV type
|
||||
Id makeHitObjectNVType();
|
||||
|
||||
// For querying about types.
|
||||
Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
|
||||
|
223
SPIRV/doc.cpp
223
SPIRV/doc.cpp
@ -246,6 +246,7 @@ const char* StorageClassString(int StorageClass)
|
||||
|
||||
case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
|
||||
case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT";
|
||||
case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV";
|
||||
default: return "Bad";
|
||||
}
|
||||
}
|
||||
@ -320,6 +321,8 @@ const char* DecorationString(int decoration)
|
||||
case DecorationHlslSemanticGOOGLE: return "DecorationHlslSemanticGOOGLE";
|
||||
case DecorationRestrictPointerEXT: return "DecorationRestrictPointerEXT";
|
||||
case DecorationAliasedPointerEXT: return "DecorationAliasedPointerEXT";
|
||||
|
||||
case DecorationHitObjectShaderRecordBufferNV: return "DecorationHitObjectShaderRecordBufferNV";
|
||||
}
|
||||
}
|
||||
|
||||
@ -1006,6 +1009,7 @@ const char* CapabilityString(int info)
|
||||
case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR";
|
||||
case CapabilityCoreBuiltinsARM: return "CoreBuiltinsARM";
|
||||
|
||||
case CapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV";
|
||||
default: return "Bad";
|
||||
}
|
||||
}
|
||||
@ -1460,6 +1464,40 @@ const char* OpcodeString(int op)
|
||||
case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT";
|
||||
case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT";
|
||||
|
||||
case OpTypeHitObjectNV: return "OpTypeHitObjectNV";
|
||||
case OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV";
|
||||
case OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV";
|
||||
case OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV";
|
||||
case OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV";
|
||||
case OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV";
|
||||
case OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV";
|
||||
case OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV";
|
||||
case OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV";
|
||||
case OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV";
|
||||
case OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV";
|
||||
case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV";
|
||||
case OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV";
|
||||
case OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV";
|
||||
case OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV";
|
||||
case OpHitObjectGetHitKindNV: return "OpHitObjectGetFrontFaceNV";
|
||||
case OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV";
|
||||
case OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV";
|
||||
case OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV";
|
||||
case OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV";
|
||||
case OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV";
|
||||
case OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV";
|
||||
case OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV";
|
||||
case OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV";
|
||||
case OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV";
|
||||
case OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV";
|
||||
case OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV";
|
||||
case OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV";
|
||||
case OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV";
|
||||
case OpHitObjectIsHitNV: return "OpHitObjectIsHitNV";
|
||||
case OpHitObjectIsMissNV: return "OpHitObjectIsMissNV";
|
||||
case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV";
|
||||
case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV";
|
||||
|
||||
default:
|
||||
return "Bad";
|
||||
}
|
||||
@ -3037,6 +3075,191 @@ void Parameterize()
|
||||
InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'");
|
||||
|
||||
InstructionDesc[OpTypeHitObjectNV].setResultAndType(true, false);
|
||||
|
||||
InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Hint'");
|
||||
InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Bits'");
|
||||
InstructionDesc[OpReorderThreadWithHintNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Hint'");
|
||||
InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Bits'");
|
||||
InstructionDesc[OpReorderThreadWithHitObjectNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectGetCurrentTimeNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetCurrentTimeNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetHitKindNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetHitKindNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetPrimitiveIndexNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetPrimitiveIndexNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetGeometryIndexNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetGeometryIndexNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetInstanceIdNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetInstanceIdNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetObjectRayDirectionNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetObjectRayDirectionNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetObjectRayOriginNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetObjectRayOriginNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetWorldRayDirectionNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetWorldRayDirectionNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetWorldRayOriginNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetWorldRayOriginNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetWorldToObjectNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetWorldToObjectNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetObjectToWorldNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetObjectToWorldNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetRayTMaxNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetRayTMaxNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetRayTMinNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetRayTMinNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectIsEmptyNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectIsEmptyNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectIsHitNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectIsHitNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectIsMissNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectIsMissNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObjectAttribute'");
|
||||
InstructionDesc[OpHitObjectGetAttributesNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'Payload'");
|
||||
InstructionDesc[OpHitObjectExecuteShaderNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'InstanceId'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'PrimitiveId'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'GeometryIndex'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitKind'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Offset'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Stride'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject Attribute'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'InstanceId'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'PrimitiveId'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'GeometryIndex'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitKind'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Offset'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Stride'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Current Time'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject Attribute'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'InstanceId'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'PrimitiveId'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'GeometryIndex'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitKind'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'SBT Record Index'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject Attribute'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'InstanceId'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'PrimitiveId'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'GeometryIndex'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitKind'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'SBT Record Index'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Current Time'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject Attribute'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'SBT Index'");
|
||||
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectRecordMissNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'SBT Index'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Current Time'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordEmptyNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordEmptyNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'RayFlags'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Cullmask'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Offset'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Stride'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Miss Index'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Payload'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'RayFlags'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Cullmask'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Miss Index'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Time'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Payload'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].setResultAndType(false, false);
|
||||
}
|
||||
|
||||
}; // end spv namespace
|
||||
|
@ -223,6 +223,7 @@ enum StorageClass {
|
||||
StorageClassShaderRecordBufferNV = 5343,
|
||||
StorageClassPhysicalStorageBuffer = 5349,
|
||||
StorageClassPhysicalStorageBufferEXT = 5349,
|
||||
StorageClassHitObjectAttributeNV = 5385,
|
||||
StorageClassTaskPayloadWorkgroupEXT = 5402,
|
||||
StorageClassCodeSectionINTEL = 5605,
|
||||
StorageClassDeviceOnlyINTEL = 5936,
|
||||
@ -518,6 +519,7 @@ enum Decoration {
|
||||
DecorationRestrictPointerEXT = 5355,
|
||||
DecorationAliasedPointer = 5356,
|
||||
DecorationAliasedPointerEXT = 5356,
|
||||
DecorationHitObjectShaderRecordBufferNV = 5386,
|
||||
DecorationBindlessSamplerNV = 5398,
|
||||
DecorationBindlessImageNV = 5399,
|
||||
DecorationBoundSamplerNV = 5400,
|
||||
@ -1048,6 +1050,7 @@ enum Capability {
|
||||
CapabilityFragmentShaderPixelInterlockEXT = 5378,
|
||||
CapabilityDemoteToHelperInvocation = 5379,
|
||||
CapabilityDemoteToHelperInvocationEXT = 5379,
|
||||
CapabilityShaderInvocationReorderNV = 5383,
|
||||
CapabilityBindlessTextureNV = 5390,
|
||||
CapabilitySubgroupShuffleINTEL = 5568,
|
||||
CapabilitySubgroupBufferBlockIOINTEL = 5569,
|
||||
@ -1594,6 +1597,39 @@ enum Op {
|
||||
OpFragmentMaskFetchAMD = 5011,
|
||||
OpFragmentFetchAMD = 5012,
|
||||
OpReadClockKHR = 5056,
|
||||
OpHitObjectRecordHitMotionNV = 5249,
|
||||
OpHitObjectRecordHitWithIndexMotionNV = 5250,
|
||||
OpHitObjectRecordMissMotionNV = 5251,
|
||||
OpHitObjectGetWorldToObjectNV = 5252,
|
||||
OpHitObjectGetObjectToWorldNV = 5253,
|
||||
OpHitObjectGetObjectRayDirectionNV = 5254,
|
||||
OpHitObjectGetObjectRayOriginNV = 5255,
|
||||
OpHitObjectTraceRayMotionNV = 5256,
|
||||
OpHitObjectGetShaderRecordBufferHandleNV = 5257,
|
||||
OpHitObjectGetShaderBindingTableRecordIndexNV = 5258,
|
||||
OpHitObjectRecordEmptyNV = 5259,
|
||||
OpHitObjectTraceRayNV = 5260,
|
||||
OpHitObjectRecordHitNV = 5261,
|
||||
OpHitObjectRecordHitWithIndexNV = 5262,
|
||||
OpHitObjectRecordMissNV = 5263,
|
||||
OpHitObjectExecuteShaderNV = 5264,
|
||||
OpHitObjectGetCurrentTimeNV = 5265,
|
||||
OpHitObjectGetAttributesNV = 5266,
|
||||
OpHitObjectGetHitKindNV = 5267,
|
||||
OpHitObjectGetPrimitiveIndexNV = 5268,
|
||||
OpHitObjectGetGeometryIndexNV = 5269,
|
||||
OpHitObjectGetInstanceIdNV = 5270,
|
||||
OpHitObjectGetInstanceCustomIndexNV = 5271,
|
||||
OpHitObjectGetWorldRayDirectionNV = 5272,
|
||||
OpHitObjectGetWorldRayOriginNV = 5273,
|
||||
OpHitObjectGetRayTMaxNV = 5274,
|
||||
OpHitObjectGetRayTMinNV = 5275,
|
||||
OpHitObjectIsEmptyNV = 5276,
|
||||
OpHitObjectIsHitNV = 5277,
|
||||
OpHitObjectIsMissNV = 5278,
|
||||
OpReorderThreadWithHitObjectNV = 5279,
|
||||
OpReorderThreadWithHintNV = 5280,
|
||||
OpTypeHitObjectNV = 5281,
|
||||
OpImageSampleFootprintNV = 5283,
|
||||
OpEmitMeshTasksEXT = 5294,
|
||||
OpSetMeshOutputsEXT = 5295,
|
||||
|
215
Test/baseResults/spv.nv.hitobject-allops.rchit.out
Normal file
215
Test/baseResults/spv.nv.hitobject-allops.rchit.out
Normal file
@ -0,0 +1,215 @@
|
||||
spv.nv.hitobject-allops.rchit
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 116
|
||||
|
||||
Capability RayTracingKHR
|
||||
Capability ShaderInvocationReorderNV
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
Extension "SPV_NV_shader_invocation_reorder"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint ClosestHitKHR 4 "main" 9 14 22 25 36 42 48 52 53 64
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
SourceExtension "GL_NV_ray_tracing_motion_blur"
|
||||
SourceExtension "GL_NV_shader_invocation_reorder"
|
||||
Name 4 "main"
|
||||
Name 9 "attr"
|
||||
Name 12 "hBlock"
|
||||
MemberName 12(hBlock) 0 "attrval"
|
||||
Name 14 ""
|
||||
Name 22 "hObj"
|
||||
Name 25 "as"
|
||||
Name 36 "payload"
|
||||
Name 40 "pBlock"
|
||||
MemberName 40(pBlock) 0 "val1"
|
||||
MemberName 40(pBlock) 1 "val2"
|
||||
Name 42 ""
|
||||
Name 48 "hObjHit"
|
||||
Name 52 "hObjNop"
|
||||
Name 53 "hObjMiss"
|
||||
Name 62 "block"
|
||||
MemberName 62(block) 0 "op"
|
||||
Name 64 ""
|
||||
Name 79 "tmin"
|
||||
Name 81 "tmax"
|
||||
Name 84 "orig"
|
||||
Name 86 "dir"
|
||||
Name 88 "oorig"
|
||||
Name 90 "odir"
|
||||
Name 94 "otw"
|
||||
Name 96 "wto"
|
||||
Name 99 "cid"
|
||||
Name 101 "iid"
|
||||
Name 103 "pid"
|
||||
Name 105 "gid"
|
||||
Name 108 "hkind"
|
||||
Name 112 "handle"
|
||||
Name 114 "rid"
|
||||
Decorate 12(hBlock) Block
|
||||
Decorate 25(as) DescriptorSet 0
|
||||
Decorate 25(as) Binding 0
|
||||
Decorate 40(pBlock) Block
|
||||
MemberDecorate 62(block) 0 Offset 0
|
||||
Decorate 62(block) Block
|
||||
Decorate 64 DescriptorSet 0
|
||||
Decorate 64 Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 2
|
||||
8: TypePointer HitObjectAttributeNV 7(fvec2)
|
||||
9(attr): 8(ptr) Variable HitObjectAttributeNV
|
||||
10: 6(float) Constant 1065353216
|
||||
11: 7(fvec2) ConstantComposite 10 10
|
||||
12(hBlock): TypeStruct 6(float)
|
||||
13: TypePointer HitObjectAttributeNV 12(hBlock)
|
||||
14: 13(ptr) Variable HitObjectAttributeNV
|
||||
15: TypeInt 32 1
|
||||
16: 15(int) Constant 0
|
||||
17: 6(float) Constant 1073741824
|
||||
18: TypePointer HitObjectAttributeNV 6(float)
|
||||
20: TypeHitObjectNV
|
||||
21: TypePointer Private 20
|
||||
22(hObj): 21(ptr) Variable Private
|
||||
23: TypeAccelerationStructureKHR
|
||||
24: TypePointer UniformConstant 23
|
||||
25(as): 24(ptr) Variable UniformConstant
|
||||
27: TypeInt 32 0
|
||||
28: 27(int) Constant 1
|
||||
29: TypeVector 6(float) 3
|
||||
30: 6(float) Constant 1056964608
|
||||
31: 29(fvec3) ConstantComposite 30 30 30
|
||||
32: 29(fvec3) ConstantComposite 10 10 10
|
||||
33: 15(int) Constant 1
|
||||
34: TypeVector 6(float) 4
|
||||
35: TypePointer RayPayloadKHR 34(fvec4)
|
||||
36(payload): 35(ptr) Variable RayPayloadKHR
|
||||
38: 6(float) Constant 1092616192
|
||||
39: 15(int) Constant 2
|
||||
40(pBlock): TypeStruct 7(fvec2) 7(fvec2)
|
||||
41: TypePointer RayPayloadKHR 40(pBlock)
|
||||
42: 41(ptr) Variable RayPayloadKHR
|
||||
44: 27(int) Constant 2
|
||||
45: 29(fvec3) ConstantComposite 17 17 17
|
||||
47: 6(float) Constant 1082130432
|
||||
48(hObjHit): 21(ptr) Variable Private
|
||||
50: 15(int) Constant 3
|
||||
52(hObjNop): 21(ptr) Variable Private
|
||||
53(hObjMiss): 21(ptr) Variable Private
|
||||
54: 6(float) Constant 1069547520
|
||||
55: 29(fvec3) ConstantComposite 54 54 54
|
||||
56: 6(float) Constant 1084227584
|
||||
57: 6(float) Constant 1090519040
|
||||
58: TypeBool
|
||||
62(block): TypeStruct 6(float)
|
||||
63: TypePointer StorageBuffer 62(block)
|
||||
64: 63(ptr) Variable StorageBuffer
|
||||
65: TypePointer StorageBuffer 6(float)
|
||||
76: 6(float) Constant 1077936128
|
||||
78: TypePointer Function 6(float)
|
||||
83: TypePointer Function 29(fvec3)
|
||||
92: TypeMatrix 29(fvec3) 4
|
||||
93: TypePointer Function 92
|
||||
98: TypePointer Function 15(int)
|
||||
107: TypePointer Function 27(int)
|
||||
110: TypeVector 27(int) 2
|
||||
111: TypePointer Function 110(ivec2)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
79(tmin): 78(ptr) Variable Function
|
||||
81(tmax): 78(ptr) Variable Function
|
||||
84(orig): 83(ptr) Variable Function
|
||||
86(dir): 83(ptr) Variable Function
|
||||
88(oorig): 83(ptr) Variable Function
|
||||
90(odir): 83(ptr) Variable Function
|
||||
94(otw): 93(ptr) Variable Function
|
||||
96(wto): 93(ptr) Variable Function
|
||||
99(cid): 98(ptr) Variable Function
|
||||
101(iid): 98(ptr) Variable Function
|
||||
103(pid): 98(ptr) Variable Function
|
||||
105(gid): 98(ptr) Variable Function
|
||||
108(hkind): 107(ptr) Variable Function
|
||||
112(handle): 111(ptr) Variable Function
|
||||
114(rid): 107(ptr) Variable Function
|
||||
Store 9(attr) 11
|
||||
19: 18(ptr) AccessChain 14 16
|
||||
Store 19 17
|
||||
26: 23 Load 25(as)
|
||||
HitObjectTraceRayNV 22(hObj) 26 28 28 28 28 28 31 30 32 10 36(payload)
|
||||
37: 23 Load 25(as)
|
||||
HitObjectTraceRayMotionNV 22(hObj) 37 28 28 28 28 28 31 30 32 10 38 42
|
||||
43: 23 Load 25(as)
|
||||
HitObjectRecordHitNV 22(hObj) 43 33 33 33 44 44 44 32 10 45 17 9(attr)
|
||||
46: 23 Load 25(as)
|
||||
HitObjectRecordHitMotionNV 22(hObj) 46 33 33 33 44 44 44 32 10 45 17 47 9(attr)
|
||||
49: 23 Load 25(as)
|
||||
HitObjectRecordHitWithIndexNV 48(hObjHit) 49 33 33 33 44 44 32 10 45 17 14
|
||||
51: 23 Load 25(as)
|
||||
HitObjectRecordHitWithIndexMotionNV 48(hObjHit) 51 33 33 33 44 44 32 10 45 17 47 14
|
||||
HitObjectRecordEmptyNV 52(hObjNop)
|
||||
HitObjectRecordMissNV 53(hObjMiss) 28 31 17 55 56
|
||||
HitObjectRecordMissMotionNV 53(hObjMiss) 28 31 17 55 56 57
|
||||
HitObjectExecuteShaderNV 48(hObjHit) 42
|
||||
59: 58(bool) HitObjectIsHitNV 22(hObj)
|
||||
SelectionMerge 61 None
|
||||
BranchConditional 59 60 67
|
||||
60: Label
|
||||
66: 65(ptr) AccessChain 64 16
|
||||
Store 66 10
|
||||
Branch 61
|
||||
67: Label
|
||||
68: 58(bool) HitObjectIsMissNV 22(hObj)
|
||||
SelectionMerge 70 None
|
||||
BranchConditional 68 69 72
|
||||
69: Label
|
||||
71: 65(ptr) AccessChain 64 16
|
||||
Store 71 17
|
||||
Branch 70
|
||||
72: Label
|
||||
73: 58(bool) HitObjectIsEmptyNV 22(hObj)
|
||||
SelectionMerge 75 None
|
||||
BranchConditional 73 74 75
|
||||
74: Label
|
||||
77: 65(ptr) AccessChain 64 16
|
||||
Store 77 76
|
||||
Branch 75
|
||||
75: Label
|
||||
Branch 70
|
||||
70: Label
|
||||
Branch 61
|
||||
61: Label
|
||||
80: 6(float) HitObjectGetRayTMinNV 48(hObjHit)
|
||||
Store 79(tmin) 80
|
||||
82: 6(float) HitObjectGetRayTMaxNV 48(hObjHit)
|
||||
Store 81(tmax) 82
|
||||
85: 29(fvec3) HitObjectGetWorldRayOriginNV 48(hObjHit)
|
||||
Store 84(orig) 85
|
||||
87: 29(fvec3) HitObjectGetWorldRayDirectionNV 48(hObjHit)
|
||||
Store 86(dir) 87
|
||||
89: 29(fvec3) HitObjectGetObjectRayOriginNV 48(hObjHit)
|
||||
Store 88(oorig) 89
|
||||
91: 29(fvec3) HitObjectGetObjectRayDirectionNV 48(hObjHit)
|
||||
Store 90(odir) 91
|
||||
95: 92 HitObjectGetObjectToWorldNV 48(hObjHit)
|
||||
Store 94(otw) 95
|
||||
97: 92 HitObjectGetWorldToObjectNV 48(hObjHit)
|
||||
Store 96(wto) 97
|
||||
100: 15(int) HitObjectGetInstanceCustomIndexNV 53(hObjMiss)
|
||||
Store 99(cid) 100
|
||||
102: 15(int) HitObjectGetInstanceIdNV 52(hObjNop)
|
||||
Store 101(iid) 102
|
||||
104: 15(int) HitObjectGetPrimitiveIndexNV 22(hObj)
|
||||
Store 103(pid) 104
|
||||
106: 15(int) HitObjectGetGeometryIndexNV 22(hObj)
|
||||
Store 105(gid) 106
|
||||
109: 27(int) HitObjectGetFrontFaceNV 22(hObj)
|
||||
Store 108(hkind) 109
|
||||
HitObjectGetAttributesNV 22(hObj) 9(attr)
|
||||
113: 110(ivec2) HitObjectGetShaderRecordBufferHandleNV 22(hObj)
|
||||
Store 112(handle) 113
|
||||
115: 27(int) HitObjectGetShaderBindingTableRecordIndexNV 22(hObj)
|
||||
Store 114(rid) 115
|
||||
Return
|
||||
FunctionEnd
|
219
Test/baseResults/spv.nv.hitobject-allops.rgen.out
Normal file
219
Test/baseResults/spv.nv.hitobject-allops.rgen.out
Normal file
@ -0,0 +1,219 @@
|
||||
spv.nv.hitobject-allops.rgen
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 117
|
||||
|
||||
Capability RayTracingKHR
|
||||
Capability ShaderInvocationReorderNV
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
Extension "SPV_NV_shader_invocation_reorder"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main" 9 14 22 25 36 42 48 52 53 64
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
SourceExtension "GL_NV_ray_tracing_motion_blur"
|
||||
SourceExtension "GL_NV_shader_invocation_reorder"
|
||||
Name 4 "main"
|
||||
Name 9 "attr"
|
||||
Name 12 "hBlock"
|
||||
MemberName 12(hBlock) 0 "attrval"
|
||||
Name 14 ""
|
||||
Name 22 "hObj"
|
||||
Name 25 "as"
|
||||
Name 36 "payload"
|
||||
Name 40 "pBlock"
|
||||
MemberName 40(pBlock) 0 "val1"
|
||||
MemberName 40(pBlock) 1 "val2"
|
||||
Name 42 ""
|
||||
Name 48 "hObjHit"
|
||||
Name 52 "hObjNop"
|
||||
Name 53 "hObjMiss"
|
||||
Name 62 "block"
|
||||
MemberName 62(block) 0 "op"
|
||||
Name 64 ""
|
||||
Name 79 "tmin"
|
||||
Name 81 "tmax"
|
||||
Name 84 "orig"
|
||||
Name 86 "dir"
|
||||
Name 88 "oorig"
|
||||
Name 90 "odir"
|
||||
Name 94 "otw"
|
||||
Name 96 "wto"
|
||||
Name 99 "cid"
|
||||
Name 101 "iid"
|
||||
Name 103 "pid"
|
||||
Name 105 "gid"
|
||||
Name 108 "hkind"
|
||||
Name 112 "handle"
|
||||
Name 114 "rid"
|
||||
Decorate 12(hBlock) Block
|
||||
Decorate 25(as) DescriptorSet 0
|
||||
Decorate 25(as) Binding 0
|
||||
Decorate 40(pBlock) Block
|
||||
MemberDecorate 62(block) 0 Offset 0
|
||||
Decorate 62(block) Block
|
||||
Decorate 64 DescriptorSet 0
|
||||
Decorate 64 Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 2
|
||||
8: TypePointer HitObjectAttributeNV 7(fvec2)
|
||||
9(attr): 8(ptr) Variable HitObjectAttributeNV
|
||||
10: 6(float) Constant 1065353216
|
||||
11: 7(fvec2) ConstantComposite 10 10
|
||||
12(hBlock): TypeStruct 6(float)
|
||||
13: TypePointer HitObjectAttributeNV 12(hBlock)
|
||||
14: 13(ptr) Variable HitObjectAttributeNV
|
||||
15: TypeInt 32 1
|
||||
16: 15(int) Constant 0
|
||||
17: 6(float) Constant 1073741824
|
||||
18: TypePointer HitObjectAttributeNV 6(float)
|
||||
20: TypeHitObjectNV
|
||||
21: TypePointer Private 20
|
||||
22(hObj): 21(ptr) Variable Private
|
||||
23: TypeAccelerationStructureKHR
|
||||
24: TypePointer UniformConstant 23
|
||||
25(as): 24(ptr) Variable UniformConstant
|
||||
27: TypeInt 32 0
|
||||
28: 27(int) Constant 1
|
||||
29: TypeVector 6(float) 3
|
||||
30: 6(float) Constant 1056964608
|
||||
31: 29(fvec3) ConstantComposite 30 30 30
|
||||
32: 29(fvec3) ConstantComposite 10 10 10
|
||||
33: 15(int) Constant 1
|
||||
34: TypeVector 6(float) 4
|
||||
35: TypePointer RayPayloadKHR 34(fvec4)
|
||||
36(payload): 35(ptr) Variable RayPayloadKHR
|
||||
38: 6(float) Constant 1092616192
|
||||
39: 15(int) Constant 2
|
||||
40(pBlock): TypeStruct 7(fvec2) 7(fvec2)
|
||||
41: TypePointer RayPayloadKHR 40(pBlock)
|
||||
42: 41(ptr) Variable RayPayloadKHR
|
||||
44: 27(int) Constant 2
|
||||
45: 29(fvec3) ConstantComposite 17 17 17
|
||||
47: 6(float) Constant 1082130432
|
||||
48(hObjHit): 21(ptr) Variable Private
|
||||
50: 15(int) Constant 3
|
||||
52(hObjNop): 21(ptr) Variable Private
|
||||
53(hObjMiss): 21(ptr) Variable Private
|
||||
54: 6(float) Constant 1069547520
|
||||
55: 29(fvec3) ConstantComposite 54 54 54
|
||||
56: 6(float) Constant 1084227584
|
||||
57: 6(float) Constant 1090519040
|
||||
58: TypeBool
|
||||
62(block): TypeStruct 6(float)
|
||||
63: TypePointer StorageBuffer 62(block)
|
||||
64: 63(ptr) Variable StorageBuffer
|
||||
65: TypePointer StorageBuffer 6(float)
|
||||
76: 6(float) Constant 1077936128
|
||||
78: TypePointer Function 6(float)
|
||||
83: TypePointer Function 29(fvec3)
|
||||
92: TypeMatrix 29(fvec3) 4
|
||||
93: TypePointer Function 92
|
||||
98: TypePointer Function 15(int)
|
||||
107: TypePointer Function 27(int)
|
||||
110: TypeVector 27(int) 2
|
||||
111: TypePointer Function 110(ivec2)
|
||||
116: 27(int) Constant 4
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
79(tmin): 78(ptr) Variable Function
|
||||
81(tmax): 78(ptr) Variable Function
|
||||
84(orig): 83(ptr) Variable Function
|
||||
86(dir): 83(ptr) Variable Function
|
||||
88(oorig): 83(ptr) Variable Function
|
||||
90(odir): 83(ptr) Variable Function
|
||||
94(otw): 93(ptr) Variable Function
|
||||
96(wto): 93(ptr) Variable Function
|
||||
99(cid): 98(ptr) Variable Function
|
||||
101(iid): 98(ptr) Variable Function
|
||||
103(pid): 98(ptr) Variable Function
|
||||
105(gid): 98(ptr) Variable Function
|
||||
108(hkind): 107(ptr) Variable Function
|
||||
112(handle): 111(ptr) Variable Function
|
||||
114(rid): 107(ptr) Variable Function
|
||||
Store 9(attr) 11
|
||||
19: 18(ptr) AccessChain 14 16
|
||||
Store 19 17
|
||||
26: 23 Load 25(as)
|
||||
HitObjectTraceRayNV 22(hObj) 26 28 28 28 28 28 31 30 32 10 36(payload)
|
||||
37: 23 Load 25(as)
|
||||
HitObjectTraceRayMotionNV 22(hObj) 37 28 28 28 28 28 31 30 32 10 38 42
|
||||
43: 23 Load 25(as)
|
||||
HitObjectRecordHitNV 22(hObj) 43 33 33 33 44 44 44 32 10 45 17 9(attr)
|
||||
46: 23 Load 25(as)
|
||||
HitObjectRecordHitMotionNV 22(hObj) 46 33 33 33 44 44 44 32 10 45 17 47 9(attr)
|
||||
49: 23 Load 25(as)
|
||||
HitObjectRecordHitWithIndexNV 48(hObjHit) 49 33 33 33 44 44 32 10 45 17 14
|
||||
51: 23 Load 25(as)
|
||||
HitObjectRecordHitWithIndexMotionNV 48(hObjHit) 51 33 33 33 44 44 32 10 45 17 47 14
|
||||
HitObjectRecordEmptyNV 52(hObjNop)
|
||||
HitObjectRecordMissNV 53(hObjMiss) 28 31 17 55 56
|
||||
HitObjectRecordMissMotionNV 53(hObjMiss) 28 31 17 55 56 57
|
||||
HitObjectExecuteShaderNV 48(hObjHit) 36(payload)
|
||||
59: 58(bool) HitObjectIsHitNV 22(hObj)
|
||||
SelectionMerge 61 None
|
||||
BranchConditional 59 60 67
|
||||
60: Label
|
||||
66: 65(ptr) AccessChain 64 16
|
||||
Store 66 10
|
||||
Branch 61
|
||||
67: Label
|
||||
68: 58(bool) HitObjectIsMissNV 22(hObj)
|
||||
SelectionMerge 70 None
|
||||
BranchConditional 68 69 72
|
||||
69: Label
|
||||
71: 65(ptr) AccessChain 64 16
|
||||
Store 71 17
|
||||
Branch 70
|
||||
72: Label
|
||||
73: 58(bool) HitObjectIsEmptyNV 22(hObj)
|
||||
SelectionMerge 75 None
|
||||
BranchConditional 73 74 75
|
||||
74: Label
|
||||
77: 65(ptr) AccessChain 64 16
|
||||
Store 77 76
|
||||
Branch 75
|
||||
75: Label
|
||||
Branch 70
|
||||
70: Label
|
||||
Branch 61
|
||||
61: Label
|
||||
80: 6(float) HitObjectGetRayTMinNV 48(hObjHit)
|
||||
Store 79(tmin) 80
|
||||
82: 6(float) HitObjectGetRayTMaxNV 48(hObjHit)
|
||||
Store 81(tmax) 82
|
||||
85: 29(fvec3) HitObjectGetWorldRayOriginNV 48(hObjHit)
|
||||
Store 84(orig) 85
|
||||
87: 29(fvec3) HitObjectGetWorldRayDirectionNV 48(hObjHit)
|
||||
Store 86(dir) 87
|
||||
89: 29(fvec3) HitObjectGetObjectRayOriginNV 48(hObjHit)
|
||||
Store 88(oorig) 89
|
||||
91: 29(fvec3) HitObjectGetObjectRayDirectionNV 48(hObjHit)
|
||||
Store 90(odir) 91
|
||||
95: 92 HitObjectGetObjectToWorldNV 48(hObjHit)
|
||||
Store 94(otw) 95
|
||||
97: 92 HitObjectGetWorldToObjectNV 48(hObjHit)
|
||||
Store 96(wto) 97
|
||||
100: 15(int) HitObjectGetInstanceCustomIndexNV 53(hObjMiss)
|
||||
Store 99(cid) 100
|
||||
102: 15(int) HitObjectGetInstanceIdNV 52(hObjNop)
|
||||
Store 101(iid) 102
|
||||
104: 15(int) HitObjectGetPrimitiveIndexNV 22(hObj)
|
||||
Store 103(pid) 104
|
||||
106: 15(int) HitObjectGetGeometryIndexNV 22(hObj)
|
||||
Store 105(gid) 106
|
||||
109: 27(int) HitObjectGetFrontFaceNV 22(hObj)
|
||||
Store 108(hkind) 109
|
||||
HitObjectGetAttributesNV 22(hObj) 9(attr)
|
||||
113: 110(ivec2) HitObjectGetShaderRecordBufferHandleNV 22(hObj)
|
||||
Store 112(handle) 113
|
||||
115: 27(int) HitObjectGetShaderBindingTableRecordIndexNV 22(hObj)
|
||||
Store 114(rid) 115
|
||||
ReorderThreadWithHintNV 116 116
|
||||
ReorderThreadWithHitObjectNV 48(hObjHit)
|
||||
ReorderThreadWithHitObjectNV 48(hObjHit) 116 44
|
||||
Return
|
||||
FunctionEnd
|
215
Test/baseResults/spv.nv.hitobject-allops.rmiss.out
Normal file
215
Test/baseResults/spv.nv.hitobject-allops.rmiss.out
Normal file
@ -0,0 +1,215 @@
|
||||
spv.nv.hitobject-allops.rmiss
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 116
|
||||
|
||||
Capability RayTracingKHR
|
||||
Capability ShaderInvocationReorderNV
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
Extension "SPV_NV_shader_invocation_reorder"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MissKHR 4 "main" 9 14 22 25 36 42 48 52 53 64
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
SourceExtension "GL_NV_ray_tracing_motion_blur"
|
||||
SourceExtension "GL_NV_shader_invocation_reorder"
|
||||
Name 4 "main"
|
||||
Name 9 "attr"
|
||||
Name 12 "hBlock"
|
||||
MemberName 12(hBlock) 0 "attrval"
|
||||
Name 14 ""
|
||||
Name 22 "hObj"
|
||||
Name 25 "as"
|
||||
Name 36 "payload"
|
||||
Name 40 "pBlock"
|
||||
MemberName 40(pBlock) 0 "val1"
|
||||
MemberName 40(pBlock) 1 "val2"
|
||||
Name 42 ""
|
||||
Name 48 "hObjHit"
|
||||
Name 52 "hObjNop"
|
||||
Name 53 "hObjMiss"
|
||||
Name 62 "block"
|
||||
MemberName 62(block) 0 "op"
|
||||
Name 64 ""
|
||||
Name 79 "tmin"
|
||||
Name 81 "tmax"
|
||||
Name 84 "orig"
|
||||
Name 86 "dir"
|
||||
Name 88 "oorig"
|
||||
Name 90 "odir"
|
||||
Name 94 "otw"
|
||||
Name 96 "wto"
|
||||
Name 99 "cid"
|
||||
Name 101 "iid"
|
||||
Name 103 "pid"
|
||||
Name 105 "gid"
|
||||
Name 108 "hkind"
|
||||
Name 112 "handle"
|
||||
Name 114 "rid"
|
||||
Decorate 12(hBlock) Block
|
||||
Decorate 25(as) DescriptorSet 0
|
||||
Decorate 25(as) Binding 0
|
||||
Decorate 40(pBlock) Block
|
||||
MemberDecorate 62(block) 0 Offset 0
|
||||
Decorate 62(block) Block
|
||||
Decorate 64 DescriptorSet 0
|
||||
Decorate 64 Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 2
|
||||
8: TypePointer HitObjectAttributeNV 7(fvec2)
|
||||
9(attr): 8(ptr) Variable HitObjectAttributeNV
|
||||
10: 6(float) Constant 1065353216
|
||||
11: 7(fvec2) ConstantComposite 10 10
|
||||
12(hBlock): TypeStruct 6(float)
|
||||
13: TypePointer HitObjectAttributeNV 12(hBlock)
|
||||
14: 13(ptr) Variable HitObjectAttributeNV
|
||||
15: TypeInt 32 1
|
||||
16: 15(int) Constant 0
|
||||
17: 6(float) Constant 1073741824
|
||||
18: TypePointer HitObjectAttributeNV 6(float)
|
||||
20: TypeHitObjectNV
|
||||
21: TypePointer Private 20
|
||||
22(hObj): 21(ptr) Variable Private
|
||||
23: TypeAccelerationStructureKHR
|
||||
24: TypePointer UniformConstant 23
|
||||
25(as): 24(ptr) Variable UniformConstant
|
||||
27: TypeInt 32 0
|
||||
28: 27(int) Constant 1
|
||||
29: TypeVector 6(float) 3
|
||||
30: 6(float) Constant 1056964608
|
||||
31: 29(fvec3) ConstantComposite 30 30 30
|
||||
32: 29(fvec3) ConstantComposite 10 10 10
|
||||
33: 15(int) Constant 1
|
||||
34: TypeVector 6(float) 4
|
||||
35: TypePointer RayPayloadKHR 34(fvec4)
|
||||
36(payload): 35(ptr) Variable RayPayloadKHR
|
||||
38: 6(float) Constant 1092616192
|
||||
39: 15(int) Constant 2
|
||||
40(pBlock): TypeStruct 7(fvec2) 7(fvec2)
|
||||
41: TypePointer RayPayloadKHR 40(pBlock)
|
||||
42: 41(ptr) Variable RayPayloadKHR
|
||||
44: 27(int) Constant 2
|
||||
45: 29(fvec3) ConstantComposite 17 17 17
|
||||
47: 6(float) Constant 1082130432
|
||||
48(hObjHit): 21(ptr) Variable Private
|
||||
50: 15(int) Constant 3
|
||||
52(hObjNop): 21(ptr) Variable Private
|
||||
53(hObjMiss): 21(ptr) Variable Private
|
||||
54: 6(float) Constant 1069547520
|
||||
55: 29(fvec3) ConstantComposite 54 54 54
|
||||
56: 6(float) Constant 1084227584
|
||||
57: 6(float) Constant 1090519040
|
||||
58: TypeBool
|
||||
62(block): TypeStruct 6(float)
|
||||
63: TypePointer StorageBuffer 62(block)
|
||||
64: 63(ptr) Variable StorageBuffer
|
||||
65: TypePointer StorageBuffer 6(float)
|
||||
76: 6(float) Constant 1077936128
|
||||
78: TypePointer Function 6(float)
|
||||
83: TypePointer Function 29(fvec3)
|
||||
92: TypeMatrix 29(fvec3) 4
|
||||
93: TypePointer Function 92
|
||||
98: TypePointer Function 15(int)
|
||||
107: TypePointer Function 27(int)
|
||||
110: TypeVector 27(int) 2
|
||||
111: TypePointer Function 110(ivec2)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
79(tmin): 78(ptr) Variable Function
|
||||
81(tmax): 78(ptr) Variable Function
|
||||
84(orig): 83(ptr) Variable Function
|
||||
86(dir): 83(ptr) Variable Function
|
||||
88(oorig): 83(ptr) Variable Function
|
||||
90(odir): 83(ptr) Variable Function
|
||||
94(otw): 93(ptr) Variable Function
|
||||
96(wto): 93(ptr) Variable Function
|
||||
99(cid): 98(ptr) Variable Function
|
||||
101(iid): 98(ptr) Variable Function
|
||||
103(pid): 98(ptr) Variable Function
|
||||
105(gid): 98(ptr) Variable Function
|
||||
108(hkind): 107(ptr) Variable Function
|
||||
112(handle): 111(ptr) Variable Function
|
||||
114(rid): 107(ptr) Variable Function
|
||||
Store 9(attr) 11
|
||||
19: 18(ptr) AccessChain 14 16
|
||||
Store 19 17
|
||||
26: 23 Load 25(as)
|
||||
HitObjectTraceRayNV 22(hObj) 26 28 28 28 28 28 31 30 32 10 36(payload)
|
||||
37: 23 Load 25(as)
|
||||
HitObjectTraceRayMotionNV 22(hObj) 37 28 28 28 28 28 31 30 32 10 38 42
|
||||
43: 23 Load 25(as)
|
||||
HitObjectRecordHitNV 22(hObj) 43 33 33 33 44 44 44 32 10 45 17 9(attr)
|
||||
46: 23 Load 25(as)
|
||||
HitObjectRecordHitMotionNV 22(hObj) 46 33 33 33 44 44 44 32 10 45 17 47 9(attr)
|
||||
49: 23 Load 25(as)
|
||||
HitObjectRecordHitWithIndexNV 48(hObjHit) 49 33 33 33 44 44 32 10 45 17 14
|
||||
51: 23 Load 25(as)
|
||||
HitObjectRecordHitWithIndexMotionNV 48(hObjHit) 51 33 33 33 44 44 32 10 45 17 47 14
|
||||
HitObjectRecordEmptyNV 52(hObjNop)
|
||||
HitObjectRecordMissNV 53(hObjMiss) 28 31 17 55 56
|
||||
HitObjectRecordMissMotionNV 53(hObjMiss) 28 31 17 55 56 57
|
||||
HitObjectExecuteShaderNV 48(hObjHit) 42
|
||||
59: 58(bool) HitObjectIsHitNV 22(hObj)
|
||||
SelectionMerge 61 None
|
||||
BranchConditional 59 60 67
|
||||
60: Label
|
||||
66: 65(ptr) AccessChain 64 16
|
||||
Store 66 10
|
||||
Branch 61
|
||||
67: Label
|
||||
68: 58(bool) HitObjectIsMissNV 22(hObj)
|
||||
SelectionMerge 70 None
|
||||
BranchConditional 68 69 72
|
||||
69: Label
|
||||
71: 65(ptr) AccessChain 64 16
|
||||
Store 71 17
|
||||
Branch 70
|
||||
72: Label
|
||||
73: 58(bool) HitObjectIsEmptyNV 22(hObj)
|
||||
SelectionMerge 75 None
|
||||
BranchConditional 73 74 75
|
||||
74: Label
|
||||
77: 65(ptr) AccessChain 64 16
|
||||
Store 77 76
|
||||
Branch 75
|
||||
75: Label
|
||||
Branch 70
|
||||
70: Label
|
||||
Branch 61
|
||||
61: Label
|
||||
80: 6(float) HitObjectGetRayTMinNV 48(hObjHit)
|
||||
Store 79(tmin) 80
|
||||
82: 6(float) HitObjectGetRayTMaxNV 48(hObjHit)
|
||||
Store 81(tmax) 82
|
||||
85: 29(fvec3) HitObjectGetWorldRayOriginNV 48(hObjHit)
|
||||
Store 84(orig) 85
|
||||
87: 29(fvec3) HitObjectGetWorldRayDirectionNV 48(hObjHit)
|
||||
Store 86(dir) 87
|
||||
89: 29(fvec3) HitObjectGetObjectRayOriginNV 48(hObjHit)
|
||||
Store 88(oorig) 89
|
||||
91: 29(fvec3) HitObjectGetObjectRayDirectionNV 48(hObjHit)
|
||||
Store 90(odir) 91
|
||||
95: 92 HitObjectGetObjectToWorldNV 48(hObjHit)
|
||||
Store 94(otw) 95
|
||||
97: 92 HitObjectGetWorldToObjectNV 48(hObjHit)
|
||||
Store 96(wto) 97
|
||||
100: 15(int) HitObjectGetInstanceCustomIndexNV 53(hObjMiss)
|
||||
Store 99(cid) 100
|
||||
102: 15(int) HitObjectGetInstanceIdNV 52(hObjNop)
|
||||
Store 101(iid) 102
|
||||
104: 15(int) HitObjectGetPrimitiveIndexNV 22(hObj)
|
||||
Store 103(pid) 104
|
||||
106: 15(int) HitObjectGetGeometryIndexNV 22(hObj)
|
||||
Store 105(gid) 106
|
||||
109: 27(int) HitObjectGetFrontFaceNV 22(hObj)
|
||||
Store 108(hkind) 109
|
||||
HitObjectGetAttributesNV 22(hObj) 9(attr)
|
||||
113: 110(ivec2) HitObjectGetShaderRecordBufferHandleNV 22(hObj)
|
||||
Store 112(handle) 113
|
||||
115: 27(int) HitObjectGetShaderBindingTableRecordIndexNV 22(hObj)
|
||||
Store 114(rid) 115
|
||||
Return
|
||||
FunctionEnd
|
55
Test/spv.nv.hitobject-allops.rchit
Normal file
55
Test/spv.nv.hitobject-allops.rchit
Normal file
@ -0,0 +1,55 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
#extension GL_NV_shader_invocation_reorder : enable
|
||||
#extension GL_NV_ray_tracing_motion_blur : enable
|
||||
layout(location = 1) rayPayloadEXT vec4 payload;
|
||||
layout(location = 2) rayPayloadEXT pBlock { vec2 val1; vec2 val2; };
|
||||
layout(location = 2) hitObjectAttributeNV vec2 attr;
|
||||
layout(location = 3) hitObjectAttributeNV hBlock { float attrval;};
|
||||
layout(binding = 0) uniform accelerationStructureEXT as;
|
||||
layout(binding = 1) buffer block {
|
||||
float op;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
hitObjectNV hObj;
|
||||
hitObjectNV hObjHit, hObjMiss, hObjNop;
|
||||
attr = vec2(1.0);
|
||||
attrval = 2.0;
|
||||
hitObjectTraceRayNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 1);
|
||||
hitObjectTraceRayMotionNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 10.0, 2);
|
||||
hitObjectRecordHitNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 2);
|
||||
hitObjectRecordHitMotionNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 2);
|
||||
hitObjectRecordHitWithIndexNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 3);
|
||||
hitObjectRecordHitWithIndexMotionNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 3);
|
||||
hitObjectRecordEmptyNV(hObjNop);
|
||||
hitObjectRecordMissNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0);
|
||||
hitObjectRecordMissMotionNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0, 8.0f);
|
||||
hitObjectExecuteShaderNV(hObjHit, 2);
|
||||
if (hitObjectIsHitNV(hObj)) {
|
||||
op = 1.0f;
|
||||
} else if (hitObjectIsMissNV(hObj)) {
|
||||
op = 2.0f;
|
||||
} else if (hitObjectIsEmptyNV(hObj)) {
|
||||
op = 3.0f;
|
||||
}
|
||||
|
||||
|
||||
float tmin = hitObjectGetRayTMinNV(hObjHit);
|
||||
float tmax = hitObjectGetRayTMaxNV(hObjHit);
|
||||
vec3 orig = hitObjectGetWorldRayOriginNV(hObjHit);
|
||||
vec3 dir = hitObjectGetWorldRayDirectionNV(hObjHit);
|
||||
vec3 oorig = hitObjectGetObjectRayOriginNV(hObjHit);
|
||||
vec3 odir = hitObjectGetObjectRayDirectionNV(hObjHit);
|
||||
mat4x3 otw = hitObjectGetObjectToWorldNV(hObjHit);
|
||||
mat4x3 wto = hitObjectGetWorldToObjectNV(hObjHit);
|
||||
int cid = hitObjectGetInstanceCustomIndexNV(hObjMiss);
|
||||
int iid = hitObjectGetInstanceIdNV(hObjNop);
|
||||
int pid = hitObjectGetPrimitiveIndexNV(hObj);
|
||||
int gid = hitObjectGetGeometryIndexNV(hObj);
|
||||
uint hkind = hitObjectGetHitKindNV(hObj);
|
||||
hitObjectGetAttributesNV(hObj, 2);
|
||||
uvec2 handle = hitObjectGetShaderRecordBufferHandleNV(hObj);
|
||||
uint rid = hitObjectGetShaderBindingTableRecordIndexNV(hObj);
|
||||
|
||||
}
|
61
Test/spv.nv.hitobject-allops.rgen
Normal file
61
Test/spv.nv.hitobject-allops.rgen
Normal file
@ -0,0 +1,61 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
#extension GL_NV_shader_invocation_reorder : enable
|
||||
#extension GL_NV_ray_tracing_motion_blur : enable
|
||||
layout(location = 1) rayPayloadEXT vec4 payload;
|
||||
layout(location = 2) rayPayloadEXT pBlock { vec2 val1; vec2 val2; };
|
||||
layout(location = 2) hitObjectAttributeNV vec2 attr;
|
||||
layout(location = 3) hitObjectAttributeNV hBlock { float attrval;};
|
||||
layout(binding = 0) uniform accelerationStructureEXT as;
|
||||
layout(binding = 1) buffer block {
|
||||
float op;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
hitObjectNV hObj;
|
||||
hitObjectNV hObjHit, hObjMiss, hObjNop;
|
||||
attr = vec2(1.0);
|
||||
attrval = 2.0;
|
||||
hitObjectTraceRayNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 1);
|
||||
hitObjectTraceRayMotionNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 10.0, 2);
|
||||
hitObjectRecordHitNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 2);
|
||||
hitObjectRecordHitMotionNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 2);
|
||||
hitObjectRecordHitWithIndexNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 3);
|
||||
hitObjectRecordHitWithIndexMotionNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 3);
|
||||
hitObjectRecordEmptyNV(hObjNop);
|
||||
hitObjectRecordMissNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0);
|
||||
hitObjectRecordMissMotionNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0, 8.0f);
|
||||
hitObjectExecuteShaderNV(hObjHit, 1);
|
||||
if (hitObjectIsHitNV(hObj)) {
|
||||
op = 1.0f;
|
||||
} else if (hitObjectIsMissNV(hObj)) {
|
||||
op = 2.0f;
|
||||
} else if (hitObjectIsEmptyNV(hObj)) {
|
||||
op = 3.0f;
|
||||
}
|
||||
|
||||
|
||||
float tmin = hitObjectGetRayTMinNV(hObjHit);
|
||||
float tmax = hitObjectGetRayTMaxNV(hObjHit);
|
||||
vec3 orig = hitObjectGetWorldRayOriginNV(hObjHit);
|
||||
vec3 dir = hitObjectGetWorldRayDirectionNV(hObjHit);
|
||||
vec3 oorig = hitObjectGetObjectRayOriginNV(hObjHit);
|
||||
vec3 odir = hitObjectGetObjectRayDirectionNV(hObjHit);
|
||||
mat4x3 otw = hitObjectGetObjectToWorldNV(hObjHit);
|
||||
mat4x3 wto = hitObjectGetWorldToObjectNV(hObjHit);
|
||||
int cid = hitObjectGetInstanceCustomIndexNV(hObjMiss);
|
||||
int iid = hitObjectGetInstanceIdNV(hObjNop);
|
||||
int pid = hitObjectGetPrimitiveIndexNV(hObj);
|
||||
int gid = hitObjectGetGeometryIndexNV(hObj);
|
||||
uint hkind = hitObjectGetHitKindNV(hObj);
|
||||
hitObjectGetAttributesNV(hObj, 2);
|
||||
uvec2 handle = hitObjectGetShaderRecordBufferHandleNV(hObj);
|
||||
uint rid = hitObjectGetShaderBindingTableRecordIndexNV(hObj);
|
||||
reorderThreadNV(4,4);
|
||||
reorderThreadNV(hObjHit);
|
||||
reorderThreadNV(hObjHit, 4, 2);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
58
Test/spv.nv.hitobject-allops.rmiss
Normal file
58
Test/spv.nv.hitobject-allops.rmiss
Normal file
@ -0,0 +1,58 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
#extension GL_NV_shader_invocation_reorder : enable
|
||||
#extension GL_NV_ray_tracing_motion_blur : enable
|
||||
layout(location = 1) rayPayloadEXT vec4 payload;
|
||||
layout(location = 2) rayPayloadEXT pBlock { vec2 val1; vec2 val2; };
|
||||
layout(location = 2) hitObjectAttributeNV vec2 attr;
|
||||
layout(location = 3) hitObjectAttributeNV hBlock { float attrval;};
|
||||
layout(binding = 0) uniform accelerationStructureEXT as;
|
||||
layout(binding = 1) buffer block {
|
||||
float op;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
hitObjectNV hObj;
|
||||
hitObjectNV hObjHit, hObjMiss, hObjNop;
|
||||
attr = vec2(1.0);
|
||||
attrval = 2.0;
|
||||
hitObjectTraceRayNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 1);
|
||||
hitObjectTraceRayMotionNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 10.0, 2);
|
||||
hitObjectRecordHitNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 2);
|
||||
hitObjectRecordHitMotionNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 2);
|
||||
hitObjectRecordHitWithIndexNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 3);
|
||||
hitObjectRecordHitWithIndexMotionNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 3);
|
||||
hitObjectRecordEmptyNV(hObjNop);
|
||||
hitObjectRecordMissNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0);
|
||||
hitObjectRecordMissMotionNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0, 8.0f);
|
||||
hitObjectExecuteShaderNV(hObjHit, 2);
|
||||
if (hitObjectIsHitNV(hObj)) {
|
||||
op = 1.0f;
|
||||
} else if (hitObjectIsMissNV(hObj)) {
|
||||
op = 2.0f;
|
||||
} else if (hitObjectIsEmptyNV(hObj)) {
|
||||
op = 3.0f;
|
||||
}
|
||||
|
||||
|
||||
float tmin = hitObjectGetRayTMinNV(hObjHit);
|
||||
float tmax = hitObjectGetRayTMaxNV(hObjHit);
|
||||
vec3 orig = hitObjectGetWorldRayOriginNV(hObjHit);
|
||||
vec3 dir = hitObjectGetWorldRayDirectionNV(hObjHit);
|
||||
vec3 oorig = hitObjectGetObjectRayOriginNV(hObjHit);
|
||||
vec3 odir = hitObjectGetObjectRayDirectionNV(hObjHit);
|
||||
mat4x3 otw = hitObjectGetObjectToWorldNV(hObjHit);
|
||||
mat4x3 wto = hitObjectGetWorldToObjectNV(hObjHit);
|
||||
int cid = hitObjectGetInstanceCustomIndexNV(hObjMiss);
|
||||
int iid = hitObjectGetInstanceIdNV(hObjNop);
|
||||
int pid = hitObjectGetPrimitiveIndexNV(hObj);
|
||||
int gid = hitObjectGetGeometryIndexNV(hObj);
|
||||
uint hkind = hitObjectGetHitKindNV(hObj);
|
||||
hitObjectGetAttributesNV(hObj, 2);
|
||||
uvec2 handle = hitObjectGetShaderRecordBufferHandleNV(hObj);
|
||||
uint rid = hitObjectGetShaderBindingTableRecordIndexNV(hObj);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -65,6 +65,7 @@ enum TBasicType {
|
||||
EbtAccStruct,
|
||||
EbtReference,
|
||||
EbtRayQuery,
|
||||
EbtHitObjectNV,
|
||||
#ifndef GLSLANG_WEB
|
||||
// SPIR-V type defined by spirv_type
|
||||
EbtSpirvType,
|
||||
@ -104,6 +105,7 @@ enum TStorageQualifier {
|
||||
EvqHitAttr,
|
||||
EvqCallableData,
|
||||
EvqCallableDataIn,
|
||||
EvqHitObjectAttrNV,
|
||||
|
||||
EvqtaskPayloadSharedEXT,
|
||||
|
||||
@ -375,6 +377,7 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
|
||||
case EvqCallableData: return "callableDataNV"; break;
|
||||
case EvqCallableDataIn: return "callableDataInNV"; break;
|
||||
case EvqtaskPayloadSharedEXT: return "taskPayloadSharedEXT"; break;
|
||||
case EvqHitObjectAttrNV:return "hitObjectAttributeNV"; break;
|
||||
default: return "unknown qualifier";
|
||||
}
|
||||
}
|
||||
|
@ -869,6 +869,9 @@ public:
|
||||
bool isAnyCallable() const {
|
||||
return storage == EvqCallableData || storage == EvqCallableDataIn;
|
||||
}
|
||||
bool isHitObjectAttrNV() const {
|
||||
return storage == EvqHitObjectAttrNV;
|
||||
}
|
||||
|
||||
// True if this type of IO is supposed to be arrayed with extra level for per-vertex data
|
||||
bool isArrayedIo(EShLanguage language) const
|
||||
@ -904,6 +907,7 @@ public:
|
||||
// -2048 as the default value indicating layoutSecondaryViewportRelative is not set
|
||||
layoutSecondaryViewportRelativeOffset = -2048;
|
||||
layoutShaderRecord = false;
|
||||
layoutHitObjectShaderRecordNV = false;
|
||||
layoutBindlessSampler = false;
|
||||
layoutBindlessImage = false;
|
||||
layoutBufferReferenceAlign = layoutBufferReferenceAlignEnd;
|
||||
@ -1005,6 +1009,7 @@ public:
|
||||
bool layoutViewportRelative;
|
||||
int layoutSecondaryViewportRelativeOffset;
|
||||
bool layoutShaderRecord;
|
||||
bool layoutHitObjectShaderRecordNV;
|
||||
|
||||
// GL_EXT_spirv_intrinsics
|
||||
int spirvStorageClass;
|
||||
@ -1134,6 +1139,7 @@ public:
|
||||
TLayoutFormat getFormat() const { return layoutFormat; }
|
||||
bool isPushConstant() const { return layoutPushConstant; }
|
||||
bool isShaderRecord() const { return layoutShaderRecord; }
|
||||
bool hasHitObjectShaderRecordNV() const { return layoutHitObjectShaderRecordNV; }
|
||||
bool hasBufferReference() const { return layoutBufferReference; }
|
||||
bool hasBufferReferenceAlign() const
|
||||
{
|
||||
@ -1914,6 +1920,7 @@ public:
|
||||
virtual bool isOpaque() const { return basicType == EbtSampler
|
||||
#ifndef GLSLANG_WEB
|
||||
|| basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery
|
||||
|| basicType == EbtHitObjectNV
|
||||
#endif
|
||||
; }
|
||||
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
|
||||
@ -2314,12 +2321,17 @@ public:
|
||||
appendStr(" layoutSecondaryViewportRelativeOffset=");
|
||||
appendInt(qualifier.layoutSecondaryViewportRelativeOffset);
|
||||
}
|
||||
|
||||
if (qualifier.layoutShaderRecord)
|
||||
appendStr(" shaderRecordNV");
|
||||
if (qualifier.layoutHitObjectShaderRecordNV)
|
||||
appendStr(" hitobjectshaderrecordnv");
|
||||
|
||||
if (qualifier.layoutBindlessSampler)
|
||||
appendStr(" layoutBindlessSampler");
|
||||
if (qualifier.layoutBindlessImage)
|
||||
appendStr(" layoutBindlessImage");
|
||||
|
||||
appendStr(")");
|
||||
}
|
||||
}
|
||||
|
@ -969,6 +969,41 @@ enum TOperator {
|
||||
EOpRayQueryGetIntersectionWorldToObject,
|
||||
|
||||
//
|
||||
// GL_NV_shader_invocation_reorder
|
||||
//
|
||||
|
||||
EOpHitObjectTraceRayNV,
|
||||
EOpHitObjectTraceRayMotionNV,
|
||||
EOpHitObjectRecordHitNV,
|
||||
EOpHitObjectRecordHitMotionNV,
|
||||
EOpHitObjectRecordHitWithIndexNV,
|
||||
EOpHitObjectRecordHitWithIndexMotionNV,
|
||||
EOpHitObjectRecordMissNV,
|
||||
EOpHitObjectRecordMissMotionNV,
|
||||
EOpHitObjectRecordEmptyNV,
|
||||
EOpHitObjectExecuteShaderNV,
|
||||
EOpHitObjectIsEmptyNV,
|
||||
EOpHitObjectIsMissNV,
|
||||
EOpHitObjectIsHitNV,
|
||||
EOpHitObjectGetRayTMinNV,
|
||||
EOpHitObjectGetRayTMaxNV,
|
||||
EOpHitObjectGetObjectRayOriginNV,
|
||||
EOpHitObjectGetObjectRayDirectionNV,
|
||||
EOpHitObjectGetWorldRayOriginNV,
|
||||
EOpHitObjectGetWorldRayDirectionNV,
|
||||
EOpHitObjectGetWorldToObjectNV,
|
||||
EOpHitObjectGetObjectToWorldNV,
|
||||
EOpHitObjectGetInstanceCustomIndexNV,
|
||||
EOpHitObjectGetInstanceIdNV,
|
||||
EOpHitObjectGetGeometryIndexNV,
|
||||
EOpHitObjectGetPrimitiveIndexNV,
|
||||
EOpHitObjectGetHitKindNV,
|
||||
EOpHitObjectGetShaderBindingTableRecordIndexNV,
|
||||
EOpHitObjectGetShaderRecordBufferHandleNV,
|
||||
EOpHitObjectGetAttributesNV,
|
||||
EOpHitObjectGetCurrentTimeNV,
|
||||
EOpReorderThreadNV,
|
||||
|
||||
// HLSL operations
|
||||
//
|
||||
|
||||
|
@ -4550,7 +4550,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
"\n");
|
||||
}
|
||||
|
||||
// Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query
|
||||
// Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query/
|
||||
// GL_NV_shader_invocation_reorder
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);"
|
||||
"void rayQueryTerminateEXT(rayQueryEXT);"
|
||||
@ -4583,6 +4584,39 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void executeCallableNV(uint, int);"
|
||||
"void executeCallableEXT(uint, int);"
|
||||
"void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordHitWithIndexNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordMissNV(hitObjectNV,uint,vec3,float,vec3,float);"
|
||||
"void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);"
|
||||
"void hitObjectRecordEmptyNV(hitObjectNV);"
|
||||
"void hitObjectExecuteShaderNV(hitObjectNV,int);"
|
||||
"bool hitObjectIsEmptyNV(hitObjectNV);"
|
||||
"bool hitObjectIsMissNV(hitObjectNV);"
|
||||
"bool hitObjectIsHitNV(hitObjectNV);"
|
||||
"float hitObjectGetRayTMinNV(hitObjectNV);"
|
||||
"float hitObjectGetRayTMaxNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);"
|
||||
"mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);"
|
||||
"mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);"
|
||||
"int hitObjectGetInstanceCustomIndexNV(hitObjectNV);"
|
||||
"int hitObjectGetInstanceIdNV(hitObjectNV);"
|
||||
"int hitObjectGetGeometryIndexNV(hitObjectNV);"
|
||||
"int hitObjectGetPrimitiveIndexNV(hitObjectNV);"
|
||||
"uint hitObjectGetHitKindNV(hitObjectNV);"
|
||||
"void hitObjectGetAttributesNV(hitObjectNV,int);"
|
||||
"float hitObjectGetCurrentTimeNV(hitObjectNV);"
|
||||
"uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);"
|
||||
"uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);"
|
||||
"void reorderThreadNV(uint, uint);"
|
||||
"void reorderThreadNV(hitObjectNV);"
|
||||
"void reorderThreadNV(hitObjectNV, uint, uint);"
|
||||
"\n");
|
||||
stageBuiltins[EShLangIntersect].append(
|
||||
"bool reportIntersectionNV(float, uint);"
|
||||
@ -4598,6 +4632,36 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void executeCallableNV(uint, int);"
|
||||
"void executeCallableEXT(uint, int);"
|
||||
"void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordHitWithIndexNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordMissNV(hitObjectNV, uint, vec3, float, vec3, float);"
|
||||
"void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);"
|
||||
"void hitObjectRecordEmptyNV(hitObjectNV);"
|
||||
"void hitObjectExecuteShaderNV(hitObjectNV, int);"
|
||||
"bool hitObjectIsEmptyNV(hitObjectNV);"
|
||||
"bool hitObjectIsMissNV(hitObjectNV);"
|
||||
"bool hitObjectIsHitNV(hitObjectNV);"
|
||||
"float hitObjectGetRayTMinNV(hitObjectNV);"
|
||||
"float hitObjectGetRayTMaxNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);"
|
||||
"mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);"
|
||||
"mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);"
|
||||
"int hitObjectGetInstanceCustomIndexNV(hitObjectNV);"
|
||||
"int hitObjectGetInstanceIdNV(hitObjectNV);"
|
||||
"int hitObjectGetGeometryIndexNV(hitObjectNV);"
|
||||
"int hitObjectGetPrimitiveIndexNV(hitObjectNV);"
|
||||
"uint hitObjectGetHitKindNV(hitObjectNV);"
|
||||
"void hitObjectGetAttributesNV(hitObjectNV,int);"
|
||||
"float hitObjectGetCurrentTimeNV(hitObjectNV);"
|
||||
"uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);"
|
||||
"uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);"
|
||||
"\n");
|
||||
stageBuiltins[EShLangMiss].append(
|
||||
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
@ -4605,6 +4669,36 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void executeCallableNV(uint, int);"
|
||||
"void executeCallableEXT(uint, int);"
|
||||
"void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordHitWithIndexNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordMissNV(hitObjectNV, uint, vec3, float, vec3, float);"
|
||||
"void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);"
|
||||
"void hitObjectRecordEmptyNV(hitObjectNV);"
|
||||
"void hitObjectExecuteShaderNV(hitObjectNV, int);"
|
||||
"bool hitObjectIsEmptyNV(hitObjectNV);"
|
||||
"bool hitObjectIsMissNV(hitObjectNV);"
|
||||
"bool hitObjectIsHitNV(hitObjectNV);"
|
||||
"float hitObjectGetRayTMinNV(hitObjectNV);"
|
||||
"float hitObjectGetRayTMaxNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);"
|
||||
"mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);"
|
||||
"mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);"
|
||||
"int hitObjectGetInstanceCustomIndexNV(hitObjectNV);"
|
||||
"int hitObjectGetInstanceIdNV(hitObjectNV);"
|
||||
"int hitObjectGetGeometryIndexNV(hitObjectNV);"
|
||||
"int hitObjectGetPrimitiveIndexNV(hitObjectNV);"
|
||||
"uint hitObjectGetHitKindNV(hitObjectNV);"
|
||||
"void hitObjectGetAttributesNV(hitObjectNV,int);"
|
||||
"float hitObjectGetCurrentTimeNV(hitObjectNV);"
|
||||
"uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);"
|
||||
"uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);"
|
||||
"\n");
|
||||
stageBuiltins[EShLangCallable].append(
|
||||
"void executeCallableNV(uint, int);"
|
||||
@ -8852,6 +8946,38 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
symbolTable.setFunctionExtensions("executeCallableNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setFunctionExtensions("executeCallableEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
|
||||
symbolTable.setFunctionExtensions("hitObjectTraceRayNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectTraceRayMotionNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordHitNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordHitMotionNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordHitWithIndexNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordHitWithIndexMotionNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordMissNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordMissMotionNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordEmptyNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectExecuteShaderNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectIsEmptyNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectIsMissNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectIsHitNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetRayTMinNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetRayTMaxNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetObjectRayOriginNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetObjectRayDirectionNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetWorldRayOriginNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetWorldRayDirectionNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetWorldToObjectNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetbjectToWorldNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetInstanceCustomIndexNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetInstanceIdNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetGeometryIndexNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetPrimitiveIndexNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetHitKindNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetAttributesNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetCurrentTimeNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetShaderBindingTableRecordIndexNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetShaderRecordBufferHandleNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("reorderThreadNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
|
||||
|
||||
BuiltInVariable("gl_LaunchIDNV", EbvLaunchId, symbolTable);
|
||||
BuiltInVariable("gl_LaunchIDEXT", EbvLaunchId, symbolTable);
|
||||
@ -9855,6 +9981,38 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
symbolTable.relateToOperator("traceRayEXT", EOpTraceKHR);
|
||||
symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV);
|
||||
symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR);
|
||||
|
||||
symbolTable.relateToOperator("hitObjectTraceRayNV", EOpHitObjectTraceRayNV);
|
||||
symbolTable.relateToOperator("hitObjectTraceRayMotionNV", EOpHitObjectTraceRayMotionNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordHitNV", EOpHitObjectRecordHitNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordHitMotionNV", EOpHitObjectRecordHitMotionNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordHitWithIndexNV", EOpHitObjectRecordHitWithIndexNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordHitWithIndexMotionNV", EOpHitObjectRecordHitWithIndexMotionNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordMissNV", EOpHitObjectRecordMissNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordMissMotionNV", EOpHitObjectRecordMissMotionNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordEmptyNV", EOpHitObjectRecordEmptyNV);
|
||||
symbolTable.relateToOperator("hitObjectExecuteShaderNV", EOpHitObjectExecuteShaderNV);
|
||||
symbolTable.relateToOperator("hitObjectIsEmptyNV", EOpHitObjectIsEmptyNV);
|
||||
symbolTable.relateToOperator("hitObjectIsMissNV", EOpHitObjectIsMissNV);
|
||||
symbolTable.relateToOperator("hitObjectIsHitNV", EOpHitObjectIsHitNV);
|
||||
symbolTable.relateToOperator("hitObjectGetRayTMinNV", EOpHitObjectGetRayTMinNV);
|
||||
symbolTable.relateToOperator("hitObjectGetRayTMaxNV", EOpHitObjectGetRayTMaxNV);
|
||||
symbolTable.relateToOperator("hitObjectGetObjectRayOriginNV", EOpHitObjectGetObjectRayOriginNV);
|
||||
symbolTable.relateToOperator("hitObjectGetObjectRayDirectionNV", EOpHitObjectGetObjectRayDirectionNV);
|
||||
symbolTable.relateToOperator("hitObjectGetWorldRayOriginNV", EOpHitObjectGetWorldRayOriginNV);
|
||||
symbolTable.relateToOperator("hitObjectGetWorldRayDirectionNV", EOpHitObjectGetWorldRayDirectionNV);
|
||||
symbolTable.relateToOperator("hitObjectGetWorldToObjectNV", EOpHitObjectGetWorldToObjectNV);
|
||||
symbolTable.relateToOperator("hitObjectGetObjectToWorldNV", EOpHitObjectGetObjectToWorldNV);
|
||||
symbolTable.relateToOperator("hitObjectGetInstanceCustomIndexNV", EOpHitObjectGetInstanceCustomIndexNV);
|
||||
symbolTable.relateToOperator("hitObjectGetInstanceIdNV", EOpHitObjectGetInstanceIdNV);
|
||||
symbolTable.relateToOperator("hitObjectGetGeometryIndexNV", EOpHitObjectGetGeometryIndexNV);
|
||||
symbolTable.relateToOperator("hitObjectGetPrimitiveIndexNV", EOpHitObjectGetPrimitiveIndexNV);
|
||||
symbolTable.relateToOperator("hitObjectGetHitKindNV", EOpHitObjectGetHitKindNV);
|
||||
symbolTable.relateToOperator("hitObjectGetAttributesNV", EOpHitObjectGetAttributesNV);
|
||||
symbolTable.relateToOperator("hitObjectGetCurrentTimeNV", EOpHitObjectGetCurrentTimeNV);
|
||||
symbolTable.relateToOperator("hitObjectGetShaderBindingTableRecordIndexNV", EOpHitObjectGetShaderBindingTableRecordIndexNV);
|
||||
symbolTable.relateToOperator("hitObjectGetShaderRecordBufferHandleNV", EOpHitObjectGetShaderRecordBufferHandleNV);
|
||||
symbolTable.relateToOperator("reorderThreadNV", EOpReorderThreadNV);
|
||||
}
|
||||
break;
|
||||
case EShLangIntersect:
|
||||
|
@ -175,6 +175,9 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
|
||||
case EbtRayQuery:
|
||||
message = "can't modify rayQueryEXT";
|
||||
break;
|
||||
case EbtHitObjectNV:
|
||||
message = "can't modify hitObjectNV";
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
|
@ -2368,6 +2368,79 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
||||
}
|
||||
break;
|
||||
|
||||
case EOpHitObjectTraceRayNV:
|
||||
if (!(*argp)[11]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "payload number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[11]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0)
|
||||
error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectTraceRayMotionNV:
|
||||
if (!(*argp)[12]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "payload number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0)
|
||||
error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectExecuteShaderNV:
|
||||
if (!(*argp)[1]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "payload number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0)
|
||||
error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectRecordHitNV:
|
||||
if (!(*argp)[12]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "hitobjectattribute number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0)
|
||||
error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectRecordHitMotionNV:
|
||||
if (!(*argp)[13]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "hitobjectattribute number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[13]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0)
|
||||
error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectRecordHitWithIndexNV:
|
||||
if (!(*argp)[11]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "hitobjectattribute number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[11]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0)
|
||||
error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectRecordHitWithIndexMotionNV:
|
||||
if (!(*argp)[12]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "hitobjectattribute number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0)
|
||||
error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectGetAttributesNV:
|
||||
if (!(*argp)[1]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "hitobjectattribute number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0)
|
||||
error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
|
||||
case EOpRayQueryGetIntersectionType:
|
||||
case EOpRayQueryGetIntersectionT:
|
||||
case EOpRayQueryGetIntersectionInstanceCustomIndex:
|
||||
@ -4581,7 +4654,7 @@ void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermType
|
||||
|
||||
// check for additional things allowed by GL_EXT_nonuniform_qualifier
|
||||
if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStruct || base.getBasicType() == EbtRayQuery ||
|
||||
(base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer()))
|
||||
base.getBasicType() == EbtHitObjectNV || (base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer()))
|
||||
requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index");
|
||||
else
|
||||
error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable");
|
||||
@ -5761,6 +5834,10 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
||||
}
|
||||
publicType.qualifier.layoutShaderRecord = true;
|
||||
return;
|
||||
} else if (id == "hitobjectshaderrecordnv") {
|
||||
requireExtensions(loc, 1, &E_GL_NV_shader_invocation_reorder, "hitobject shader record NV");
|
||||
publicType.qualifier.layoutHitObjectShaderRecordNV = true;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
@ -6232,6 +6309,8 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie
|
||||
dst.pervertexNV = true;
|
||||
if (src.pervertexEXT)
|
||||
dst.pervertexEXT = true;
|
||||
if (src.layoutHitObjectShaderRecordNV)
|
||||
dst.layoutHitObjectShaderRecordNV = true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -6389,6 +6468,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
||||
case EvqHitAttr:
|
||||
case EvqCallableData:
|
||||
case EvqCallableDataIn:
|
||||
case EvqHitObjectAttrNV:
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@ -7344,7 +7424,10 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
|
||||
if (initializer) {
|
||||
if (type.getBasicType() == EbtRayQuery) {
|
||||
error(loc, "ray queries can only be initialized by using the rayQueryInitializeEXT intrinsic:", "=", identifier.c_str());
|
||||
} else if (type.getBasicType() == EbtHitObjectNV) {
|
||||
error(loc, "hit objects cannot be initialized using initializers", "=", identifier.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (type.isCoopMat()) {
|
||||
@ -8771,6 +8854,10 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
|
||||
profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "callableDataInNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV block");
|
||||
break;
|
||||
case EvqHitObjectAttrNV:
|
||||
profileRequires(loc, ~EEsProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangMissMask), "hitObjectAttributeNV block");
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
error(loc, "only uniform, buffer, in, or out blocks are supported", blockName->c_str(), "");
|
||||
|
@ -765,6 +765,9 @@ void TScanContext::fillInKeywordMap()
|
||||
(*KeywordMap)["icoopmatNV"] = ICOOPMATNV;
|
||||
(*KeywordMap)["ucoopmatNV"] = UCOOPMATNV;
|
||||
|
||||
(*KeywordMap)["hitObjectNV"] = HITOBJECTNV;
|
||||
(*KeywordMap)["hitObjectAttributeNV"] = HITOBJECTATTRNV;
|
||||
|
||||
ReservedSet = new std::unordered_set<const char*, str_hash, str_eq>;
|
||||
|
||||
ReservedSet->insert("common");
|
||||
@ -1789,6 +1792,20 @@ int TScanContext::tokenizeIdentifier()
|
||||
parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
|
||||
case HITOBJECTNV:
|
||||
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||
(!parseContext.isEsProfile() && parseContext.version >= 460
|
||||
&& parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder)))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
|
||||
case HITOBJECTATTRNV:
|
||||
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||
(!parseContext.isEsProfile() && parseContext.version >= 460
|
||||
&& parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder)))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
#endif
|
||||
|
||||
default:
|
||||
|
@ -78,6 +78,7 @@ void TType::buildMangledName(TString& mangledName) const
|
||||
case EbtAccStruct: mangledName += "as"; break;
|
||||
case EbtRayQuery: mangledName += "rq"; break;
|
||||
case EbtSpirvType: mangledName += "spv-t"; break;
|
||||
case EbtHitObjectNV: mangledName += "ho"; break;
|
||||
#endif
|
||||
case EbtSampler:
|
||||
switch (sampler.type) {
|
||||
|
@ -302,10 +302,11 @@ void TParseVersions::initializeExtensionBehavior()
|
||||
extensionBehavior[E_GL_NV_shader_sm_builtins] = EBhDisable;
|
||||
extensionBehavior[E_GL_NV_integer_cooperative_matrix] = EBhDisable;
|
||||
|
||||
extensionBehavior[E_GL_NV_shader_invocation_reorder] = EBhDisable;
|
||||
|
||||
// ARM
|
||||
extensionBehavior[E_GL_ARM_shader_core_builtins] = EBhDisable;
|
||||
|
||||
|
||||
// AEP
|
||||
extensionBehavior[E_GL_ANDROID_extension_pack_es31a] = EBhDisable;
|
||||
extensionBehavior[E_GL_KHR_blend_equation_advanced] = EBhDisable;
|
||||
@ -552,6 +553,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
||||
"#define GL_NV_mesh_shader 1\n"
|
||||
"#define GL_NV_cooperative_matrix 1\n"
|
||||
"#define GL_NV_integer_cooperative_matrix 1\n"
|
||||
"#define GL_NV_shader_execution_reorder 1\n"
|
||||
|
||||
"#define GL_EXT_shader_explicit_arithmetic_types 1\n"
|
||||
"#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n"
|
||||
|
@ -277,6 +277,7 @@ const int Num_viewportEXTs = sizeof(viewportEXTs) / sizeof(viewportEXTs[0]);
|
||||
const char* const E_GL_NV_cooperative_matrix = "GL_NV_cooperative_matrix";
|
||||
const char* const E_GL_NV_shader_sm_builtins = "GL_NV_shader_sm_builtins";
|
||||
const char* const E_GL_NV_integer_cooperative_matrix = "GL_NV_integer_cooperative_matrix";
|
||||
const char* const E_GL_NV_shader_invocation_reorder = "GL_NV_shader_invocation_reorder";
|
||||
|
||||
// AEP
|
||||
const char* const E_GL_ANDROID_extension_pack_es31a = "GL_ANDROID_extension_pack_es31a";
|
||||
|
@ -211,6 +211,7 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
%token <lex> ACCSTRUCTEXT
|
||||
%token <lex> RAYQUERYEXT
|
||||
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||
%token <lex> HITOBJECTNV HITOBJECTATTRNV
|
||||
|
||||
// combined image/sampler
|
||||
%token <lex> SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW
|
||||
@ -1534,6 +1535,14 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqHitAttr;
|
||||
}
|
||||
| HITOBJECTATTRNV {
|
||||
parseContext.globalCheck($1.loc, "hitAttributeNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask
|
||||
| EShLangMissMask), "hitObjectAttributeNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqHitObjectAttrNV;
|
||||
}
|
||||
| HITATTREXT {
|
||||
parseContext.globalCheck($1.loc, "hitAttributeEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
|
||||
@ -3509,6 +3518,10 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier");
|
||||
$$ = $1;
|
||||
}
|
||||
| HITOBJECTNV {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtHitObjectNV;
|
||||
}
|
||||
GLSLANG_WEB_EXCLUDE_OFF
|
||||
| struct_specifier {
|
||||
$$ = $1;
|
||||
|
@ -151,7 +151,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
||||
|
||||
%parse-param {glslang::TParseContext* pParseContext}
|
||||
%lex-param {parseContext}
|
||||
%define api.pure // enable thread safety
|
||||
%pure-parser // enable thread safety
|
||||
%expect 1 // One shift reduce conflict because of if | else
|
||||
|
||||
%token <lex> CONST BOOL INT UINT FLOAT
|
||||
@ -211,6 +211,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
||||
%token <lex> ACCSTRUCTEXT
|
||||
%token <lex> RAYQUERYEXT
|
||||
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||
%token <lex> HITOBJECTNV HITOBJECTATTRNV
|
||||
|
||||
// combined image/sampler
|
||||
%token <lex> SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW
|
||||
@ -1534,6 +1535,14 @@ storage_qualifier
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqHitAttr;
|
||||
}
|
||||
| HITOBJECTATTRNV {
|
||||
parseContext.globalCheck($1.loc, "hitAttributeNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask
|
||||
| EShLangMissMask), "hitObjectAttributeNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqHitObjectAttrNV;
|
||||
}
|
||||
| HITATTREXT {
|
||||
parseContext.globalCheck($1.loc, "hitAttributeEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
|
||||
@ -3509,6 +3518,10 @@ type_specifier_nonarray
|
||||
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier");
|
||||
$$ = $1;
|
||||
}
|
||||
| HITOBJECTNV {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtHitObjectNV;
|
||||
}
|
||||
|
||||
| struct_specifier {
|
||||
$$ = $1;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -217,298 +217,300 @@ extern int yydebug;
|
||||
FCOOPMATNV = 418, /* FCOOPMATNV */
|
||||
ICOOPMATNV = 419, /* ICOOPMATNV */
|
||||
UCOOPMATNV = 420, /* UCOOPMATNV */
|
||||
SAMPLERCUBEARRAY = 421, /* SAMPLERCUBEARRAY */
|
||||
SAMPLERCUBEARRAYSHADOW = 422, /* SAMPLERCUBEARRAYSHADOW */
|
||||
ISAMPLERCUBEARRAY = 423, /* ISAMPLERCUBEARRAY */
|
||||
USAMPLERCUBEARRAY = 424, /* USAMPLERCUBEARRAY */
|
||||
SAMPLER1D = 425, /* SAMPLER1D */
|
||||
SAMPLER1DARRAY = 426, /* SAMPLER1DARRAY */
|
||||
SAMPLER1DARRAYSHADOW = 427, /* SAMPLER1DARRAYSHADOW */
|
||||
ISAMPLER1D = 428, /* ISAMPLER1D */
|
||||
SAMPLER1DSHADOW = 429, /* SAMPLER1DSHADOW */
|
||||
SAMPLER2DRECT = 430, /* SAMPLER2DRECT */
|
||||
SAMPLER2DRECTSHADOW = 431, /* SAMPLER2DRECTSHADOW */
|
||||
ISAMPLER2DRECT = 432, /* ISAMPLER2DRECT */
|
||||
USAMPLER2DRECT = 433, /* USAMPLER2DRECT */
|
||||
SAMPLERBUFFER = 434, /* SAMPLERBUFFER */
|
||||
ISAMPLERBUFFER = 435, /* ISAMPLERBUFFER */
|
||||
USAMPLERBUFFER = 436, /* USAMPLERBUFFER */
|
||||
SAMPLER2DMS = 437, /* SAMPLER2DMS */
|
||||
ISAMPLER2DMS = 438, /* ISAMPLER2DMS */
|
||||
USAMPLER2DMS = 439, /* USAMPLER2DMS */
|
||||
SAMPLER2DMSARRAY = 440, /* SAMPLER2DMSARRAY */
|
||||
ISAMPLER2DMSARRAY = 441, /* ISAMPLER2DMSARRAY */
|
||||
USAMPLER2DMSARRAY = 442, /* USAMPLER2DMSARRAY */
|
||||
SAMPLEREXTERNALOES = 443, /* SAMPLEREXTERNALOES */
|
||||
SAMPLEREXTERNAL2DY2YEXT = 444, /* SAMPLEREXTERNAL2DY2YEXT */
|
||||
ISAMPLER1DARRAY = 445, /* ISAMPLER1DARRAY */
|
||||
USAMPLER1D = 446, /* USAMPLER1D */
|
||||
USAMPLER1DARRAY = 447, /* USAMPLER1DARRAY */
|
||||
F16SAMPLER1D = 448, /* F16SAMPLER1D */
|
||||
F16SAMPLER2D = 449, /* F16SAMPLER2D */
|
||||
F16SAMPLER3D = 450, /* F16SAMPLER3D */
|
||||
F16SAMPLER2DRECT = 451, /* F16SAMPLER2DRECT */
|
||||
F16SAMPLERCUBE = 452, /* F16SAMPLERCUBE */
|
||||
F16SAMPLER1DARRAY = 453, /* F16SAMPLER1DARRAY */
|
||||
F16SAMPLER2DARRAY = 454, /* F16SAMPLER2DARRAY */
|
||||
F16SAMPLERCUBEARRAY = 455, /* F16SAMPLERCUBEARRAY */
|
||||
F16SAMPLERBUFFER = 456, /* F16SAMPLERBUFFER */
|
||||
F16SAMPLER2DMS = 457, /* F16SAMPLER2DMS */
|
||||
F16SAMPLER2DMSARRAY = 458, /* F16SAMPLER2DMSARRAY */
|
||||
F16SAMPLER1DSHADOW = 459, /* F16SAMPLER1DSHADOW */
|
||||
F16SAMPLER2DSHADOW = 460, /* F16SAMPLER2DSHADOW */
|
||||
F16SAMPLER1DARRAYSHADOW = 461, /* F16SAMPLER1DARRAYSHADOW */
|
||||
F16SAMPLER2DARRAYSHADOW = 462, /* F16SAMPLER2DARRAYSHADOW */
|
||||
F16SAMPLER2DRECTSHADOW = 463, /* F16SAMPLER2DRECTSHADOW */
|
||||
F16SAMPLERCUBESHADOW = 464, /* F16SAMPLERCUBESHADOW */
|
||||
F16SAMPLERCUBEARRAYSHADOW = 465, /* F16SAMPLERCUBEARRAYSHADOW */
|
||||
IMAGE1D = 466, /* IMAGE1D */
|
||||
IIMAGE1D = 467, /* IIMAGE1D */
|
||||
UIMAGE1D = 468, /* UIMAGE1D */
|
||||
IMAGE2D = 469, /* IMAGE2D */
|
||||
IIMAGE2D = 470, /* IIMAGE2D */
|
||||
UIMAGE2D = 471, /* UIMAGE2D */
|
||||
IMAGE3D = 472, /* IMAGE3D */
|
||||
IIMAGE3D = 473, /* IIMAGE3D */
|
||||
UIMAGE3D = 474, /* UIMAGE3D */
|
||||
IMAGE2DRECT = 475, /* IMAGE2DRECT */
|
||||
IIMAGE2DRECT = 476, /* IIMAGE2DRECT */
|
||||
UIMAGE2DRECT = 477, /* UIMAGE2DRECT */
|
||||
IMAGECUBE = 478, /* IMAGECUBE */
|
||||
IIMAGECUBE = 479, /* IIMAGECUBE */
|
||||
UIMAGECUBE = 480, /* UIMAGECUBE */
|
||||
IMAGEBUFFER = 481, /* IMAGEBUFFER */
|
||||
IIMAGEBUFFER = 482, /* IIMAGEBUFFER */
|
||||
UIMAGEBUFFER = 483, /* UIMAGEBUFFER */
|
||||
IMAGE1DARRAY = 484, /* IMAGE1DARRAY */
|
||||
IIMAGE1DARRAY = 485, /* IIMAGE1DARRAY */
|
||||
UIMAGE1DARRAY = 486, /* UIMAGE1DARRAY */
|
||||
IMAGE2DARRAY = 487, /* IMAGE2DARRAY */
|
||||
IIMAGE2DARRAY = 488, /* IIMAGE2DARRAY */
|
||||
UIMAGE2DARRAY = 489, /* UIMAGE2DARRAY */
|
||||
IMAGECUBEARRAY = 490, /* IMAGECUBEARRAY */
|
||||
IIMAGECUBEARRAY = 491, /* IIMAGECUBEARRAY */
|
||||
UIMAGECUBEARRAY = 492, /* UIMAGECUBEARRAY */
|
||||
IMAGE2DMS = 493, /* IMAGE2DMS */
|
||||
IIMAGE2DMS = 494, /* IIMAGE2DMS */
|
||||
UIMAGE2DMS = 495, /* UIMAGE2DMS */
|
||||
IMAGE2DMSARRAY = 496, /* IMAGE2DMSARRAY */
|
||||
IIMAGE2DMSARRAY = 497, /* IIMAGE2DMSARRAY */
|
||||
UIMAGE2DMSARRAY = 498, /* UIMAGE2DMSARRAY */
|
||||
F16IMAGE1D = 499, /* F16IMAGE1D */
|
||||
F16IMAGE2D = 500, /* F16IMAGE2D */
|
||||
F16IMAGE3D = 501, /* F16IMAGE3D */
|
||||
F16IMAGE2DRECT = 502, /* F16IMAGE2DRECT */
|
||||
F16IMAGECUBE = 503, /* F16IMAGECUBE */
|
||||
F16IMAGE1DARRAY = 504, /* F16IMAGE1DARRAY */
|
||||
F16IMAGE2DARRAY = 505, /* F16IMAGE2DARRAY */
|
||||
F16IMAGECUBEARRAY = 506, /* F16IMAGECUBEARRAY */
|
||||
F16IMAGEBUFFER = 507, /* F16IMAGEBUFFER */
|
||||
F16IMAGE2DMS = 508, /* F16IMAGE2DMS */
|
||||
F16IMAGE2DMSARRAY = 509, /* F16IMAGE2DMSARRAY */
|
||||
I64IMAGE1D = 510, /* I64IMAGE1D */
|
||||
U64IMAGE1D = 511, /* U64IMAGE1D */
|
||||
I64IMAGE2D = 512, /* I64IMAGE2D */
|
||||
U64IMAGE2D = 513, /* U64IMAGE2D */
|
||||
I64IMAGE3D = 514, /* I64IMAGE3D */
|
||||
U64IMAGE3D = 515, /* U64IMAGE3D */
|
||||
I64IMAGE2DRECT = 516, /* I64IMAGE2DRECT */
|
||||
U64IMAGE2DRECT = 517, /* U64IMAGE2DRECT */
|
||||
I64IMAGECUBE = 518, /* I64IMAGECUBE */
|
||||
U64IMAGECUBE = 519, /* U64IMAGECUBE */
|
||||
I64IMAGEBUFFER = 520, /* I64IMAGEBUFFER */
|
||||
U64IMAGEBUFFER = 521, /* U64IMAGEBUFFER */
|
||||
I64IMAGE1DARRAY = 522, /* I64IMAGE1DARRAY */
|
||||
U64IMAGE1DARRAY = 523, /* U64IMAGE1DARRAY */
|
||||
I64IMAGE2DARRAY = 524, /* I64IMAGE2DARRAY */
|
||||
U64IMAGE2DARRAY = 525, /* U64IMAGE2DARRAY */
|
||||
I64IMAGECUBEARRAY = 526, /* I64IMAGECUBEARRAY */
|
||||
U64IMAGECUBEARRAY = 527, /* U64IMAGECUBEARRAY */
|
||||
I64IMAGE2DMS = 528, /* I64IMAGE2DMS */
|
||||
U64IMAGE2DMS = 529, /* U64IMAGE2DMS */
|
||||
I64IMAGE2DMSARRAY = 530, /* I64IMAGE2DMSARRAY */
|
||||
U64IMAGE2DMSARRAY = 531, /* U64IMAGE2DMSARRAY */
|
||||
TEXTURECUBEARRAY = 532, /* TEXTURECUBEARRAY */
|
||||
ITEXTURECUBEARRAY = 533, /* ITEXTURECUBEARRAY */
|
||||
UTEXTURECUBEARRAY = 534, /* UTEXTURECUBEARRAY */
|
||||
TEXTURE1D = 535, /* TEXTURE1D */
|
||||
ITEXTURE1D = 536, /* ITEXTURE1D */
|
||||
UTEXTURE1D = 537, /* UTEXTURE1D */
|
||||
TEXTURE1DARRAY = 538, /* TEXTURE1DARRAY */
|
||||
ITEXTURE1DARRAY = 539, /* ITEXTURE1DARRAY */
|
||||
UTEXTURE1DARRAY = 540, /* UTEXTURE1DARRAY */
|
||||
TEXTURE2DRECT = 541, /* TEXTURE2DRECT */
|
||||
ITEXTURE2DRECT = 542, /* ITEXTURE2DRECT */
|
||||
UTEXTURE2DRECT = 543, /* UTEXTURE2DRECT */
|
||||
TEXTUREBUFFER = 544, /* TEXTUREBUFFER */
|
||||
ITEXTUREBUFFER = 545, /* ITEXTUREBUFFER */
|
||||
UTEXTUREBUFFER = 546, /* UTEXTUREBUFFER */
|
||||
TEXTURE2DMS = 547, /* TEXTURE2DMS */
|
||||
ITEXTURE2DMS = 548, /* ITEXTURE2DMS */
|
||||
UTEXTURE2DMS = 549, /* UTEXTURE2DMS */
|
||||
TEXTURE2DMSARRAY = 550, /* TEXTURE2DMSARRAY */
|
||||
ITEXTURE2DMSARRAY = 551, /* ITEXTURE2DMSARRAY */
|
||||
UTEXTURE2DMSARRAY = 552, /* UTEXTURE2DMSARRAY */
|
||||
F16TEXTURE1D = 553, /* F16TEXTURE1D */
|
||||
F16TEXTURE2D = 554, /* F16TEXTURE2D */
|
||||
F16TEXTURE3D = 555, /* F16TEXTURE3D */
|
||||
F16TEXTURE2DRECT = 556, /* F16TEXTURE2DRECT */
|
||||
F16TEXTURECUBE = 557, /* F16TEXTURECUBE */
|
||||
F16TEXTURE1DARRAY = 558, /* F16TEXTURE1DARRAY */
|
||||
F16TEXTURE2DARRAY = 559, /* F16TEXTURE2DARRAY */
|
||||
F16TEXTURECUBEARRAY = 560, /* F16TEXTURECUBEARRAY */
|
||||
F16TEXTUREBUFFER = 561, /* F16TEXTUREBUFFER */
|
||||
F16TEXTURE2DMS = 562, /* F16TEXTURE2DMS */
|
||||
F16TEXTURE2DMSARRAY = 563, /* F16TEXTURE2DMSARRAY */
|
||||
SUBPASSINPUT = 564, /* SUBPASSINPUT */
|
||||
SUBPASSINPUTMS = 565, /* SUBPASSINPUTMS */
|
||||
ISUBPASSINPUT = 566, /* ISUBPASSINPUT */
|
||||
ISUBPASSINPUTMS = 567, /* ISUBPASSINPUTMS */
|
||||
USUBPASSINPUT = 568, /* USUBPASSINPUT */
|
||||
USUBPASSINPUTMS = 569, /* USUBPASSINPUTMS */
|
||||
F16SUBPASSINPUT = 570, /* F16SUBPASSINPUT */
|
||||
F16SUBPASSINPUTMS = 571, /* F16SUBPASSINPUTMS */
|
||||
SPIRV_INSTRUCTION = 572, /* SPIRV_INSTRUCTION */
|
||||
SPIRV_EXECUTION_MODE = 573, /* SPIRV_EXECUTION_MODE */
|
||||
SPIRV_EXECUTION_MODE_ID = 574, /* SPIRV_EXECUTION_MODE_ID */
|
||||
SPIRV_DECORATE = 575, /* SPIRV_DECORATE */
|
||||
SPIRV_DECORATE_ID = 576, /* SPIRV_DECORATE_ID */
|
||||
SPIRV_DECORATE_STRING = 577, /* SPIRV_DECORATE_STRING */
|
||||
SPIRV_TYPE = 578, /* SPIRV_TYPE */
|
||||
SPIRV_STORAGE_CLASS = 579, /* SPIRV_STORAGE_CLASS */
|
||||
SPIRV_BY_REFERENCE = 580, /* SPIRV_BY_REFERENCE */
|
||||
SPIRV_LITERAL = 581, /* SPIRV_LITERAL */
|
||||
LEFT_OP = 582, /* LEFT_OP */
|
||||
RIGHT_OP = 583, /* RIGHT_OP */
|
||||
INC_OP = 584, /* INC_OP */
|
||||
DEC_OP = 585, /* DEC_OP */
|
||||
LE_OP = 586, /* LE_OP */
|
||||
GE_OP = 587, /* GE_OP */
|
||||
EQ_OP = 588, /* EQ_OP */
|
||||
NE_OP = 589, /* NE_OP */
|
||||
AND_OP = 590, /* AND_OP */
|
||||
OR_OP = 591, /* OR_OP */
|
||||
XOR_OP = 592, /* XOR_OP */
|
||||
MUL_ASSIGN = 593, /* MUL_ASSIGN */
|
||||
DIV_ASSIGN = 594, /* DIV_ASSIGN */
|
||||
ADD_ASSIGN = 595, /* ADD_ASSIGN */
|
||||
MOD_ASSIGN = 596, /* MOD_ASSIGN */
|
||||
LEFT_ASSIGN = 597, /* LEFT_ASSIGN */
|
||||
RIGHT_ASSIGN = 598, /* RIGHT_ASSIGN */
|
||||
AND_ASSIGN = 599, /* AND_ASSIGN */
|
||||
XOR_ASSIGN = 600, /* XOR_ASSIGN */
|
||||
OR_ASSIGN = 601, /* OR_ASSIGN */
|
||||
SUB_ASSIGN = 602, /* SUB_ASSIGN */
|
||||
STRING_LITERAL = 603, /* STRING_LITERAL */
|
||||
LEFT_PAREN = 604, /* LEFT_PAREN */
|
||||
RIGHT_PAREN = 605, /* RIGHT_PAREN */
|
||||
LEFT_BRACKET = 606, /* LEFT_BRACKET */
|
||||
RIGHT_BRACKET = 607, /* RIGHT_BRACKET */
|
||||
LEFT_BRACE = 608, /* LEFT_BRACE */
|
||||
RIGHT_BRACE = 609, /* RIGHT_BRACE */
|
||||
DOT = 610, /* DOT */
|
||||
COMMA = 611, /* COMMA */
|
||||
COLON = 612, /* COLON */
|
||||
EQUAL = 613, /* EQUAL */
|
||||
SEMICOLON = 614, /* SEMICOLON */
|
||||
BANG = 615, /* BANG */
|
||||
DASH = 616, /* DASH */
|
||||
TILDE = 617, /* TILDE */
|
||||
PLUS = 618, /* PLUS */
|
||||
STAR = 619, /* STAR */
|
||||
SLASH = 620, /* SLASH */
|
||||
PERCENT = 621, /* PERCENT */
|
||||
LEFT_ANGLE = 622, /* LEFT_ANGLE */
|
||||
RIGHT_ANGLE = 623, /* RIGHT_ANGLE */
|
||||
VERTICAL_BAR = 624, /* VERTICAL_BAR */
|
||||
CARET = 625, /* CARET */
|
||||
AMPERSAND = 626, /* AMPERSAND */
|
||||
QUESTION = 627, /* QUESTION */
|
||||
INVARIANT = 628, /* INVARIANT */
|
||||
HIGH_PRECISION = 629, /* HIGH_PRECISION */
|
||||
MEDIUM_PRECISION = 630, /* MEDIUM_PRECISION */
|
||||
LOW_PRECISION = 631, /* LOW_PRECISION */
|
||||
PRECISION = 632, /* PRECISION */
|
||||
PACKED = 633, /* PACKED */
|
||||
RESOURCE = 634, /* RESOURCE */
|
||||
SUPERP = 635, /* SUPERP */
|
||||
FLOATCONSTANT = 636, /* FLOATCONSTANT */
|
||||
INTCONSTANT = 637, /* INTCONSTANT */
|
||||
UINTCONSTANT = 638, /* UINTCONSTANT */
|
||||
BOOLCONSTANT = 639, /* BOOLCONSTANT */
|
||||
IDENTIFIER = 640, /* IDENTIFIER */
|
||||
TYPE_NAME = 641, /* TYPE_NAME */
|
||||
CENTROID = 642, /* CENTROID */
|
||||
IN = 643, /* IN */
|
||||
OUT = 644, /* OUT */
|
||||
INOUT = 645, /* INOUT */
|
||||
STRUCT = 646, /* STRUCT */
|
||||
VOID = 647, /* VOID */
|
||||
WHILE = 648, /* WHILE */
|
||||
BREAK = 649, /* BREAK */
|
||||
CONTINUE = 650, /* CONTINUE */
|
||||
DO = 651, /* DO */
|
||||
ELSE = 652, /* ELSE */
|
||||
FOR = 653, /* FOR */
|
||||
IF = 654, /* IF */
|
||||
DISCARD = 655, /* DISCARD */
|
||||
RETURN = 656, /* RETURN */
|
||||
SWITCH = 657, /* SWITCH */
|
||||
CASE = 658, /* CASE */
|
||||
DEFAULT = 659, /* DEFAULT */
|
||||
TERMINATE_INVOCATION = 660, /* TERMINATE_INVOCATION */
|
||||
TERMINATE_RAY = 661, /* TERMINATE_RAY */
|
||||
IGNORE_INTERSECTION = 662, /* IGNORE_INTERSECTION */
|
||||
UNIFORM = 663, /* UNIFORM */
|
||||
SHARED = 664, /* SHARED */
|
||||
BUFFER = 665, /* BUFFER */
|
||||
FLAT = 666, /* FLAT */
|
||||
SMOOTH = 667, /* SMOOTH */
|
||||
LAYOUT = 668, /* LAYOUT */
|
||||
DOUBLECONSTANT = 669, /* DOUBLECONSTANT */
|
||||
INT16CONSTANT = 670, /* INT16CONSTANT */
|
||||
UINT16CONSTANT = 671, /* UINT16CONSTANT */
|
||||
FLOAT16CONSTANT = 672, /* FLOAT16CONSTANT */
|
||||
INT32CONSTANT = 673, /* INT32CONSTANT */
|
||||
UINT32CONSTANT = 674, /* UINT32CONSTANT */
|
||||
INT64CONSTANT = 675, /* INT64CONSTANT */
|
||||
UINT64CONSTANT = 676, /* UINT64CONSTANT */
|
||||
SUBROUTINE = 677, /* SUBROUTINE */
|
||||
DEMOTE = 678, /* DEMOTE */
|
||||
PAYLOADNV = 679, /* PAYLOADNV */
|
||||
PAYLOADINNV = 680, /* PAYLOADINNV */
|
||||
HITATTRNV = 681, /* HITATTRNV */
|
||||
CALLDATANV = 682, /* CALLDATANV */
|
||||
CALLDATAINNV = 683, /* CALLDATAINNV */
|
||||
PAYLOADEXT = 684, /* PAYLOADEXT */
|
||||
PAYLOADINEXT = 685, /* PAYLOADINEXT */
|
||||
HITATTREXT = 686, /* HITATTREXT */
|
||||
CALLDATAEXT = 687, /* CALLDATAEXT */
|
||||
CALLDATAINEXT = 688, /* CALLDATAINEXT */
|
||||
PATCH = 689, /* PATCH */
|
||||
SAMPLE = 690, /* SAMPLE */
|
||||
NONUNIFORM = 691, /* NONUNIFORM */
|
||||
COHERENT = 692, /* COHERENT */
|
||||
VOLATILE = 693, /* VOLATILE */
|
||||
RESTRICT = 694, /* RESTRICT */
|
||||
READONLY = 695, /* READONLY */
|
||||
WRITEONLY = 696, /* WRITEONLY */
|
||||
DEVICECOHERENT = 697, /* DEVICECOHERENT */
|
||||
QUEUEFAMILYCOHERENT = 698, /* QUEUEFAMILYCOHERENT */
|
||||
WORKGROUPCOHERENT = 699, /* WORKGROUPCOHERENT */
|
||||
SUBGROUPCOHERENT = 700, /* SUBGROUPCOHERENT */
|
||||
NONPRIVATE = 701, /* NONPRIVATE */
|
||||
SHADERCALLCOHERENT = 702, /* SHADERCALLCOHERENT */
|
||||
NOPERSPECTIVE = 703, /* NOPERSPECTIVE */
|
||||
EXPLICITINTERPAMD = 704, /* EXPLICITINTERPAMD */
|
||||
PERVERTEXEXT = 705, /* PERVERTEXEXT */
|
||||
PERVERTEXNV = 706, /* PERVERTEXNV */
|
||||
PERPRIMITIVENV = 707, /* PERPRIMITIVENV */
|
||||
PERVIEWNV = 708, /* PERVIEWNV */
|
||||
PERTASKNV = 709, /* PERTASKNV */
|
||||
PERPRIMITIVEEXT = 710, /* PERPRIMITIVEEXT */
|
||||
TASKPAYLOADWORKGROUPEXT = 711, /* TASKPAYLOADWORKGROUPEXT */
|
||||
PRECISE = 712 /* PRECISE */
|
||||
HITOBJECTNV = 421, /* HITOBJECTNV */
|
||||
HITOBJECTATTRNV = 422, /* HITOBJECTATTRNV */
|
||||
SAMPLERCUBEARRAY = 423, /* SAMPLERCUBEARRAY */
|
||||
SAMPLERCUBEARRAYSHADOW = 424, /* SAMPLERCUBEARRAYSHADOW */
|
||||
ISAMPLERCUBEARRAY = 425, /* ISAMPLERCUBEARRAY */
|
||||
USAMPLERCUBEARRAY = 426, /* USAMPLERCUBEARRAY */
|
||||
SAMPLER1D = 427, /* SAMPLER1D */
|
||||
SAMPLER1DARRAY = 428, /* SAMPLER1DARRAY */
|
||||
SAMPLER1DARRAYSHADOW = 429, /* SAMPLER1DARRAYSHADOW */
|
||||
ISAMPLER1D = 430, /* ISAMPLER1D */
|
||||
SAMPLER1DSHADOW = 431, /* SAMPLER1DSHADOW */
|
||||
SAMPLER2DRECT = 432, /* SAMPLER2DRECT */
|
||||
SAMPLER2DRECTSHADOW = 433, /* SAMPLER2DRECTSHADOW */
|
||||
ISAMPLER2DRECT = 434, /* ISAMPLER2DRECT */
|
||||
USAMPLER2DRECT = 435, /* USAMPLER2DRECT */
|
||||
SAMPLERBUFFER = 436, /* SAMPLERBUFFER */
|
||||
ISAMPLERBUFFER = 437, /* ISAMPLERBUFFER */
|
||||
USAMPLERBUFFER = 438, /* USAMPLERBUFFER */
|
||||
SAMPLER2DMS = 439, /* SAMPLER2DMS */
|
||||
ISAMPLER2DMS = 440, /* ISAMPLER2DMS */
|
||||
USAMPLER2DMS = 441, /* USAMPLER2DMS */
|
||||
SAMPLER2DMSARRAY = 442, /* SAMPLER2DMSARRAY */
|
||||
ISAMPLER2DMSARRAY = 443, /* ISAMPLER2DMSARRAY */
|
||||
USAMPLER2DMSARRAY = 444, /* USAMPLER2DMSARRAY */
|
||||
SAMPLEREXTERNALOES = 445, /* SAMPLEREXTERNALOES */
|
||||
SAMPLEREXTERNAL2DY2YEXT = 446, /* SAMPLEREXTERNAL2DY2YEXT */
|
||||
ISAMPLER1DARRAY = 447, /* ISAMPLER1DARRAY */
|
||||
USAMPLER1D = 448, /* USAMPLER1D */
|
||||
USAMPLER1DARRAY = 449, /* USAMPLER1DARRAY */
|
||||
F16SAMPLER1D = 450, /* F16SAMPLER1D */
|
||||
F16SAMPLER2D = 451, /* F16SAMPLER2D */
|
||||
F16SAMPLER3D = 452, /* F16SAMPLER3D */
|
||||
F16SAMPLER2DRECT = 453, /* F16SAMPLER2DRECT */
|
||||
F16SAMPLERCUBE = 454, /* F16SAMPLERCUBE */
|
||||
F16SAMPLER1DARRAY = 455, /* F16SAMPLER1DARRAY */
|
||||
F16SAMPLER2DARRAY = 456, /* F16SAMPLER2DARRAY */
|
||||
F16SAMPLERCUBEARRAY = 457, /* F16SAMPLERCUBEARRAY */
|
||||
F16SAMPLERBUFFER = 458, /* F16SAMPLERBUFFER */
|
||||
F16SAMPLER2DMS = 459, /* F16SAMPLER2DMS */
|
||||
F16SAMPLER2DMSARRAY = 460, /* F16SAMPLER2DMSARRAY */
|
||||
F16SAMPLER1DSHADOW = 461, /* F16SAMPLER1DSHADOW */
|
||||
F16SAMPLER2DSHADOW = 462, /* F16SAMPLER2DSHADOW */
|
||||
F16SAMPLER1DARRAYSHADOW = 463, /* F16SAMPLER1DARRAYSHADOW */
|
||||
F16SAMPLER2DARRAYSHADOW = 464, /* F16SAMPLER2DARRAYSHADOW */
|
||||
F16SAMPLER2DRECTSHADOW = 465, /* F16SAMPLER2DRECTSHADOW */
|
||||
F16SAMPLERCUBESHADOW = 466, /* F16SAMPLERCUBESHADOW */
|
||||
F16SAMPLERCUBEARRAYSHADOW = 467, /* F16SAMPLERCUBEARRAYSHADOW */
|
||||
IMAGE1D = 468, /* IMAGE1D */
|
||||
IIMAGE1D = 469, /* IIMAGE1D */
|
||||
UIMAGE1D = 470, /* UIMAGE1D */
|
||||
IMAGE2D = 471, /* IMAGE2D */
|
||||
IIMAGE2D = 472, /* IIMAGE2D */
|
||||
UIMAGE2D = 473, /* UIMAGE2D */
|
||||
IMAGE3D = 474, /* IMAGE3D */
|
||||
IIMAGE3D = 475, /* IIMAGE3D */
|
||||
UIMAGE3D = 476, /* UIMAGE3D */
|
||||
IMAGE2DRECT = 477, /* IMAGE2DRECT */
|
||||
IIMAGE2DRECT = 478, /* IIMAGE2DRECT */
|
||||
UIMAGE2DRECT = 479, /* UIMAGE2DRECT */
|
||||
IMAGECUBE = 480, /* IMAGECUBE */
|
||||
IIMAGECUBE = 481, /* IIMAGECUBE */
|
||||
UIMAGECUBE = 482, /* UIMAGECUBE */
|
||||
IMAGEBUFFER = 483, /* IMAGEBUFFER */
|
||||
IIMAGEBUFFER = 484, /* IIMAGEBUFFER */
|
||||
UIMAGEBUFFER = 485, /* UIMAGEBUFFER */
|
||||
IMAGE1DARRAY = 486, /* IMAGE1DARRAY */
|
||||
IIMAGE1DARRAY = 487, /* IIMAGE1DARRAY */
|
||||
UIMAGE1DARRAY = 488, /* UIMAGE1DARRAY */
|
||||
IMAGE2DARRAY = 489, /* IMAGE2DARRAY */
|
||||
IIMAGE2DARRAY = 490, /* IIMAGE2DARRAY */
|
||||
UIMAGE2DARRAY = 491, /* UIMAGE2DARRAY */
|
||||
IMAGECUBEARRAY = 492, /* IMAGECUBEARRAY */
|
||||
IIMAGECUBEARRAY = 493, /* IIMAGECUBEARRAY */
|
||||
UIMAGECUBEARRAY = 494, /* UIMAGECUBEARRAY */
|
||||
IMAGE2DMS = 495, /* IMAGE2DMS */
|
||||
IIMAGE2DMS = 496, /* IIMAGE2DMS */
|
||||
UIMAGE2DMS = 497, /* UIMAGE2DMS */
|
||||
IMAGE2DMSARRAY = 498, /* IMAGE2DMSARRAY */
|
||||
IIMAGE2DMSARRAY = 499, /* IIMAGE2DMSARRAY */
|
||||
UIMAGE2DMSARRAY = 500, /* UIMAGE2DMSARRAY */
|
||||
F16IMAGE1D = 501, /* F16IMAGE1D */
|
||||
F16IMAGE2D = 502, /* F16IMAGE2D */
|
||||
F16IMAGE3D = 503, /* F16IMAGE3D */
|
||||
F16IMAGE2DRECT = 504, /* F16IMAGE2DRECT */
|
||||
F16IMAGECUBE = 505, /* F16IMAGECUBE */
|
||||
F16IMAGE1DARRAY = 506, /* F16IMAGE1DARRAY */
|
||||
F16IMAGE2DARRAY = 507, /* F16IMAGE2DARRAY */
|
||||
F16IMAGECUBEARRAY = 508, /* F16IMAGECUBEARRAY */
|
||||
F16IMAGEBUFFER = 509, /* F16IMAGEBUFFER */
|
||||
F16IMAGE2DMS = 510, /* F16IMAGE2DMS */
|
||||
F16IMAGE2DMSARRAY = 511, /* F16IMAGE2DMSARRAY */
|
||||
I64IMAGE1D = 512, /* I64IMAGE1D */
|
||||
U64IMAGE1D = 513, /* U64IMAGE1D */
|
||||
I64IMAGE2D = 514, /* I64IMAGE2D */
|
||||
U64IMAGE2D = 515, /* U64IMAGE2D */
|
||||
I64IMAGE3D = 516, /* I64IMAGE3D */
|
||||
U64IMAGE3D = 517, /* U64IMAGE3D */
|
||||
I64IMAGE2DRECT = 518, /* I64IMAGE2DRECT */
|
||||
U64IMAGE2DRECT = 519, /* U64IMAGE2DRECT */
|
||||
I64IMAGECUBE = 520, /* I64IMAGECUBE */
|
||||
U64IMAGECUBE = 521, /* U64IMAGECUBE */
|
||||
I64IMAGEBUFFER = 522, /* I64IMAGEBUFFER */
|
||||
U64IMAGEBUFFER = 523, /* U64IMAGEBUFFER */
|
||||
I64IMAGE1DARRAY = 524, /* I64IMAGE1DARRAY */
|
||||
U64IMAGE1DARRAY = 525, /* U64IMAGE1DARRAY */
|
||||
I64IMAGE2DARRAY = 526, /* I64IMAGE2DARRAY */
|
||||
U64IMAGE2DARRAY = 527, /* U64IMAGE2DARRAY */
|
||||
I64IMAGECUBEARRAY = 528, /* I64IMAGECUBEARRAY */
|
||||
U64IMAGECUBEARRAY = 529, /* U64IMAGECUBEARRAY */
|
||||
I64IMAGE2DMS = 530, /* I64IMAGE2DMS */
|
||||
U64IMAGE2DMS = 531, /* U64IMAGE2DMS */
|
||||
I64IMAGE2DMSARRAY = 532, /* I64IMAGE2DMSARRAY */
|
||||
U64IMAGE2DMSARRAY = 533, /* U64IMAGE2DMSARRAY */
|
||||
TEXTURECUBEARRAY = 534, /* TEXTURECUBEARRAY */
|
||||
ITEXTURECUBEARRAY = 535, /* ITEXTURECUBEARRAY */
|
||||
UTEXTURECUBEARRAY = 536, /* UTEXTURECUBEARRAY */
|
||||
TEXTURE1D = 537, /* TEXTURE1D */
|
||||
ITEXTURE1D = 538, /* ITEXTURE1D */
|
||||
UTEXTURE1D = 539, /* UTEXTURE1D */
|
||||
TEXTURE1DARRAY = 540, /* TEXTURE1DARRAY */
|
||||
ITEXTURE1DARRAY = 541, /* ITEXTURE1DARRAY */
|
||||
UTEXTURE1DARRAY = 542, /* UTEXTURE1DARRAY */
|
||||
TEXTURE2DRECT = 543, /* TEXTURE2DRECT */
|
||||
ITEXTURE2DRECT = 544, /* ITEXTURE2DRECT */
|
||||
UTEXTURE2DRECT = 545, /* UTEXTURE2DRECT */
|
||||
TEXTUREBUFFER = 546, /* TEXTUREBUFFER */
|
||||
ITEXTUREBUFFER = 547, /* ITEXTUREBUFFER */
|
||||
UTEXTUREBUFFER = 548, /* UTEXTUREBUFFER */
|
||||
TEXTURE2DMS = 549, /* TEXTURE2DMS */
|
||||
ITEXTURE2DMS = 550, /* ITEXTURE2DMS */
|
||||
UTEXTURE2DMS = 551, /* UTEXTURE2DMS */
|
||||
TEXTURE2DMSARRAY = 552, /* TEXTURE2DMSARRAY */
|
||||
ITEXTURE2DMSARRAY = 553, /* ITEXTURE2DMSARRAY */
|
||||
UTEXTURE2DMSARRAY = 554, /* UTEXTURE2DMSARRAY */
|
||||
F16TEXTURE1D = 555, /* F16TEXTURE1D */
|
||||
F16TEXTURE2D = 556, /* F16TEXTURE2D */
|
||||
F16TEXTURE3D = 557, /* F16TEXTURE3D */
|
||||
F16TEXTURE2DRECT = 558, /* F16TEXTURE2DRECT */
|
||||
F16TEXTURECUBE = 559, /* F16TEXTURECUBE */
|
||||
F16TEXTURE1DARRAY = 560, /* F16TEXTURE1DARRAY */
|
||||
F16TEXTURE2DARRAY = 561, /* F16TEXTURE2DARRAY */
|
||||
F16TEXTURECUBEARRAY = 562, /* F16TEXTURECUBEARRAY */
|
||||
F16TEXTUREBUFFER = 563, /* F16TEXTUREBUFFER */
|
||||
F16TEXTURE2DMS = 564, /* F16TEXTURE2DMS */
|
||||
F16TEXTURE2DMSARRAY = 565, /* F16TEXTURE2DMSARRAY */
|
||||
SUBPASSINPUT = 566, /* SUBPASSINPUT */
|
||||
SUBPASSINPUTMS = 567, /* SUBPASSINPUTMS */
|
||||
ISUBPASSINPUT = 568, /* ISUBPASSINPUT */
|
||||
ISUBPASSINPUTMS = 569, /* ISUBPASSINPUTMS */
|
||||
USUBPASSINPUT = 570, /* USUBPASSINPUT */
|
||||
USUBPASSINPUTMS = 571, /* USUBPASSINPUTMS */
|
||||
F16SUBPASSINPUT = 572, /* F16SUBPASSINPUT */
|
||||
F16SUBPASSINPUTMS = 573, /* F16SUBPASSINPUTMS */
|
||||
SPIRV_INSTRUCTION = 574, /* SPIRV_INSTRUCTION */
|
||||
SPIRV_EXECUTION_MODE = 575, /* SPIRV_EXECUTION_MODE */
|
||||
SPIRV_EXECUTION_MODE_ID = 576, /* SPIRV_EXECUTION_MODE_ID */
|
||||
SPIRV_DECORATE = 577, /* SPIRV_DECORATE */
|
||||
SPIRV_DECORATE_ID = 578, /* SPIRV_DECORATE_ID */
|
||||
SPIRV_DECORATE_STRING = 579, /* SPIRV_DECORATE_STRING */
|
||||
SPIRV_TYPE = 580, /* SPIRV_TYPE */
|
||||
SPIRV_STORAGE_CLASS = 581, /* SPIRV_STORAGE_CLASS */
|
||||
SPIRV_BY_REFERENCE = 582, /* SPIRV_BY_REFERENCE */
|
||||
SPIRV_LITERAL = 583, /* SPIRV_LITERAL */
|
||||
LEFT_OP = 584, /* LEFT_OP */
|
||||
RIGHT_OP = 585, /* RIGHT_OP */
|
||||
INC_OP = 586, /* INC_OP */
|
||||
DEC_OP = 587, /* DEC_OP */
|
||||
LE_OP = 588, /* LE_OP */
|
||||
GE_OP = 589, /* GE_OP */
|
||||
EQ_OP = 590, /* EQ_OP */
|
||||
NE_OP = 591, /* NE_OP */
|
||||
AND_OP = 592, /* AND_OP */
|
||||
OR_OP = 593, /* OR_OP */
|
||||
XOR_OP = 594, /* XOR_OP */
|
||||
MUL_ASSIGN = 595, /* MUL_ASSIGN */
|
||||
DIV_ASSIGN = 596, /* DIV_ASSIGN */
|
||||
ADD_ASSIGN = 597, /* ADD_ASSIGN */
|
||||
MOD_ASSIGN = 598, /* MOD_ASSIGN */
|
||||
LEFT_ASSIGN = 599, /* LEFT_ASSIGN */
|
||||
RIGHT_ASSIGN = 600, /* RIGHT_ASSIGN */
|
||||
AND_ASSIGN = 601, /* AND_ASSIGN */
|
||||
XOR_ASSIGN = 602, /* XOR_ASSIGN */
|
||||
OR_ASSIGN = 603, /* OR_ASSIGN */
|
||||
SUB_ASSIGN = 604, /* SUB_ASSIGN */
|
||||
STRING_LITERAL = 605, /* STRING_LITERAL */
|
||||
LEFT_PAREN = 606, /* LEFT_PAREN */
|
||||
RIGHT_PAREN = 607, /* RIGHT_PAREN */
|
||||
LEFT_BRACKET = 608, /* LEFT_BRACKET */
|
||||
RIGHT_BRACKET = 609, /* RIGHT_BRACKET */
|
||||
LEFT_BRACE = 610, /* LEFT_BRACE */
|
||||
RIGHT_BRACE = 611, /* RIGHT_BRACE */
|
||||
DOT = 612, /* DOT */
|
||||
COMMA = 613, /* COMMA */
|
||||
COLON = 614, /* COLON */
|
||||
EQUAL = 615, /* EQUAL */
|
||||
SEMICOLON = 616, /* SEMICOLON */
|
||||
BANG = 617, /* BANG */
|
||||
DASH = 618, /* DASH */
|
||||
TILDE = 619, /* TILDE */
|
||||
PLUS = 620, /* PLUS */
|
||||
STAR = 621, /* STAR */
|
||||
SLASH = 622, /* SLASH */
|
||||
PERCENT = 623, /* PERCENT */
|
||||
LEFT_ANGLE = 624, /* LEFT_ANGLE */
|
||||
RIGHT_ANGLE = 625, /* RIGHT_ANGLE */
|
||||
VERTICAL_BAR = 626, /* VERTICAL_BAR */
|
||||
CARET = 627, /* CARET */
|
||||
AMPERSAND = 628, /* AMPERSAND */
|
||||
QUESTION = 629, /* QUESTION */
|
||||
INVARIANT = 630, /* INVARIANT */
|
||||
HIGH_PRECISION = 631, /* HIGH_PRECISION */
|
||||
MEDIUM_PRECISION = 632, /* MEDIUM_PRECISION */
|
||||
LOW_PRECISION = 633, /* LOW_PRECISION */
|
||||
PRECISION = 634, /* PRECISION */
|
||||
PACKED = 635, /* PACKED */
|
||||
RESOURCE = 636, /* RESOURCE */
|
||||
SUPERP = 637, /* SUPERP */
|
||||
FLOATCONSTANT = 638, /* FLOATCONSTANT */
|
||||
INTCONSTANT = 639, /* INTCONSTANT */
|
||||
UINTCONSTANT = 640, /* UINTCONSTANT */
|
||||
BOOLCONSTANT = 641, /* BOOLCONSTANT */
|
||||
IDENTIFIER = 642, /* IDENTIFIER */
|
||||
TYPE_NAME = 643, /* TYPE_NAME */
|
||||
CENTROID = 644, /* CENTROID */
|
||||
IN = 645, /* IN */
|
||||
OUT = 646, /* OUT */
|
||||
INOUT = 647, /* INOUT */
|
||||
STRUCT = 648, /* STRUCT */
|
||||
VOID = 649, /* VOID */
|
||||
WHILE = 650, /* WHILE */
|
||||
BREAK = 651, /* BREAK */
|
||||
CONTINUE = 652, /* CONTINUE */
|
||||
DO = 653, /* DO */
|
||||
ELSE = 654, /* ELSE */
|
||||
FOR = 655, /* FOR */
|
||||
IF = 656, /* IF */
|
||||
DISCARD = 657, /* DISCARD */
|
||||
RETURN = 658, /* RETURN */
|
||||
SWITCH = 659, /* SWITCH */
|
||||
CASE = 660, /* CASE */
|
||||
DEFAULT = 661, /* DEFAULT */
|
||||
TERMINATE_INVOCATION = 662, /* TERMINATE_INVOCATION */
|
||||
TERMINATE_RAY = 663, /* TERMINATE_RAY */
|
||||
IGNORE_INTERSECTION = 664, /* IGNORE_INTERSECTION */
|
||||
UNIFORM = 665, /* UNIFORM */
|
||||
SHARED = 666, /* SHARED */
|
||||
BUFFER = 667, /* BUFFER */
|
||||
FLAT = 668, /* FLAT */
|
||||
SMOOTH = 669, /* SMOOTH */
|
||||
LAYOUT = 670, /* LAYOUT */
|
||||
DOUBLECONSTANT = 671, /* DOUBLECONSTANT */
|
||||
INT16CONSTANT = 672, /* INT16CONSTANT */
|
||||
UINT16CONSTANT = 673, /* UINT16CONSTANT */
|
||||
FLOAT16CONSTANT = 674, /* FLOAT16CONSTANT */
|
||||
INT32CONSTANT = 675, /* INT32CONSTANT */
|
||||
UINT32CONSTANT = 676, /* UINT32CONSTANT */
|
||||
INT64CONSTANT = 677, /* INT64CONSTANT */
|
||||
UINT64CONSTANT = 678, /* UINT64CONSTANT */
|
||||
SUBROUTINE = 679, /* SUBROUTINE */
|
||||
DEMOTE = 680, /* DEMOTE */
|
||||
PAYLOADNV = 681, /* PAYLOADNV */
|
||||
PAYLOADINNV = 682, /* PAYLOADINNV */
|
||||
HITATTRNV = 683, /* HITATTRNV */
|
||||
CALLDATANV = 684, /* CALLDATANV */
|
||||
CALLDATAINNV = 685, /* CALLDATAINNV */
|
||||
PAYLOADEXT = 686, /* PAYLOADEXT */
|
||||
PAYLOADINEXT = 687, /* PAYLOADINEXT */
|
||||
HITATTREXT = 688, /* HITATTREXT */
|
||||
CALLDATAEXT = 689, /* CALLDATAEXT */
|
||||
CALLDATAINEXT = 690, /* CALLDATAINEXT */
|
||||
PATCH = 691, /* PATCH */
|
||||
SAMPLE = 692, /* SAMPLE */
|
||||
NONUNIFORM = 693, /* NONUNIFORM */
|
||||
COHERENT = 694, /* COHERENT */
|
||||
VOLATILE = 695, /* VOLATILE */
|
||||
RESTRICT = 696, /* RESTRICT */
|
||||
READONLY = 697, /* READONLY */
|
||||
WRITEONLY = 698, /* WRITEONLY */
|
||||
DEVICECOHERENT = 699, /* DEVICECOHERENT */
|
||||
QUEUEFAMILYCOHERENT = 700, /* QUEUEFAMILYCOHERENT */
|
||||
WORKGROUPCOHERENT = 701, /* WORKGROUPCOHERENT */
|
||||
SUBGROUPCOHERENT = 702, /* SUBGROUPCOHERENT */
|
||||
NONPRIVATE = 703, /* NONPRIVATE */
|
||||
SHADERCALLCOHERENT = 704, /* SHADERCALLCOHERENT */
|
||||
NOPERSPECTIVE = 705, /* NOPERSPECTIVE */
|
||||
EXPLICITINTERPAMD = 706, /* EXPLICITINTERPAMD */
|
||||
PERVERTEXEXT = 707, /* PERVERTEXEXT */
|
||||
PERVERTEXNV = 708, /* PERVERTEXNV */
|
||||
PERPRIMITIVENV = 709, /* PERPRIMITIVENV */
|
||||
PERVIEWNV = 710, /* PERVIEWNV */
|
||||
PERTASKNV = 711, /* PERTASKNV */
|
||||
PERPRIMITIVEEXT = 712, /* PERPRIMITIVEEXT */
|
||||
TASKPAYLOADWORKGROUPEXT = 713, /* TASKPAYLOADWORKGROUPEXT */
|
||||
PRECISE = 714 /* PRECISE */
|
||||
};
|
||||
typedef enum yytokentype yytoken_kind_t;
|
||||
#endif
|
||||
@ -556,7 +558,7 @@ union YYSTYPE
|
||||
glslang::TArraySizes* typeParameters;
|
||||
} interm;
|
||||
|
||||
#line 560 "MachineIndependent/glslang_tab.cpp.h"
|
||||
#line 562 "MachineIndependent/glslang_tab.cpp.h"
|
||||
|
||||
};
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
|
@ -1105,6 +1105,38 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
||||
case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break;
|
||||
case EOpDebugPrintf: out.debug << "Debug printf"; break;
|
||||
|
||||
case EOpHitObjectTraceRayNV: out.debug << "HitObjectTraceRayNV"; break;
|
||||
case EOpHitObjectTraceRayMotionNV: out.debug << "HitObjectTraceRayMotionNV"; break;
|
||||
case EOpHitObjectRecordHitNV: out.debug << "HitObjectRecordHitNV"; break;
|
||||
case EOpHitObjectRecordHitMotionNV: out.debug << "HitObjectRecordHitMotionNV"; break;
|
||||
case EOpHitObjectRecordHitWithIndexNV: out.debug << "HitObjectRecordHitWithIndexNV"; break;
|
||||
case EOpHitObjectRecordHitWithIndexMotionNV: out.debug << "HitObjectRecordHitWithIndexMotionNV"; break;
|
||||
case EOpHitObjectRecordMissNV: out.debug << "HitObjectRecordMissNV"; break;
|
||||
case EOpHitObjectRecordMissMotionNV: out.debug << "HitObjectRecordMissMotionNV"; break;
|
||||
case EOpHitObjectRecordEmptyNV: out.debug << "HitObjectRecordEmptyNV"; break;
|
||||
case EOpHitObjectExecuteShaderNV: out.debug << "HitObjectExecuteShaderNV"; break;
|
||||
case EOpHitObjectIsEmptyNV: out.debug << "HitObjectIsEmptyNV"; break;
|
||||
case EOpHitObjectIsMissNV: out.debug << "HitObjectIsMissNV"; break;
|
||||
case EOpHitObjectIsHitNV: out.debug << "HitObjectIsHitNV"; break;
|
||||
case EOpHitObjectGetRayTMinNV: out.debug << "HitObjectGetRayTMinNV"; break;
|
||||
case EOpHitObjectGetRayTMaxNV: out.debug << "HitObjectGetRayTMaxNV"; break;
|
||||
case EOpHitObjectGetObjectRayOriginNV: out.debug << "HitObjectGetObjectRayOriginNV"; break;
|
||||
case EOpHitObjectGetObjectRayDirectionNV: out.debug << "HitObjectGetObjectRayDirectionNV"; break;
|
||||
case EOpHitObjectGetWorldRayOriginNV: out.debug << "HitObjectGetWorldRayOriginNV"; break;
|
||||
case EOpHitObjectGetWorldRayDirectionNV: out.debug << "HitObjectGetWorldRayDirectionNV"; break;
|
||||
case EOpHitObjectGetObjectToWorldNV: out.debug << "HitObjectGetObjectToWorldNV"; break;
|
||||
case EOpHitObjectGetWorldToObjectNV: out.debug << "HitObjectGetWorldToObjectNV"; break;
|
||||
case EOpHitObjectGetInstanceCustomIndexNV: out.debug<< "HitObjectGetInstanceCustomIndexNV"; break;
|
||||
case EOpHitObjectGetInstanceIdNV: out.debug << "HitObjectGetInstaneIdNV"; break;
|
||||
case EOpHitObjectGetGeometryIndexNV: out.debug << "HitObjectGetGeometryIndexNV"; break;
|
||||
case EOpHitObjectGetPrimitiveIndexNV: out.debug << "HitObjectGetPrimitiveIndexNV"; break;
|
||||
case EOpHitObjectGetHitKindNV: out.debug << "HitObjectGetHitKindNV"; break;
|
||||
case EOpHitObjectGetAttributesNV: out.debug << "HitObjectGetAttributesNV"; break;
|
||||
case EOpHitObjectGetCurrentTimeNV: out.debug << "HitObjectGetCurrentTimeNV"; break;
|
||||
case EOpHitObjectGetShaderBindingTableRecordIndexNV: out.debug << "HitObjectGetShaderBindingTableRecordIndexNV"; break;
|
||||
case EOpHitObjectGetShaderRecordBufferHandleNV: out.debug << "HitObjectReadShaderRecordBufferHandleNV"; break;
|
||||
case EOpReorderThreadNV: out.debug << "ReorderThreadNV"; break;
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
case EOpSpirvInst: out.debug << "spirv_instruction"; break;
|
||||
#endif
|
||||
|
@ -1614,6 +1614,8 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
|
||||
setRT = 0;
|
||||
else if (qualifier.isAnyCallable())
|
||||
setRT = 1;
|
||||
else if (qualifier.isHitObjectAttrNV())
|
||||
setRT = 2;
|
||||
else
|
||||
return -1;
|
||||
|
||||
@ -1653,7 +1655,7 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
|
||||
// slot irrespective of type.
|
||||
int collision = -1; // no collision
|
||||
#ifndef GLSLANG_WEB
|
||||
if (qualifier.isAnyPayload() || qualifier.isAnyCallable()) {
|
||||
if (qualifier.isAnyPayload() || qualifier.isAnyCallable() || qualifier.isHitObjectAttrNV()) {
|
||||
TRange range(qualifier.layoutLocation, qualifier.layoutLocation);
|
||||
collision = checkLocationRT(setRT, qualifier.layoutLocation);
|
||||
if (collision < 0)
|
||||
|
@ -1268,8 +1268,9 @@ protected:
|
||||
std::unordered_set<int> usedConstantId; // specialization constant ids used
|
||||
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<TRange> usedIoRT[2]; // sets of used location, one for rayPayload/rayPayloadIN and other
|
||||
// for callableData/callableDataIn
|
||||
std::vector<TRange> usedIoRT[4]; // sets of used location, one for rayPayload/rayPayloadIN,
|
||||
// one for callableData/callableDataIn, one for hitObjectAttributeNV and
|
||||
// one for shaderrecordhitobjectNV
|
||||
// set of names of statically read/written I/O that might need extra checking
|
||||
std::set<TString> ioAccessed;
|
||||
|
||||
|
@ -652,6 +652,12 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
"spv.atomiAddEXT.task",
|
||||
"spv.460.subgroupEXT.task",
|
||||
"spv.460.subgroupEXT.mesh",
|
||||
|
||||
// SPV_NV_shader_execution_reorder
|
||||
|
||||
"spv.nv.hitobject-allops.rgen",
|
||||
"spv.nv.hitobject-allops.rchit",
|
||||
"spv.nv.hitobject-allops.rmiss",
|
||||
})),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user