mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 11:30:06 +00:00
Add support for GLSL_EXT_ray_tracing
and SPV_KHR_ray_tracing
This commit is contained in:
parent
f368dcbb7d
commit
db32b243ff
@ -45,5 +45,5 @@ static const char* const E_SPV_KHR_physical_storage_buffer = "SPV_KHR_physi
|
||||
static const char* const E_SPV_EXT_fragment_shader_interlock = "SPV_EXT_fragment_shader_interlock";
|
||||
static const char* const E_SPV_KHR_shader_clock = "SPV_KHR_shader_clock";
|
||||
static const char* const E_SPV_KHR_non_semantic_info = "SPV_KHR_non_semantic_info";
|
||||
|
||||
static const char* const E_SPV_KHR_ray_tracing = "SPV_KHR_ray_tracing";
|
||||
#endif // #ifndef GLSLextKHR_H
|
||||
|
@ -227,7 +227,7 @@ protected:
|
||||
bool isTrivial(const glslang::TIntermTyped* node);
|
||||
spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right);
|
||||
spv::Id getExtBuiltins(const char* name);
|
||||
std::pair<spv::Id, spv::Id> getForcedType(spv::BuiltIn, const glslang::TType&);
|
||||
std::pair<spv::Id, spv::Id> getForcedType(glslang::TBuiltInVariable builtIn, const glslang::TType&);
|
||||
spv::Id translateForcedType(spv::Id object);
|
||||
spv::Id createCompositeConstruct(spv::Id typeId, std::vector<spv::Id> constituents);
|
||||
|
||||
@ -312,12 +312,12 @@ spv::ExecutionModel TranslateExecutionModel(EShLanguage stage)
|
||||
case EShLangTessControl: return spv::ExecutionModelTessellationControl;
|
||||
case EShLangTessEvaluation: return spv::ExecutionModelTessellationEvaluation;
|
||||
case EShLangGeometry: return spv::ExecutionModelGeometry;
|
||||
case EShLangRayGenNV: return spv::ExecutionModelRayGenerationNV;
|
||||
case EShLangIntersectNV: return spv::ExecutionModelIntersectionNV;
|
||||
case EShLangAnyHitNV: return spv::ExecutionModelAnyHitNV;
|
||||
case EShLangClosestHitNV: return spv::ExecutionModelClosestHitNV;
|
||||
case EShLangMissNV: return spv::ExecutionModelMissNV;
|
||||
case EShLangCallableNV: return spv::ExecutionModelCallableNV;
|
||||
case EShLangRayGen: return spv::ExecutionModelRayGenerationKHR;
|
||||
case EShLangIntersect: return spv::ExecutionModelIntersectionKHR;
|
||||
case EShLangAnyHit: return spv::ExecutionModelAnyHitKHR;
|
||||
case EShLangClosestHit: return spv::ExecutionModelClosestHitKHR;
|
||||
case EShLangMiss: return spv::ExecutionModelMissKHR;
|
||||
case EShLangCallable: return spv::ExecutionModelCallableKHR;
|
||||
case EShLangTaskNV: return spv::ExecutionModelTaskNV;
|
||||
case EShLangMeshNV: return spv::ExecutionModelMeshNV;
|
||||
#endif
|
||||
@ -371,11 +371,11 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useSto
|
||||
case glslang::EvqVaryingIn: return spv::DecorationBlock;
|
||||
case glslang::EvqVaryingOut: return spv::DecorationBlock;
|
||||
#ifndef GLSLANG_WEB
|
||||
case glslang::EvqPayloadNV: return spv::DecorationBlock;
|
||||
case glslang::EvqPayloadInNV: return spv::DecorationBlock;
|
||||
case glslang::EvqHitAttrNV: return spv::DecorationBlock;
|
||||
case glslang::EvqCallableDataNV: return spv::DecorationBlock;
|
||||
case glslang::EvqCallableDataInNV: return spv::DecorationBlock;
|
||||
case glslang::EvqPayload: return spv::DecorationBlock;
|
||||
case glslang::EvqPayloadIn: return spv::DecorationBlock;
|
||||
case glslang::EvqHitAttr: return spv::DecorationBlock;
|
||||
case glslang::EvqCallableData: return spv::DecorationBlock;
|
||||
case glslang::EvqCallableDataIn: return spv::DecorationBlock;
|
||||
#endif
|
||||
default:
|
||||
assert(0);
|
||||
@ -447,11 +447,11 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T
|
||||
}
|
||||
return spv::DecorationMax;
|
||||
#ifndef GLSLANG_WEB
|
||||
case glslang::EvqPayloadNV:
|
||||
case glslang::EvqPayloadInNV:
|
||||
case glslang::EvqHitAttrNV:
|
||||
case glslang::EvqCallableDataNV:
|
||||
case glslang::EvqCallableDataInNV:
|
||||
case glslang::EvqPayload:
|
||||
case glslang::EvqPayloadIn:
|
||||
case glslang::EvqHitAttr:
|
||||
case glslang::EvqCallableData:
|
||||
case glslang::EvqCallableDataIn:
|
||||
return spv::DecorationMax;
|
||||
#endif
|
||||
default:
|
||||
@ -543,15 +543,11 @@ spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess(
|
||||
if (!glslangIntermediate->usingVulkanMemoryModel() || coherentFlags.isImage)
|
||||
return mask;
|
||||
|
||||
if (coherentFlags.volatil ||
|
||||
coherentFlags.coherent ||
|
||||
coherentFlags.devicecoherent ||
|
||||
coherentFlags.queuefamilycoherent ||
|
||||
coherentFlags.workgroupcoherent ||
|
||||
coherentFlags.subgroupcoherent) {
|
||||
if (coherentFlags.isVolatile() || coherentFlags.anyCoherent()) {
|
||||
mask = mask | spv::MemoryAccessMakePointerAvailableKHRMask |
|
||||
spv::MemoryAccessMakePointerVisibleKHRMask;
|
||||
}
|
||||
|
||||
if (coherentFlags.nonprivate) {
|
||||
mask = mask | spv::MemoryAccessNonPrivatePointerKHRMask;
|
||||
}
|
||||
@ -576,11 +572,7 @@ spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands(
|
||||
return mask;
|
||||
|
||||
if (coherentFlags.volatil ||
|
||||
coherentFlags.coherent ||
|
||||
coherentFlags.devicecoherent ||
|
||||
coherentFlags.queuefamilycoherent ||
|
||||
coherentFlags.workgroupcoherent ||
|
||||
coherentFlags.subgroupcoherent) {
|
||||
coherentFlags.anyCoherent()) {
|
||||
mask = mask | spv::ImageOperandsMakeTexelAvailableKHRMask |
|
||||
spv::ImageOperandsMakeTexelVisibleKHRMask;
|
||||
}
|
||||
@ -609,14 +601,11 @@ spv::Builder::AccessChain::CoherentFlags TGlslangToSpvTraverser::TranslateCohere
|
||||
flags.workgroupcoherent = type.getQualifier().workgroupcoherent ||
|
||||
type.getQualifier().storage == glslang::EvqShared;
|
||||
flags.subgroupcoherent = type.getQualifier().subgroupcoherent;
|
||||
flags.shadercallcoherent = type.getQualifier().shadercallcoherent;
|
||||
flags.volatil = type.getQualifier().volatil;
|
||||
// *coherent variables are implicitly nonprivate in GLSL
|
||||
flags.nonprivate = type.getQualifier().nonprivate ||
|
||||
flags.subgroupcoherent ||
|
||||
flags.workgroupcoherent ||
|
||||
flags.queuefamilycoherent ||
|
||||
flags.devicecoherent ||
|
||||
flags.coherent ||
|
||||
flags.anyCoherent() ||
|
||||
flags.volatil;
|
||||
flags.isImage = type.getBasicType() == glslang::EbtSampler;
|
||||
#endif
|
||||
@ -640,6 +629,8 @@ spv::Scope TGlslangToSpvTraverser::TranslateMemoryScope(
|
||||
scope = spv::ScopeWorkgroup;
|
||||
} else if (coherentFlags.subgroupcoherent) {
|
||||
scope = spv::ScopeSubgroup;
|
||||
} else if (coherentFlags.shadercallcoherent) {
|
||||
scope = spv::ScopeShaderCallKHR;
|
||||
}
|
||||
if (glslangIntermediate->usingVulkanMemoryModel() && scope == spv::ScopeDevice) {
|
||||
builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
|
||||
@ -948,34 +939,38 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
||||
return spv::BuiltInInvocationsPerPixelNV;
|
||||
|
||||
// ray tracing
|
||||
case glslang::EbvLaunchIdNV:
|
||||
return spv::BuiltInLaunchIdNV;
|
||||
case glslang::EbvLaunchSizeNV:
|
||||
return spv::BuiltInLaunchSizeNV;
|
||||
case glslang::EbvWorldRayOriginNV:
|
||||
return spv::BuiltInWorldRayOriginNV;
|
||||
case glslang::EbvWorldRayDirectionNV:
|
||||
return spv::BuiltInWorldRayDirectionNV;
|
||||
case glslang::EbvObjectRayOriginNV:
|
||||
return spv::BuiltInObjectRayOriginNV;
|
||||
case glslang::EbvObjectRayDirectionNV:
|
||||
return spv::BuiltInObjectRayDirectionNV;
|
||||
case glslang::EbvRayTminNV:
|
||||
return spv::BuiltInRayTminNV;
|
||||
case glslang::EbvRayTmaxNV:
|
||||
return spv::BuiltInRayTmaxNV;
|
||||
case glslang::EbvInstanceCustomIndexNV:
|
||||
return spv::BuiltInInstanceCustomIndexNV;
|
||||
case glslang::EbvHitTNV:
|
||||
return spv::BuiltInHitTNV;
|
||||
case glslang::EbvHitKindNV:
|
||||
return spv::BuiltInHitKindNV;
|
||||
case glslang::EbvObjectToWorldNV:
|
||||
return spv::BuiltInObjectToWorldNV;
|
||||
case glslang::EbvWorldToObjectNV:
|
||||
return spv::BuiltInWorldToObjectNV;
|
||||
case glslang::EbvIncomingRayFlagsNV:
|
||||
return spv::BuiltInIncomingRayFlagsNV;
|
||||
case glslang::EbvLaunchId:
|
||||
return spv::BuiltInLaunchIdKHR;
|
||||
case glslang::EbvLaunchSize:
|
||||
return spv::BuiltInLaunchSizeKHR;
|
||||
case glslang::EbvWorldRayOrigin:
|
||||
return spv::BuiltInWorldRayOriginKHR;
|
||||
case glslang::EbvWorldRayDirection:
|
||||
return spv::BuiltInWorldRayDirectionKHR;
|
||||
case glslang::EbvObjectRayOrigin:
|
||||
return spv::BuiltInObjectRayOriginKHR;
|
||||
case glslang::EbvObjectRayDirection:
|
||||
return spv::BuiltInObjectRayDirectionKHR;
|
||||
case glslang::EbvRayTmin:
|
||||
return spv::BuiltInRayTminKHR;
|
||||
case glslang::EbvRayTmax:
|
||||
return spv::BuiltInRayTmaxKHR;
|
||||
case glslang::EbvInstanceCustomIndex:
|
||||
return spv::BuiltInInstanceCustomIndexKHR;
|
||||
case glslang::EbvHitT:
|
||||
return spv::BuiltInHitTKHR;
|
||||
case glslang::EbvHitKind:
|
||||
return spv::BuiltInHitKindKHR;
|
||||
case glslang::EbvObjectToWorld:
|
||||
case glslang::EbvObjectToWorld3x4:
|
||||
return spv::BuiltInObjectToWorldKHR;
|
||||
case glslang::EbvWorldToObject:
|
||||
case glslang::EbvWorldToObject3x4:
|
||||
return spv::BuiltInWorldToObjectKHR;
|
||||
case glslang::EbvIncomingRayFlags:
|
||||
return spv::BuiltInIncomingRayFlagsKHR;
|
||||
case glslang::EbvGeometryIndex:
|
||||
return spv::BuiltInRayGeometryIndexKHR;
|
||||
|
||||
// barycentrics
|
||||
case glslang::EbvBaryCoordNV:
|
||||
@ -1200,8 +1195,8 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
||||
}
|
||||
|
||||
if (type.getQualifier().isUniformOrBuffer() &&
|
||||
type.getQualifier().isShaderRecordNV()) {
|
||||
return spv::StorageClassShaderRecordBufferNV;
|
||||
type.getQualifier().isShaderRecord()) {
|
||||
return spv::StorageClassShaderRecordBufferKHR;
|
||||
}
|
||||
|
||||
if (glslangIntermediate->usingStorageBuffer() && type.getQualifier().storage == glslang::EvqBuffer) {
|
||||
@ -1223,11 +1218,11 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
||||
case glslang::EvqTemporary: return spv::StorageClassFunction;
|
||||
case glslang::EvqShared: return spv::StorageClassWorkgroup;
|
||||
#ifndef GLSLANG_WEB
|
||||
case glslang::EvqPayloadNV: return spv::StorageClassRayPayloadNV;
|
||||
case glslang::EvqPayloadInNV: return spv::StorageClassIncomingRayPayloadNV;
|
||||
case glslang::EvqHitAttrNV: return spv::StorageClassHitAttributeNV;
|
||||
case glslang::EvqCallableDataNV: return spv::StorageClassCallableDataNV;
|
||||
case glslang::EvqCallableDataInNV: return spv::StorageClassIncomingCallableDataNV;
|
||||
case glslang::EvqPayload: return spv::StorageClassRayPayloadKHR;
|
||||
case glslang::EvqPayloadIn: return spv::StorageClassIncomingRayPayloadKHR;
|
||||
case glslang::EvqHitAttr: return spv::StorageClassHitAttributeKHR;
|
||||
case glslang::EvqCallableData: return spv::StorageClassCallableDataKHR;
|
||||
case glslang::EvqCallableDataIn: return spv::StorageClassIncomingCallableDataKHR;
|
||||
#endif
|
||||
default:
|
||||
assert(0);
|
||||
@ -1287,7 +1282,7 @@ bool IsDescriptorResource(const glslang::TType& type)
|
||||
// uniform and buffer blocks are included, unless it is a push_constant
|
||||
if (type.getBasicType() == glslang::EbtBlock)
|
||||
return type.getQualifier().isUniformOrBuffer() &&
|
||||
! type.getQualifier().isShaderRecordNV() &&
|
||||
! type.getQualifier().isShaderRecord() &&
|
||||
! type.getQualifier().isPushConstant();
|
||||
|
||||
// non block...
|
||||
@ -1337,6 +1332,8 @@ void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& pa
|
||||
child.workgroupcoherent = true;
|
||||
if (parent.subgroupcoherent)
|
||||
child.subgroupcoherent = true;
|
||||
if (parent.shadercallcoherent)
|
||||
child.shadercallcoherent = true;
|
||||
if (parent.nonprivate)
|
||||
child.nonprivate = true;
|
||||
if (parent.volatil)
|
||||
@ -1602,15 +1599,24 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices());
|
||||
break;
|
||||
|
||||
case EShLangRayGenNV:
|
||||
case EShLangIntersectNV:
|
||||
case EShLangAnyHitNV:
|
||||
case EShLangClosestHitNV:
|
||||
case EShLangMissNV:
|
||||
case EShLangCallableNV:
|
||||
builder.addCapability(spv::CapabilityRayTracingNV);
|
||||
builder.addExtension("SPV_NV_ray_tracing");
|
||||
case EShLangRayGen:
|
||||
case EShLangIntersect:
|
||||
case EShLangAnyHit:
|
||||
case EShLangClosestHit:
|
||||
case EShLangMiss:
|
||||
case EShLangCallable:
|
||||
{
|
||||
auto& extensions = glslangIntermediate->getRequestedExtensions();
|
||||
if (extensions.find("GL_NV_ray_tracing") == extensions.end()) {
|
||||
builder.addCapability(spv::CapabilityRayTracingProvisionalKHR);
|
||||
builder.addExtension("SPV_KHR_ray_tracing");
|
||||
}
|
||||
else {
|
||||
builder.addCapability(spv::CapabilityRayTracingNV);
|
||||
builder.addExtension("SPV_NV_ray_tracing");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EShLangTaskNV:
|
||||
case EShLangMeshNV:
|
||||
builder.addCapability(spv::CapabilityMeshShadingNV);
|
||||
@ -1709,7 +1715,8 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
|
||||
}
|
||||
}
|
||||
|
||||
// If the SPIR-V type is required to be different than the AST type,
|
||||
// If the SPIR-V type is required to be different than the AST type
|
||||
// (for ex SubgroupMasks or 3x4 ObjectToWorld/WorldToObject matrices),
|
||||
// translate now from the SPIR-V type to the AST type, for the consuming
|
||||
// operation.
|
||||
// Note this turns it from an l-value to an r-value.
|
||||
@ -2014,16 +2021,16 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
|
||||
// Figure out what, if any, type changes are needed when accessing a specific built-in.
|
||||
// Returns <the type SPIR-V requires for declarion, the type to translate to on use>.
|
||||
// Also see comment for 'forceType', regarding tracking SPIR-V-required types.
|
||||
std::pair<spv::Id, spv::Id> TGlslangToSpvTraverser::getForcedType(spv::BuiltIn builtIn,
|
||||
std::pair<spv::Id, spv::Id> TGlslangToSpvTraverser::getForcedType(glslang::TBuiltInVariable glslangBuiltIn,
|
||||
const glslang::TType& glslangType)
|
||||
{
|
||||
switch(builtIn)
|
||||
switch(glslangBuiltIn)
|
||||
{
|
||||
case spv::BuiltInSubgroupEqMask:
|
||||
case spv::BuiltInSubgroupGeMask:
|
||||
case spv::BuiltInSubgroupGtMask:
|
||||
case spv::BuiltInSubgroupLeMask:
|
||||
case spv::BuiltInSubgroupLtMask: {
|
||||
case glslang::EbvSubGroupEqMask:
|
||||
case glslang::EbvSubGroupGeMask:
|
||||
case glslang::EbvSubGroupGtMask:
|
||||
case glslang::EbvSubGroupLeMask:
|
||||
case glslang::EbvSubGroupLtMask: {
|
||||
// these require changing a 64-bit scaler -> a vector of 32-bit components
|
||||
if (glslangType.isVector())
|
||||
break;
|
||||
@ -2031,6 +2038,15 @@ std::pair<spv::Id, spv::Id> TGlslangToSpvTraverser::getForcedType(spv::BuiltIn b
|
||||
builder.makeUintType(64));
|
||||
return ret;
|
||||
}
|
||||
// There are no SPIR-V builtins defined for these and map onto original non-transposed
|
||||
// builtins. During visitBinary we insert a transpose
|
||||
case glslang::EbvWorldToObject3x4:
|
||||
case glslang::EbvObjectToWorld3x4: {
|
||||
std::pair<spv::Id, spv::Id> ret(builder.makeMatrixType(builder.makeFloatType(32), 4, 3),
|
||||
builder.makeMatrixType(builder.makeFloatType(32), 3, 4)
|
||||
);
|
||||
return ret;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -2069,7 +2085,15 @@ spv::Id TGlslangToSpvTraverser::translateForcedType(spv::Id object)
|
||||
} else {
|
||||
logger->missingFunctionality("forcing 32-bit vector type to non 64-bit scalar");
|
||||
}
|
||||
} else {
|
||||
} else if (builder.isMatrixType(objectTypeId)) {
|
||||
// There are no SPIR-V builtins defined for 3x4 variants of ObjectToWorld/WorldToObject
|
||||
// and we insert a transpose after loading the original non-transposed builtins
|
||||
builder.clearAccessChain();
|
||||
builder.setAccessChainLValue(object);
|
||||
object = builder.accessChainLoad(spv::NoPrecision, spv::DecorationMax, objectTypeId);
|
||||
return builder.createUnaryOp(spv::OpTranspose, desiredTypeId, object);
|
||||
|
||||
} else {
|
||||
logger->missingFunctionality("forcing non 32-bit vector type");
|
||||
}
|
||||
|
||||
@ -2672,10 +2696,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
binOp = node->getOp();
|
||||
break;
|
||||
|
||||
case glslang::EOpIgnoreIntersectionNV:
|
||||
case glslang::EOpTerminateRayNV:
|
||||
case glslang::EOpTraceNV:
|
||||
case glslang::EOpExecuteCallableNV:
|
||||
case glslang::EOpIgnoreIntersection:
|
||||
case glslang::EOpTerminateRay:
|
||||
case glslang::EOpTrace:
|
||||
case glslang::EOpExecuteCallable:
|
||||
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
||||
noReturnValue = true;
|
||||
break;
|
||||
@ -3522,8 +3546,8 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
||||
builder.addCapability(spv::CapabilityAtomicStorage);
|
||||
spvType = builder.makeUintType(32);
|
||||
break;
|
||||
case glslang::EbtAccStructNV:
|
||||
spvType = builder.makeAccelerationStructureNVType();
|
||||
case glslang::EbtAccStruct:
|
||||
spvType = builder.makeAccelerationStructureType();
|
||||
break;
|
||||
case glslang::EbtReference:
|
||||
{
|
||||
@ -7573,21 +7597,21 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
||||
libCall = spv::InterpolateAtVertexAMD;
|
||||
break;
|
||||
|
||||
case glslang::EOpReportIntersectionNV:
|
||||
case glslang::EOpReportIntersection:
|
||||
{
|
||||
typeId = builder.makeBoolType();
|
||||
opCode = spv::OpReportIntersectionNV;
|
||||
opCode = spv::OpReportIntersectionKHR;
|
||||
}
|
||||
break;
|
||||
case glslang::EOpTraceNV:
|
||||
case glslang::EOpTrace:
|
||||
{
|
||||
builder.createNoResultOp(spv::OpTraceNV, operands);
|
||||
builder.createNoResultOp(spv::OpTraceRayKHR, operands);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case glslang::EOpExecuteCallableNV:
|
||||
case glslang::EOpExecuteCallable:
|
||||
{
|
||||
builder.createNoResultOp(spv::OpExecuteCallableNV, operands);
|
||||
builder.createNoResultOp(spv::OpExecuteCallableKHR, operands);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
@ -7787,11 +7811,11 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
|
||||
spv::Id id = builder.createBuiltinCall(typeId, getExtBuiltins(spv::E_SPV_AMD_gcn_shader), spv::TimeAMD, args);
|
||||
return builder.setPrecision(id, precision);
|
||||
}
|
||||
case glslang::EOpIgnoreIntersectionNV:
|
||||
builder.createNoResultOp(spv::OpIgnoreIntersectionNV);
|
||||
case glslang::EOpIgnoreIntersection:
|
||||
builder.createNoResultOp(spv::OpIgnoreIntersectionKHR);
|
||||
return 0;
|
||||
case glslang::EOpTerminateRayNV:
|
||||
builder.createNoResultOp(spv::OpTerminateRayNV);
|
||||
case glslang::EOpTerminateRay:
|
||||
builder.createNoResultOp(spv::OpTerminateRayKHR);
|
||||
return 0;
|
||||
|
||||
case glslang::EOpBeginInvocationInterlock:
|
||||
@ -7845,7 +7869,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
||||
|
||||
// it was not found, create it
|
||||
spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false);
|
||||
auto forcedType = getForcedType(builtIn, symbol->getType());
|
||||
auto forcedType = getForcedType(symbol->getQualifier().builtIn, symbol->getType());
|
||||
id = createSpvVariable(symbol, forcedType.first);
|
||||
symbolValues[symbol->getId()] = id;
|
||||
if (forcedType.second != spv::NoType)
|
||||
|
@ -602,16 +602,16 @@ Id Builder::makeSampledImageType(Id imageType)
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
Id Builder::makeAccelerationStructureNVType()
|
||||
Id Builder::makeAccelerationStructureType()
|
||||
{
|
||||
Instruction *type;
|
||||
if (groupedTypes[OpTypeAccelerationStructureNV].size() == 0) {
|
||||
type = new Instruction(getUniqueId(), NoType, OpTypeAccelerationStructureNV);
|
||||
groupedTypes[OpTypeAccelerationStructureNV].push_back(type);
|
||||
if (groupedTypes[OpTypeAccelerationStructureKHR].size() == 0) {
|
||||
type = new Instruction(getUniqueId(), NoType, OpTypeAccelerationStructureKHR);
|
||||
groupedTypes[OpTypeAccelerationStructureKHR].push_back(type);
|
||||
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||
module.mapInstruction(type);
|
||||
} else {
|
||||
type = groupedTypes[OpTypeAccelerationStructureNV].back();
|
||||
type = groupedTypes[OpTypeAccelerationStructureKHR].back();
|
||||
}
|
||||
|
||||
return type->getResultId();
|
||||
|
@ -182,7 +182,7 @@ public:
|
||||
Id makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols);
|
||||
|
||||
// accelerationStructureNV type
|
||||
Id makeAccelerationStructureNVType();
|
||||
Id makeAccelerationStructureType();
|
||||
|
||||
// For querying about types.
|
||||
Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
|
||||
@ -605,12 +605,17 @@ public:
|
||||
CoherentFlags operator |=(const CoherentFlags &other) { return *this; }
|
||||
#else
|
||||
bool isVolatile() const { return volatil; }
|
||||
bool anyCoherent() const {
|
||||
return coherent || devicecoherent || queuefamilycoherent || workgroupcoherent ||
|
||||
subgroupcoherent || shadercallcoherent;
|
||||
}
|
||||
|
||||
unsigned coherent : 1;
|
||||
unsigned devicecoherent : 1;
|
||||
unsigned queuefamilycoherent : 1;
|
||||
unsigned workgroupcoherent : 1;
|
||||
unsigned subgroupcoherent : 1;
|
||||
unsigned shadercallcoherent : 1;
|
||||
unsigned nonprivate : 1;
|
||||
unsigned volatil : 1;
|
||||
unsigned isImage : 1;
|
||||
@ -621,6 +626,7 @@ public:
|
||||
queuefamilycoherent = 0;
|
||||
workgroupcoherent = 0;
|
||||
subgroupcoherent = 0;
|
||||
shadercallcoherent = 0;
|
||||
nonprivate = 0;
|
||||
volatil = 0;
|
||||
isImage = 0;
|
||||
@ -632,6 +638,7 @@ public:
|
||||
queuefamilycoherent |= other.queuefamilycoherent;
|
||||
workgroupcoherent |= other.workgroupcoherent;
|
||||
subgroupcoherent |= other.subgroupcoherent;
|
||||
shadercallcoherent |= other.shadercallcoherent;
|
||||
nonprivate |= other.nonprivate;
|
||||
volatil |= other.volatil;
|
||||
isImage |= other.isImage;
|
||||
|
124
SPIRV/doc.cpp
124
SPIRV/doc.cpp
@ -99,12 +99,12 @@ const char* ExecutionModelString(int model)
|
||||
|
||||
default: return "Bad";
|
||||
|
||||
case ExecutionModelRayGenerationNV: return "RayGenerationNV";
|
||||
case ExecutionModelIntersectionNV: return "IntersectionNV";
|
||||
case ExecutionModelAnyHitNV: return "AnyHitNV";
|
||||
case ExecutionModelClosestHitNV: return "ClosestHitNV";
|
||||
case ExecutionModelMissNV: return "MissNV";
|
||||
case ExecutionModelCallableNV: return "CallableNV";
|
||||
case ExecutionModelRayGenerationKHR: return "RayGenerationKHR";
|
||||
case ExecutionModelIntersectionKHR: return "IntersectionKHR";
|
||||
case ExecutionModelAnyHitKHR: return "AnyHitKHR";
|
||||
case ExecutionModelClosestHitKHR: return "ClosestHitKHR";
|
||||
case ExecutionModelMissKHR: return "MissKHR";
|
||||
case ExecutionModelCallableKHR: return "CallableKHR";
|
||||
}
|
||||
}
|
||||
|
||||
@ -209,12 +209,12 @@ const char* StorageClassString(int StorageClass)
|
||||
case 11: return "Image";
|
||||
case 12: return "StorageBuffer";
|
||||
|
||||
case StorageClassRayPayloadNV: return "RayPayloadNV";
|
||||
case StorageClassHitAttributeNV: return "HitAttributeNV";
|
||||
case StorageClassIncomingRayPayloadNV: return "IncomingRayPayloadNV";
|
||||
case StorageClassShaderRecordBufferNV: return "ShaderRecordBufferNV";
|
||||
case StorageClassCallableDataNV: return "CallableDataNV";
|
||||
case StorageClassIncomingCallableDataNV: return "IncomingCallableDataNV";
|
||||
case StorageClassRayPayloadKHR: return "RayPayloadKHR";
|
||||
case StorageClassHitAttributeKHR: return "HitAttributeKHR";
|
||||
case StorageClassIncomingRayPayloadKHR: return "IncomingRayPayloadKHR";
|
||||
case StorageClassShaderRecordBufferKHR: return "ShaderRecordBufferKHR";
|
||||
case StorageClassCallableDataKHR: return "CallableDataKHR";
|
||||
case StorageClassIncomingCallableDataKHR: return "IncomingCallableDataKHR";
|
||||
|
||||
case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
|
||||
|
||||
@ -361,32 +361,33 @@ const char* BuiltInString(int builtIn)
|
||||
case 4996: return "BaryCoordSmoothCentroidAMD";
|
||||
case 4997: return "BaryCoordSmoothSampleAMD";
|
||||
case 4998: return "BaryCoordPullModelAMD";
|
||||
case BuiltInLaunchIdNV: return "LaunchIdNV";
|
||||
case BuiltInLaunchSizeNV: return "LaunchSizeNV";
|
||||
case BuiltInWorldRayOriginNV: return "WorldRayOriginNV";
|
||||
case BuiltInWorldRayDirectionNV: return "WorldRayDirectionNV";
|
||||
case BuiltInObjectRayOriginNV: return "ObjectRayOriginNV";
|
||||
case BuiltInObjectRayDirectionNV: return "ObjectRayDirectionNV";
|
||||
case BuiltInRayTminNV: return "RayTminNV";
|
||||
case BuiltInRayTmaxNV: return "RayTmaxNV";
|
||||
case BuiltInInstanceCustomIndexNV: return "InstanceCustomIndexNV";
|
||||
case BuiltInObjectToWorldNV: return "ObjectToWorldNV";
|
||||
case BuiltInWorldToObjectNV: return "WorldToObjectNV";
|
||||
case BuiltInHitTNV: return "HitTNV";
|
||||
case BuiltInHitKindNV: return "HitKindNV";
|
||||
case BuiltInIncomingRayFlagsNV: return "IncomingRayFlagsNV";
|
||||
case BuiltInViewportMaskNV: return "ViewportMaskNV";
|
||||
case BuiltInSecondaryPositionNV: return "SecondaryPositionNV";
|
||||
case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV";
|
||||
case BuiltInPositionPerViewNV: return "PositionPerViewNV";
|
||||
case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV";
|
||||
case BuiltInLaunchIdKHR: return "LaunchIdKHR";
|
||||
case BuiltInLaunchSizeKHR: return "LaunchSizeKHR";
|
||||
case BuiltInWorldRayOriginKHR: return "WorldRayOriginKHR";
|
||||
case BuiltInWorldRayDirectionKHR: return "WorldRayDirectionKHR";
|
||||
case BuiltInObjectRayOriginKHR: return "ObjectRayOriginKHR";
|
||||
case BuiltInObjectRayDirectionKHR: return "ObjectRayDirectionKHR";
|
||||
case BuiltInRayTminKHR: return "RayTminKHR";
|
||||
case BuiltInRayTmaxKHR: return "RayTmaxKHR";
|
||||
case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR";
|
||||
case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR";
|
||||
case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR";
|
||||
case BuiltInWorldToObjectKHR: return "WorldToObjectKHR";
|
||||
case BuiltInHitTKHR: return "HitTKHR";
|
||||
case BuiltInHitKindKHR: return "HitKindKHR";
|
||||
case BuiltInIncomingRayFlagsKHR: return "IncomingRayFlagsKHR";
|
||||
case BuiltInViewportMaskNV: return "ViewportMaskNV";
|
||||
case BuiltInSecondaryPositionNV: return "SecondaryPositionNV";
|
||||
case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV";
|
||||
case BuiltInPositionPerViewNV: return "PositionPerViewNV";
|
||||
case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV";
|
||||
// case BuiltInFragmentSizeNV: return "FragmentSizeNV"; // superseded by BuiltInFragSizeEXT
|
||||
// case BuiltInInvocationsPerPixelNV: return "InvocationsPerPixelNV"; // superseded by BuiltInFragInvocationCountEXT
|
||||
case BuiltInBaryCoordNV: return "BaryCoordNV";
|
||||
case BuiltInBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
|
||||
case BuiltInBaryCoordNV: return "BaryCoordNV";
|
||||
case BuiltInBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
|
||||
|
||||
case BuiltInFragSizeEXT: return "FragSizeEXT";
|
||||
case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT";
|
||||
case BuiltInFragSizeEXT: return "FragSizeEXT";
|
||||
case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT";
|
||||
|
||||
case 5264: return "FullyCoveredEXT";
|
||||
|
||||
@ -890,6 +891,7 @@ const char* CapabilityString(int info)
|
||||
case CapabilityPerViewAttributesNV: return "PerViewAttributesNV";
|
||||
case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV";
|
||||
case CapabilityRayTracingNV: return "RayTracingNV";
|
||||
case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR";
|
||||
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
|
||||
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
|
||||
case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
|
||||
@ -1326,12 +1328,12 @@ const char* OpcodeString(int op)
|
||||
case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE";
|
||||
|
||||
case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV";
|
||||
case OpReportIntersectionNV: return "OpReportIntersectionNV";
|
||||
case OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV";
|
||||
case OpTerminateRayNV: return "OpTerminateRayNV";
|
||||
case OpTraceNV: return "OpTraceNV";
|
||||
case OpTypeAccelerationStructureNV: return "OpTypeAccelerationStructureNV";
|
||||
case OpExecuteCallableNV: return "OpExecuteCallableNV";
|
||||
case OpReportIntersectionKHR: return "OpReportIntersectionKHR";
|
||||
case OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR";
|
||||
case OpTerminateRayKHR: return "OpTerminateRayKHR";
|
||||
case OpTraceRayKHR: return "OpTraceRayKHR";
|
||||
case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR";
|
||||
case OpExecuteCallableKHR: return "OpExecuteCallableKHR";
|
||||
case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV";
|
||||
case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
|
||||
|
||||
@ -2694,31 +2696,31 @@ void Parameterize()
|
||||
|
||||
InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X");
|
||||
|
||||
InstructionDesc[OpTypeAccelerationStructureNV].setResultAndType(true, false);
|
||||
InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
|
||||
|
||||
InstructionDesc[OpTraceNV].operands.push(OperandId, "'NV Acceleration Structure'");
|
||||
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Flags'");
|
||||
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Cull Mask'");
|
||||
InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Offset'");
|
||||
InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Stride'");
|
||||
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Miss Index'");
|
||||
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Origin'");
|
||||
InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Direction'");
|
||||
InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'");
|
||||
InstructionDesc[OpTraceNV].setResultAndType(false, false);
|
||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'NV Acceleration Structure'");
|
||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'");
|
||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'");
|
||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'");
|
||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Stride'");
|
||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Miss Index'");
|
||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Origin'");
|
||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Direction'");
|
||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Payload'");
|
||||
InstructionDesc[OpTraceRayKHR].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpReportIntersectionNV].operands.push(OperandId, "'Hit Parameter'");
|
||||
InstructionDesc[OpReportIntersectionNV].operands.push(OperandId, "'Hit Kind'");
|
||||
InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'");
|
||||
InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'");
|
||||
|
||||
InstructionDesc[OpIgnoreIntersectionNV].setResultAndType(false, false);
|
||||
InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpTerminateRayNV].setResultAndType(false, false);
|
||||
InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index");
|
||||
InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID");
|
||||
InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false);
|
||||
InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index");
|
||||
InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData ID");
|
||||
InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'");
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
|
||||
|
@ -258,12 +258,12 @@ const char* GetBinaryName(EShLanguage stage)
|
||||
case EShLangGeometry: name = "geom.spv"; break;
|
||||
case EShLangFragment: name = "frag.spv"; break;
|
||||
case EShLangCompute: name = "comp.spv"; break;
|
||||
case EShLangRayGenNV: name = "rgen.spv"; break;
|
||||
case EShLangIntersectNV: name = "rint.spv"; break;
|
||||
case EShLangAnyHitNV: name = "rahit.spv"; break;
|
||||
case EShLangClosestHitNV: name = "rchit.spv"; break;
|
||||
case EShLangMissNV: name = "rmiss.spv"; break;
|
||||
case EShLangCallableNV: name = "rcall.spv"; break;
|
||||
case EShLangRayGen: name = "rgen.spv"; break;
|
||||
case EShLangIntersect: name = "rint.spv"; break;
|
||||
case EShLangAnyHit: name = "rahit.spv"; break;
|
||||
case EShLangClosestHit: name = "rchit.spv"; break;
|
||||
case EShLangMiss: name = "rmiss.spv"; break;
|
||||
case EShLangCallable: name = "rcall.spv"; break;
|
||||
case EShLangMeshNV: name = "mesh.spv"; break;
|
||||
case EShLangTaskNV: name = "task.spv"; break;
|
||||
default: name = "unknown"; break;
|
||||
@ -1429,17 +1429,17 @@ EShLanguage FindLanguage(const std::string& name, bool parseStageName)
|
||||
else if (stageName == "comp")
|
||||
return EShLangCompute;
|
||||
else if (stageName == "rgen")
|
||||
return EShLangRayGenNV;
|
||||
return EShLangRayGen;
|
||||
else if (stageName == "rint")
|
||||
return EShLangIntersectNV;
|
||||
return EShLangIntersect;
|
||||
else if (stageName == "rahit")
|
||||
return EShLangAnyHitNV;
|
||||
return EShLangAnyHit;
|
||||
else if (stageName == "rchit")
|
||||
return EShLangClosestHitNV;
|
||||
return EShLangClosestHit;
|
||||
else if (stageName == "rmiss")
|
||||
return EShLangMissNV;
|
||||
return EShLangMiss;
|
||||
else if (stageName == "rcall")
|
||||
return EShLangCallableNV;
|
||||
return EShLangCallable;
|
||||
else if (stageName == "mesh")
|
||||
return EShLangMeshNV;
|
||||
else if (stageName == "task")
|
||||
|
@ -7,7 +7,7 @@ spv.AnyHitShader.rahit
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint AnyHitNV 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67
|
||||
EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
@ -42,21 +42,21 @@ spv.AnyHitShader.rahit
|
||||
Name 66 "v14"
|
||||
Name 67 "gl_WorldToObjectNV"
|
||||
Name 71 "incomingPayload"
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdNV
|
||||
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeNV
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||
Decorate 23(gl_InstanceID) BuiltIn InstanceId
|
||||
Decorate 26(gl_InstanceCustomIndexNV) BuiltIn InstanceCustomIndexNV
|
||||
Decorate 33(gl_WorldRayOriginNV) BuiltIn WorldRayOriginNV
|
||||
Decorate 36(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionNV
|
||||
Decorate 39(gl_ObjectRayOriginNV) BuiltIn ObjectRayOriginNV
|
||||
Decorate 42(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionNV
|
||||
Decorate 47(gl_RayTminNV) BuiltIn RayTminNV
|
||||
Decorate 50(gl_RayTmaxNV) BuiltIn RayTmaxNV
|
||||
Decorate 53(gl_HitTNV) BuiltIn HitTNV
|
||||
Decorate 58(gl_HitKindNV) BuiltIn HitKindNV
|
||||
Decorate 64(gl_ObjectToWorldNV) BuiltIn ObjectToWorldNV
|
||||
Decorate 67(gl_WorldToObjectNV) BuiltIn WorldToObjectNV
|
||||
Decorate 26(gl_InstanceCustomIndexNV) BuiltIn InstanceCustomIndexKHR
|
||||
Decorate 33(gl_WorldRayOriginNV) BuiltIn WorldRayOriginKHR
|
||||
Decorate 36(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionKHR
|
||||
Decorate 39(gl_ObjectRayOriginNV) BuiltIn ObjectRayOriginKHR
|
||||
Decorate 42(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionKHR
|
||||
Decorate 47(gl_RayTminNV) BuiltIn RayTminKHR
|
||||
Decorate 50(gl_RayTmaxNV) BuiltIn RayTmaxKHR
|
||||
Decorate 53(gl_HitTNV) BuiltIn HitTKHR
|
||||
Decorate 58(gl_HitKindNV) BuiltIn HitKindKHR
|
||||
Decorate 64(gl_ObjectToWorldNV) BuiltIn ObjectToWorldKHR
|
||||
Decorate 67(gl_WorldToObjectNV) BuiltIn WorldToObjectKHR
|
||||
Decorate 71(incomingPayload) Location 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
@ -94,8 +94,8 @@ spv.AnyHitShader.rahit
|
||||
64(gl_ObjectToWorldNV): 63(ptr) Variable Input
|
||||
67(gl_WorldToObjectNV): 63(ptr) Variable Input
|
||||
69: TypeVector 28(float) 4
|
||||
70: TypePointer IncomingRayPayloadNV 69(fvec4)
|
||||
71(incomingPayload): 70(ptr) Variable IncomingRayPayloadNV
|
||||
70: TypePointer IncomingRayPayloadKHR 69(fvec4)
|
||||
71(incomingPayload): 70(ptr) Variable IncomingRayPayloadKHR
|
||||
72: 28(float) Constant 1056964608
|
||||
73: 69(fvec4) ConstantComposite 72 72 72 72
|
||||
75: 16(int) Constant 1
|
||||
@ -153,10 +153,10 @@ spv.AnyHitShader.rahit
|
||||
SelectionMerge 79 None
|
||||
BranchConditional 77 78 80
|
||||
78: Label
|
||||
IgnoreIntersectionNV
|
||||
IgnoreIntersectionKHR
|
||||
Branch 79
|
||||
80: Label
|
||||
TerminateRayNV
|
||||
TerminateRayKHR
|
||||
Branch 79
|
||||
79: Label
|
||||
Return
|
||||
|
@ -7,7 +7,7 @@ spv.ClosestHitShader.rchit
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint ClosestHitNV 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67
|
||||
EntryPoint ClosestHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
@ -44,21 +44,21 @@ spv.ClosestHitShader.rchit
|
||||
Name 71 "accNV"
|
||||
Name 85 "localPayload"
|
||||
Name 87 "incomingPayload"
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdNV
|
||||
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeNV
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||
Decorate 23(gl_InstanceID) BuiltIn InstanceId
|
||||
Decorate 26(gl_InstanceCustomIndexNV) BuiltIn InstanceCustomIndexNV
|
||||
Decorate 33(gl_WorldRayOriginNV) BuiltIn WorldRayOriginNV
|
||||
Decorate 36(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionNV
|
||||
Decorate 39(gl_ObjectRayOriginNV) BuiltIn ObjectRayOriginNV
|
||||
Decorate 42(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionNV
|
||||
Decorate 47(gl_RayTminNV) BuiltIn RayTminNV
|
||||
Decorate 50(gl_RayTmaxNV) BuiltIn RayTmaxNV
|
||||
Decorate 53(gl_HitTNV) BuiltIn HitTNV
|
||||
Decorate 58(gl_HitKindNV) BuiltIn HitKindNV
|
||||
Decorate 64(gl_ObjectToWorldNV) BuiltIn ObjectToWorldNV
|
||||
Decorate 67(gl_WorldToObjectNV) BuiltIn WorldToObjectNV
|
||||
Decorate 26(gl_InstanceCustomIndexNV) BuiltIn InstanceCustomIndexKHR
|
||||
Decorate 33(gl_WorldRayOriginNV) BuiltIn WorldRayOriginKHR
|
||||
Decorate 36(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionKHR
|
||||
Decorate 39(gl_ObjectRayOriginNV) BuiltIn ObjectRayOriginKHR
|
||||
Decorate 42(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionKHR
|
||||
Decorate 47(gl_RayTminNV) BuiltIn RayTminKHR
|
||||
Decorate 50(gl_RayTmaxNV) BuiltIn RayTmaxKHR
|
||||
Decorate 53(gl_HitTNV) BuiltIn HitTKHR
|
||||
Decorate 58(gl_HitKindNV) BuiltIn HitKindKHR
|
||||
Decorate 64(gl_ObjectToWorldNV) BuiltIn ObjectToWorldKHR
|
||||
Decorate 67(gl_WorldToObjectNV) BuiltIn WorldToObjectKHR
|
||||
Decorate 71(accNV) DescriptorSet 0
|
||||
Decorate 71(accNV) Binding 0
|
||||
Decorate 85(localPayload) Location 0
|
||||
@ -98,7 +98,7 @@ spv.ClosestHitShader.rchit
|
||||
63: TypePointer Input 60
|
||||
64(gl_ObjectToWorldNV): 63(ptr) Variable Input
|
||||
67(gl_WorldToObjectNV): 63(ptr) Variable Input
|
||||
69: TypeAccelerationStructureNV
|
||||
69: TypeAccelerationStructureKHR
|
||||
70: TypePointer UniformConstant 69
|
||||
71(accNV): 70(ptr) Variable UniformConstant
|
||||
73: 6(int) Constant 0
|
||||
@ -112,10 +112,10 @@ spv.ClosestHitShader.rchit
|
||||
81: 28(float) Constant 1061158912
|
||||
82: 16(int) Constant 1
|
||||
83: TypeVector 28(float) 4
|
||||
84: TypePointer RayPayloadNV 83(fvec4)
|
||||
85(localPayload): 84(ptr) Variable RayPayloadNV
|
||||
86: TypePointer IncomingRayPayloadNV 83(fvec4)
|
||||
87(incomingPayload): 86(ptr) Variable IncomingRayPayloadNV
|
||||
84: TypePointer RayPayloadKHR 83(fvec4)
|
||||
85(localPayload): 84(ptr) Variable RayPayloadKHR
|
||||
86: TypePointer IncomingRayPayloadKHR 83(fvec4)
|
||||
87(incomingPayload): 86(ptr) Variable IncomingRayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(v0): 8(ptr) Variable Function
|
||||
@ -164,6 +164,6 @@ spv.ClosestHitShader.rchit
|
||||
68: 60 Load 67(gl_WorldToObjectNV)
|
||||
Store 66(v14) 68
|
||||
72: 69 Load 71(accNV)
|
||||
TraceNV 72 73 74 75 76 73 78 77 80 81 82
|
||||
TraceRayKHR 72 73 74 75 76 73 78 77 80 81 82
|
||||
Return
|
||||
FunctionEnd
|
||||
|
@ -7,7 +7,7 @@ spv.IntersectShader.rint
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint IntersectionNV 4 "main" 11 14 20 23 26 33 36 39 42 47 50 56 59
|
||||
EntryPoint IntersectionKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 56 59
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
@ -38,19 +38,19 @@ spv.IntersectShader.rint
|
||||
Name 58 "v12"
|
||||
Name 59 "gl_WorldToObjectNV"
|
||||
Name 63 "iAttr"
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdNV
|
||||
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeNV
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||
Decorate 23(gl_InstanceID) BuiltIn InstanceId
|
||||
Decorate 26(gl_InstanceCustomIndexNV) BuiltIn InstanceCustomIndexNV
|
||||
Decorate 33(gl_WorldRayOriginNV) BuiltIn WorldRayOriginNV
|
||||
Decorate 36(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionNV
|
||||
Decorate 39(gl_ObjectRayOriginNV) BuiltIn ObjectRayOriginNV
|
||||
Decorate 42(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionNV
|
||||
Decorate 47(gl_RayTminNV) BuiltIn RayTminNV
|
||||
Decorate 50(gl_RayTmaxNV) BuiltIn RayTmaxNV
|
||||
Decorate 56(gl_ObjectToWorldNV) BuiltIn ObjectToWorldNV
|
||||
Decorate 59(gl_WorldToObjectNV) BuiltIn WorldToObjectNV
|
||||
Decorate 26(gl_InstanceCustomIndexNV) BuiltIn InstanceCustomIndexKHR
|
||||
Decorate 33(gl_WorldRayOriginNV) BuiltIn WorldRayOriginKHR
|
||||
Decorate 36(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionKHR
|
||||
Decorate 39(gl_ObjectRayOriginNV) BuiltIn ObjectRayOriginKHR
|
||||
Decorate 42(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionKHR
|
||||
Decorate 47(gl_RayTminNV) BuiltIn RayTminKHR
|
||||
Decorate 50(gl_RayTmaxNV) BuiltIn RayTmaxKHR
|
||||
Decorate 56(gl_ObjectToWorldNV) BuiltIn ObjectToWorldKHR
|
||||
Decorate 59(gl_WorldToObjectNV) BuiltIn WorldToObjectKHR
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
@ -83,8 +83,8 @@ spv.IntersectShader.rint
|
||||
56(gl_ObjectToWorldNV): 55(ptr) Variable Input
|
||||
59(gl_WorldToObjectNV): 55(ptr) Variable Input
|
||||
61: TypeVector 28(float) 4
|
||||
62: TypePointer HitAttributeNV 61(fvec4)
|
||||
63(iAttr): 62(ptr) Variable HitAttributeNV
|
||||
62: TypePointer HitAttributeKHR 61(fvec4)
|
||||
63(iAttr): 62(ptr) Variable HitAttributeKHR
|
||||
64: 28(float) Constant 1056964608
|
||||
65: 28(float) Constant 0
|
||||
66: 28(float) Constant 1065353216
|
||||
@ -133,6 +133,6 @@ spv.IntersectShader.rint
|
||||
60: 52 Load 59(gl_WorldToObjectNV)
|
||||
Store 58(v12) 60
|
||||
Store 63(iAttr) 67
|
||||
70: 69(bool) ReportIntersectionNV 64 68
|
||||
70: 69(bool) ReportIntersectionKHR 64 68
|
||||
Return
|
||||
FunctionEnd
|
||||
|
@ -7,7 +7,7 @@ spv.MissShader.rmiss
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MissNV 4 "main" 11 14 21 24 27 30 35 38
|
||||
EntryPoint MissKHR 4 "main" 11 14 21 24 27 30 35 38
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
@ -30,14 +30,14 @@ spv.MissShader.rmiss
|
||||
Name 42 "accNV"
|
||||
Name 57 "localPayload"
|
||||
Name 59 "incomingPayload"
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdNV
|
||||
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeNV
|
||||
Decorate 21(gl_WorldRayOriginNV) BuiltIn WorldRayOriginNV
|
||||
Decorate 24(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionNV
|
||||
Decorate 27(gl_ObjectRayOriginNV) BuiltIn ObjectRayOriginNV
|
||||
Decorate 30(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionNV
|
||||
Decorate 35(gl_RayTminNV) BuiltIn RayTminNV
|
||||
Decorate 38(gl_RayTmaxNV) BuiltIn RayTmaxNV
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 21(gl_WorldRayOriginNV) BuiltIn WorldRayOriginKHR
|
||||
Decorate 24(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionKHR
|
||||
Decorate 27(gl_ObjectRayOriginNV) BuiltIn ObjectRayOriginKHR
|
||||
Decorate 30(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionKHR
|
||||
Decorate 35(gl_RayTminNV) BuiltIn RayTminKHR
|
||||
Decorate 38(gl_RayTmaxNV) BuiltIn RayTmaxKHR
|
||||
Decorate 42(accNV) DescriptorSet 0
|
||||
Decorate 42(accNV) Binding 0
|
||||
Decorate 57(localPayload) Location 0
|
||||
@ -62,7 +62,7 @@ spv.MissShader.rmiss
|
||||
34: TypePointer Input 16(float)
|
||||
35(gl_RayTminNV): 34(ptr) Variable Input
|
||||
38(gl_RayTmaxNV): 34(ptr) Variable Input
|
||||
40: TypeAccelerationStructureNV
|
||||
40: TypeAccelerationStructureKHR
|
||||
41: TypePointer UniformConstant 40
|
||||
42(accNV): 41(ptr) Variable UniformConstant
|
||||
44: 6(int) Constant 0
|
||||
@ -77,10 +77,10 @@ spv.MissShader.rmiss
|
||||
53: TypeInt 32 1
|
||||
54: 53(int) Constant 1
|
||||
55: TypeVector 16(float) 4
|
||||
56: TypePointer RayPayloadNV 55(fvec4)
|
||||
57(localPayload): 56(ptr) Variable RayPayloadNV
|
||||
58: TypePointer IncomingRayPayloadNV 55(fvec4)
|
||||
59(incomingPayload): 58(ptr) Variable IncomingRayPayloadNV
|
||||
56: TypePointer RayPayloadKHR 55(fvec4)
|
||||
57(localPayload): 56(ptr) Variable RayPayloadKHR
|
||||
58: TypePointer IncomingRayPayloadKHR 55(fvec4)
|
||||
59(incomingPayload): 58(ptr) Variable IncomingRayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(v0): 8(ptr) Variable Function
|
||||
@ -108,6 +108,6 @@ spv.MissShader.rmiss
|
||||
39: 16(float) Load 38(gl_RayTmaxNV)
|
||||
Store 37(v7) 39
|
||||
43: 40 Load 42(accNV)
|
||||
TraceNV 43 44 45 46 47 44 49 48 51 52 54
|
||||
TraceRayKHR 43 44 45 46 47 44 49 48 51 52 54
|
||||
Return
|
||||
FunctionEnd
|
||||
|
@ -7,7 +7,7 @@ spv.RayCallable.rcall
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint CallableNV 4 "main" 11 14
|
||||
EntryPoint CallableKHR 4 "main" 11 14
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
@ -19,8 +19,8 @@ spv.RayCallable.rcall
|
||||
MemberName 16(dataBlock) 0 "data1"
|
||||
Name 18 ""
|
||||
Name 29 "data0"
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdNV
|
||||
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeNV
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 16(dataBlock) Block
|
||||
Decorate 18 Location 1
|
||||
Decorate 29(data0) Location 0
|
||||
@ -33,18 +33,18 @@ spv.RayCallable.rcall
|
||||
11(gl_LaunchIDNV): 10(ptr) Variable Input
|
||||
14(gl_LaunchSizeNV): 10(ptr) Variable Input
|
||||
16(dataBlock): TypeStruct 6(int)
|
||||
17: TypePointer IncomingCallableDataNV 16(dataBlock)
|
||||
18: 17(ptr) Variable IncomingCallableDataNV
|
||||
17: TypePointer IncomingCallableDataKHR 16(dataBlock)
|
||||
18: 17(ptr) Variable IncomingCallableDataKHR
|
||||
19: TypeInt 32 1
|
||||
20: 19(int) Constant 0
|
||||
21: 6(int) Constant 256
|
||||
22: TypePointer IncomingCallableDataNV 6(int)
|
||||
22: TypePointer IncomingCallableDataKHR 6(int)
|
||||
24: 6(int) Constant 2
|
||||
25: 19(int) Constant 1
|
||||
26: TypeFloat 32
|
||||
27: TypeVector 26(float) 4
|
||||
28: TypePointer CallableDataNV 27(fvec4)
|
||||
29(data0): 28(ptr) Variable CallableDataNV
|
||||
28: TypePointer CallableDataKHR 27(fvec4)
|
||||
29(data0): 28(ptr) Variable CallableDataKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(id): 8(ptr) Variable Function
|
||||
@ -55,6 +55,6 @@ spv.RayCallable.rcall
|
||||
Store 13(size) 15
|
||||
23: 22(ptr) AccessChain 18 20
|
||||
Store 23 21
|
||||
ExecuteCallableNV 24 25
|
||||
ExecuteCallableKHR 24 25
|
||||
Return
|
||||
FunctionEnd
|
||||
|
@ -7,7 +7,7 @@ spv.RayConstants.rgen
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationNV 4 "main"
|
||||
EntryPoint RayGenerationKHR 4 "main"
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
@ -18,7 +18,7 @@ spv.RayConstants.rgen
|
||||
Decorate 26(payload) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeAccelerationStructureNV
|
||||
6: TypeAccelerationStructureKHR
|
||||
7: TypePointer UniformConstant 6
|
||||
8(accNV): 7(ptr) Variable UniformConstant
|
||||
10: TypeInt 32 0
|
||||
@ -36,11 +36,11 @@ spv.RayConstants.rgen
|
||||
22: TypeInt 32 1
|
||||
23: 22(int) Constant 1
|
||||
24: TypeVector 14(float) 4
|
||||
25: TypePointer RayPayloadNV 24(fvec4)
|
||||
26(payload): 25(ptr) Variable RayPayloadNV
|
||||
25: TypePointer RayPayloadKHR 24(fvec4)
|
||||
26(payload): 25(ptr) Variable RayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9: 6 Load 8(accNV)
|
||||
TraceNV 9 11 12 13 13 12 17 18 20 21 23
|
||||
TraceRayKHR 9 11 12 13 13 12 17 18 20 21 23
|
||||
Return
|
||||
FunctionEnd
|
||||
|
@ -7,7 +7,7 @@ spv.RayGenShader.rgen
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationNV 4 "main" 11 21
|
||||
EntryPoint RayGenerationKHR 4 "main" 11 21
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
@ -24,8 +24,8 @@ spv.RayGenShader.rgen
|
||||
Name 39 ""
|
||||
Name 50 "accNV1"
|
||||
Name 53 "payload"
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdNV
|
||||
Decorate 21(gl_LaunchSizeNV) BuiltIn LaunchSizeNV
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 21(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 29(accNV0) DescriptorSet 0
|
||||
Decorate 29(accNV0) Binding 0
|
||||
MemberDecorate 37(block) 0 Offset 0
|
||||
@ -45,24 +45,24 @@ spv.RayGenShader.rgen
|
||||
13: TypePointer Input 6(int)
|
||||
17: 6(int) Constant 1
|
||||
21(gl_LaunchSizeNV): 10(ptr) Variable Input
|
||||
27: TypeAccelerationStructureNV
|
||||
27: TypeAccelerationStructureKHR
|
||||
28: TypePointer UniformConstant 27
|
||||
29(accNV0): 28(ptr) Variable UniformConstant
|
||||
35: TypeFloat 32
|
||||
36: TypeVector 35(float) 3
|
||||
37(block): TypeStruct 36(fvec3) 36(fvec3)
|
||||
38: TypePointer ShaderRecordBufferNV 37(block)
|
||||
39: 38(ptr) Variable ShaderRecordBufferNV
|
||||
38: TypePointer ShaderRecordBufferKHR 37(block)
|
||||
39: 38(ptr) Variable ShaderRecordBufferKHR
|
||||
40: TypeInt 32 1
|
||||
41: 40(int) Constant 1
|
||||
42: TypePointer ShaderRecordBufferNV 36(fvec3)
|
||||
42: TypePointer ShaderRecordBufferKHR 36(fvec3)
|
||||
45: 35(float) Constant 1056964608
|
||||
46: 40(int) Constant 0
|
||||
49: 35(float) Constant 1061158912
|
||||
50(accNV1): 28(ptr) Variable UniformConstant
|
||||
51: TypeVector 35(float) 4
|
||||
52: TypePointer RayPayloadNV 51(fvec4)
|
||||
53(payload): 52(ptr) Variable RayPayloadNV
|
||||
52: TypePointer RayPayloadKHR 51(fvec4)
|
||||
53(payload): 52(ptr) Variable RayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(lx): 7(ptr) Variable Function
|
||||
@ -90,6 +90,6 @@ spv.RayGenShader.rgen
|
||||
44: 36(fvec3) Load 43
|
||||
47: 42(ptr) AccessChain 39 46
|
||||
48: 36(fvec3) Load 47
|
||||
TraceNV 30 31 32 33 34 12 44 45 48 49 41
|
||||
TraceRayKHR 30 31 32 33 34 12 44 45 48 49 41
|
||||
Return
|
||||
FunctionEnd
|
||||
|
@ -7,7 +7,7 @@ spv.RayGenShader11.rgen
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationNV 4 "main" 11 21
|
||||
EntryPoint RayGenerationKHR 4 "main" 11 21
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
@ -23,8 +23,8 @@ spv.RayGenShader11.rgen
|
||||
MemberName 37(block) 1 "origin"
|
||||
Name 39 ""
|
||||
Name 52 "payload"
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdNV
|
||||
Decorate 21(gl_LaunchSizeNV) BuiltIn LaunchSizeNV
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 21(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 29(accNV) DescriptorSet 0
|
||||
Decorate 29(accNV) Binding 0
|
||||
MemberDecorate 37(block) 0 Offset 0
|
||||
@ -42,23 +42,23 @@ spv.RayGenShader11.rgen
|
||||
13: TypePointer Input 6(int)
|
||||
17: 6(int) Constant 1
|
||||
21(gl_LaunchSizeNV): 10(ptr) Variable Input
|
||||
27: TypeAccelerationStructureNV
|
||||
27: TypeAccelerationStructureKHR
|
||||
28: TypePointer UniformConstant 27
|
||||
29(accNV): 28(ptr) Variable UniformConstant
|
||||
35: TypeFloat 32
|
||||
36: TypeVector 35(float) 3
|
||||
37(block): TypeStruct 36(fvec3) 36(fvec3)
|
||||
38: TypePointer ShaderRecordBufferNV 37(block)
|
||||
39: 38(ptr) Variable ShaderRecordBufferNV
|
||||
38: TypePointer ShaderRecordBufferKHR 37(block)
|
||||
39: 38(ptr) Variable ShaderRecordBufferKHR
|
||||
40: TypeInt 32 1
|
||||
41: 40(int) Constant 1
|
||||
42: TypePointer ShaderRecordBufferNV 36(fvec3)
|
||||
42: TypePointer ShaderRecordBufferKHR 36(fvec3)
|
||||
45: 35(float) Constant 1056964608
|
||||
46: 40(int) Constant 0
|
||||
49: 35(float) Constant 1061158912
|
||||
50: TypeVector 35(float) 4
|
||||
51: TypePointer RayPayloadNV 50(fvec4)
|
||||
52(payload): 51(ptr) Variable RayPayloadNV
|
||||
51: TypePointer RayPayloadKHR 50(fvec4)
|
||||
52(payload): 51(ptr) Variable RayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(lx): 7(ptr) Variable Function
|
||||
@ -86,6 +86,6 @@ spv.RayGenShader11.rgen
|
||||
44: 36(fvec3) Load 43
|
||||
47: 42(ptr) AccessChain 39 46
|
||||
48: 36(fvec3) Load 47
|
||||
TraceNV 30 31 32 33 34 12 44 45 48 49 41
|
||||
TraceRayKHR 30 31 32 33 34 12 44 45 48 49 41
|
||||
Return
|
||||
FunctionEnd
|
||||
|
@ -10,7 +10,7 @@ spv.RayGenShaderArray.rgen
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationNV 4 "main" 11 21
|
||||
EntryPoint RayGenerationKHR 4 "main" 11 21
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_nonuniform_qualifier"
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
@ -29,8 +29,8 @@ spv.RayGenShaderArray.rgen
|
||||
Name 36 ""
|
||||
Name 60 "accNV1"
|
||||
Name 88 "payload"
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdNV
|
||||
Decorate 21(gl_LaunchSizeNV) BuiltIn LaunchSizeNV
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 21(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 30(accNV0) DescriptorSet 0
|
||||
Decorate 30(accNV0) Binding 0
|
||||
MemberDecorate 34(block) 0 Offset 0
|
||||
@ -54,7 +54,7 @@ spv.RayGenShaderArray.rgen
|
||||
13: TypePointer Input 6(int)
|
||||
17: 6(int) Constant 1
|
||||
21(gl_LaunchSizeNV): 10(ptr) Variable Input
|
||||
27: TypeAccelerationStructureNV
|
||||
27: TypeAccelerationStructureKHR
|
||||
28: TypeRuntimeArray 27
|
||||
29: TypePointer UniformConstant 28
|
||||
30(accNV0): 29(ptr) Variable UniformConstant
|
||||
@ -62,13 +62,13 @@ spv.RayGenShaderArray.rgen
|
||||
32: TypeVector 31(float) 3
|
||||
33: TypeInt 32 1
|
||||
34(block): TypeStruct 32(fvec3) 32(fvec3) 33(int)
|
||||
35: TypePointer ShaderRecordBufferNV 34(block)
|
||||
36: 35(ptr) Variable ShaderRecordBufferNV
|
||||
35: TypePointer ShaderRecordBufferKHR 34(block)
|
||||
36: 35(ptr) Variable ShaderRecordBufferKHR
|
||||
37: 33(int) Constant 2
|
||||
38: TypePointer ShaderRecordBufferNV 33(int)
|
||||
38: TypePointer ShaderRecordBufferKHR 33(int)
|
||||
41: TypePointer UniformConstant 27
|
||||
48: 33(int) Constant 1
|
||||
49: TypePointer ShaderRecordBufferNV 32(fvec3)
|
||||
49: TypePointer ShaderRecordBufferKHR 32(fvec3)
|
||||
52: 31(float) Constant 1056964608
|
||||
53: 33(int) Constant 0
|
||||
56: 31(float) Constant 1061158912
|
||||
@ -77,8 +77,8 @@ spv.RayGenShaderArray.rgen
|
||||
59: TypePointer UniformConstant 58
|
||||
60(accNV1): 59(ptr) Variable UniformConstant
|
||||
86: TypeVector 31(float) 4
|
||||
87: TypePointer RayPayloadNV 86(fvec4)
|
||||
88(payload): 87(ptr) Variable RayPayloadNV
|
||||
87: TypePointer RayPayloadKHR 86(fvec4)
|
||||
88(payload): 87(ptr) Variable RayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(lx): 7(ptr) Variable Function
|
||||
@ -109,7 +109,7 @@ spv.RayGenShaderArray.rgen
|
||||
51: 32(fvec3) Load 50
|
||||
54: 49(ptr) AccessChain 36 53
|
||||
55: 32(fvec3) Load 54
|
||||
TraceNV 43 44 45 46 47 12 51 52 55 56 48
|
||||
TraceRayKHR 43 44 45 46 47 12 51 52 55 56 48
|
||||
61: 38(ptr) AccessChain 36 37
|
||||
62: 33(int) Load 61
|
||||
63: 41(ptr) AccessChain 60(accNV1) 62
|
||||
@ -122,7 +122,7 @@ spv.RayGenShaderArray.rgen
|
||||
70: 32(fvec3) Load 69
|
||||
71: 49(ptr) AccessChain 36 53
|
||||
72: 32(fvec3) Load 71
|
||||
TraceNV 64 65 66 67 68 12 70 52 72 56 48
|
||||
TraceRayKHR 64 65 66 67 68 12 70 52 72 56 48
|
||||
73: 38(ptr) AccessChain 36 37
|
||||
74: 33(int) Load 73
|
||||
75: 33(int) CopyObject 74
|
||||
@ -136,6 +136,6 @@ spv.RayGenShaderArray.rgen
|
||||
83: 32(fvec3) Load 82
|
||||
84: 49(ptr) AccessChain 36 53
|
||||
85: 32(fvec3) Load 84
|
||||
TraceNV 77 78 79 80 81 12 83 52 85 56 48
|
||||
TraceRayKHR 77 78 79 80 81 12 83 52 85 56 48
|
||||
Return
|
||||
FunctionEnd
|
||||
|
188
Test/baseResults/spv.ext.AnyHitShader.rahit.out
Normal file
188
Test/baseResults/spv.ext.AnyHitShader.rahit.out
Normal file
@ -0,0 +1,188 @@
|
||||
spv.ext.AnyHitShader.rahit
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 94
|
||||
|
||||
Capability RayTracingProvisionalKHR
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 76 80
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 9 "v0"
|
||||
Name 11 "gl_LaunchIDEXT"
|
||||
Name 13 "v1"
|
||||
Name 14 "gl_LaunchSizeEXT"
|
||||
Name 18 "v2"
|
||||
Name 20 "gl_PrimitiveID"
|
||||
Name 22 "v3"
|
||||
Name 23 "gl_InstanceID"
|
||||
Name 25 "v4"
|
||||
Name 26 "gl_InstanceCustomIndexEXT"
|
||||
Name 31 "v5"
|
||||
Name 33 "gl_WorldRayOriginEXT"
|
||||
Name 35 "v6"
|
||||
Name 36 "gl_WorldRayDirectionEXT"
|
||||
Name 38 "v7"
|
||||
Name 39 "gl_ObjectRayOriginEXT"
|
||||
Name 41 "v8"
|
||||
Name 42 "gl_ObjectRayDirectionEXT"
|
||||
Name 45 "v9"
|
||||
Name 47 "gl_RayTminEXT"
|
||||
Name 49 "v10"
|
||||
Name 50 "gl_RayTmaxEXT"
|
||||
Name 52 "v11"
|
||||
Name 53 "gl_HitTEXT"
|
||||
Name 56 "v12"
|
||||
Name 58 "gl_HitKindEXT"
|
||||
Name 62 "v13"
|
||||
Name 64 "gl_ObjectToWorldEXT"
|
||||
Name 66 "v14"
|
||||
Name 67 "gl_WorldToObjectEXT"
|
||||
Name 69 "v15"
|
||||
Name 70 "gl_GeometryIndexEXT"
|
||||
Name 75 "v16"
|
||||
Name 76 "gl_ObjectToWorld3x4EXT"
|
||||
Name 79 "v17"
|
||||
Name 80 "gl_WorldToObject3x4EXT"
|
||||
Name 84 "incomingPayload"
|
||||
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
||||
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
||||
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||
Decorate 23(gl_InstanceID) BuiltIn InstanceId
|
||||
Decorate 26(gl_InstanceCustomIndexEXT) BuiltIn InstanceCustomIndexKHR
|
||||
Decorate 33(gl_WorldRayOriginEXT) BuiltIn WorldRayOriginKHR
|
||||
Decorate 36(gl_WorldRayDirectionEXT) BuiltIn WorldRayDirectionKHR
|
||||
Decorate 39(gl_ObjectRayOriginEXT) BuiltIn ObjectRayOriginKHR
|
||||
Decorate 42(gl_ObjectRayDirectionEXT) BuiltIn ObjectRayDirectionKHR
|
||||
Decorate 47(gl_RayTminEXT) BuiltIn RayTminKHR
|
||||
Decorate 50(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
|
||||
Decorate 53(gl_HitTEXT) BuiltIn HitTKHR
|
||||
Decorate 58(gl_HitKindEXT) BuiltIn HitKindKHR
|
||||
Decorate 64(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR
|
||||
Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
|
||||
Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR
|
||||
Decorate 76(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR
|
||||
Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
|
||||
Decorate 84(incomingPayload) Location 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 3
|
||||
8: TypePointer Function 7(ivec3)
|
||||
10: TypePointer Input 7(ivec3)
|
||||
11(gl_LaunchIDEXT): 10(ptr) Variable Input
|
||||
14(gl_LaunchSizeEXT): 10(ptr) Variable Input
|
||||
16: TypeInt 32 1
|
||||
17: TypePointer Function 16(int)
|
||||
19: TypePointer Input 16(int)
|
||||
20(gl_PrimitiveID): 19(ptr) Variable Input
|
||||
23(gl_InstanceID): 19(ptr) Variable Input
|
||||
26(gl_InstanceCustomIndexEXT): 19(ptr) Variable Input
|
||||
28: TypeFloat 32
|
||||
29: TypeVector 28(float) 3
|
||||
30: TypePointer Function 29(fvec3)
|
||||
32: TypePointer Input 29(fvec3)
|
||||
33(gl_WorldRayOriginEXT): 32(ptr) Variable Input
|
||||
36(gl_WorldRayDirectionEXT): 32(ptr) Variable Input
|
||||
39(gl_ObjectRayOriginEXT): 32(ptr) Variable Input
|
||||
42(gl_ObjectRayDirectionEXT): 32(ptr) Variable Input
|
||||
44: TypePointer Function 28(float)
|
||||
46: TypePointer Input 28(float)
|
||||
47(gl_RayTminEXT): 46(ptr) Variable Input
|
||||
50(gl_RayTmaxEXT): 46(ptr) Variable Input
|
||||
53(gl_HitTEXT): 46(ptr) Variable Input
|
||||
55: TypePointer Function 6(int)
|
||||
57: TypePointer Input 6(int)
|
||||
58(gl_HitKindEXT): 57(ptr) Variable Input
|
||||
60: TypeMatrix 29(fvec3) 4
|
||||
61: TypePointer Function 60
|
||||
63: TypePointer Input 60
|
||||
64(gl_ObjectToWorldEXT): 63(ptr) Variable Input
|
||||
67(gl_WorldToObjectEXT): 63(ptr) Variable Input
|
||||
70(gl_GeometryIndexEXT): 19(ptr) Variable Input
|
||||
72: TypeVector 28(float) 4
|
||||
73: TypeMatrix 72(fvec4) 3
|
||||
74: TypePointer Function 73
|
||||
76(gl_ObjectToWorld3x4EXT): 63(ptr) Variable Input
|
||||
80(gl_WorldToObject3x4EXT): 63(ptr) Variable Input
|
||||
83: TypePointer IncomingRayPayloadKHR 72(fvec4)
|
||||
84(incomingPayload): 83(ptr) Variable IncomingRayPayloadKHR
|
||||
85: 28(float) Constant 1056964608
|
||||
86: 72(fvec4) ConstantComposite 85 85 85 85
|
||||
88: 16(int) Constant 1
|
||||
89: TypeBool
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(v0): 8(ptr) Variable Function
|
||||
13(v1): 8(ptr) Variable Function
|
||||
18(v2): 17(ptr) Variable Function
|
||||
22(v3): 17(ptr) Variable Function
|
||||
25(v4): 17(ptr) Variable Function
|
||||
31(v5): 30(ptr) Variable Function
|
||||
35(v6): 30(ptr) Variable Function
|
||||
38(v7): 30(ptr) Variable Function
|
||||
41(v8): 30(ptr) Variable Function
|
||||
45(v9): 44(ptr) Variable Function
|
||||
49(v10): 44(ptr) Variable Function
|
||||
52(v11): 44(ptr) Variable Function
|
||||
56(v12): 55(ptr) Variable Function
|
||||
62(v13): 61(ptr) Variable Function
|
||||
66(v14): 61(ptr) Variable Function
|
||||
69(v15): 17(ptr) Variable Function
|
||||
75(v16): 74(ptr) Variable Function
|
||||
79(v17): 74(ptr) Variable Function
|
||||
12: 7(ivec3) Load 11(gl_LaunchIDEXT)
|
||||
Store 9(v0) 12
|
||||
15: 7(ivec3) Load 14(gl_LaunchSizeEXT)
|
||||
Store 13(v1) 15
|
||||
21: 16(int) Load 20(gl_PrimitiveID)
|
||||
Store 18(v2) 21
|
||||
24: 16(int) Load 23(gl_InstanceID)
|
||||
Store 22(v3) 24
|
||||
27: 16(int) Load 26(gl_InstanceCustomIndexEXT)
|
||||
Store 25(v4) 27
|
||||
34: 29(fvec3) Load 33(gl_WorldRayOriginEXT)
|
||||
Store 31(v5) 34
|
||||
37: 29(fvec3) Load 36(gl_WorldRayDirectionEXT)
|
||||
Store 35(v6) 37
|
||||
40: 29(fvec3) Load 39(gl_ObjectRayOriginEXT)
|
||||
Store 38(v7) 40
|
||||
43: 29(fvec3) Load 42(gl_ObjectRayDirectionEXT)
|
||||
Store 41(v8) 43
|
||||
48: 28(float) Load 47(gl_RayTminEXT)
|
||||
Store 45(v9) 48
|
||||
51: 28(float) Load 50(gl_RayTmaxEXT)
|
||||
Store 49(v10) 51
|
||||
54: 28(float) Load 53(gl_HitTEXT)
|
||||
Store 52(v11) 54
|
||||
59: 6(int) Load 58(gl_HitKindEXT)
|
||||
Store 56(v12) 59
|
||||
65: 60 Load 64(gl_ObjectToWorldEXT)
|
||||
Store 62(v13) 65
|
||||
68: 60 Load 67(gl_WorldToObjectEXT)
|
||||
Store 66(v14) 68
|
||||
71: 16(int) Load 70(gl_GeometryIndexEXT)
|
||||
Store 69(v15) 71
|
||||
77: 60 Load 76(gl_ObjectToWorld3x4EXT)
|
||||
78: 73 Transpose 77
|
||||
Store 75(v16) 78
|
||||
81: 60 Load 80(gl_WorldToObject3x4EXT)
|
||||
82: 73 Transpose 81
|
||||
Store 79(v17) 82
|
||||
Store 84(incomingPayload) 86
|
||||
87: 16(int) Load 18(v2)
|
||||
90: 89(bool) IEqual 87 88
|
||||
SelectionMerge 92 None
|
||||
BranchConditional 90 91 93
|
||||
91: Label
|
||||
IgnoreIntersectionKHR
|
||||
Branch 92
|
||||
93: Label
|
||||
TerminateRayKHR
|
||||
Branch 92
|
||||
92: Label
|
||||
Return
|
||||
FunctionEnd
|
8
Test/baseResults/spv.ext.AnyHitShader_Errors.rahit.out
Normal file
8
Test/baseResults/spv.ext.AnyHitShader_Errors.rahit.out
Normal file
@ -0,0 +1,8 @@
|
||||
spv.ext.AnyHitShader_Errors.rahit
|
||||
ERROR: 0:8: 'assign' : l-value required "payload" (cannot modify hitAttributeNV in this stage)
|
||||
ERROR: 0:9: 'reportIntersectionEXT' : no matching overloaded function found
|
||||
ERROR: 0:10: 'traceRayEXT' : no matching overloaded function found
|
||||
ERROR: 3 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
194
Test/baseResults/spv.ext.ClosestHitShader.rchit.out
Normal file
194
Test/baseResults/spv.ext.ClosestHitShader.rchit.out
Normal file
@ -0,0 +1,194 @@
|
||||
spv.ext.ClosestHitShader.rchit
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 101
|
||||
|
||||
Capability RayTracingProvisionalKHR
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint ClosestHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 76 80
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 9 "v0"
|
||||
Name 11 "gl_LaunchIDEXT"
|
||||
Name 13 "v1"
|
||||
Name 14 "gl_LaunchSizeEXT"
|
||||
Name 18 "v2"
|
||||
Name 20 "gl_PrimitiveID"
|
||||
Name 22 "v3"
|
||||
Name 23 "gl_InstanceID"
|
||||
Name 25 "v4"
|
||||
Name 26 "gl_InstanceCustomIndexEXT"
|
||||
Name 31 "v5"
|
||||
Name 33 "gl_WorldRayOriginEXT"
|
||||
Name 35 "v6"
|
||||
Name 36 "gl_WorldRayDirectionEXT"
|
||||
Name 38 "v7"
|
||||
Name 39 "gl_ObjectRayOriginEXT"
|
||||
Name 41 "v8"
|
||||
Name 42 "gl_ObjectRayDirectionEXT"
|
||||
Name 45 "v9"
|
||||
Name 47 "gl_RayTminEXT"
|
||||
Name 49 "v10"
|
||||
Name 50 "gl_RayTmaxEXT"
|
||||
Name 52 "v11"
|
||||
Name 53 "gl_HitTEXT"
|
||||
Name 56 "v12"
|
||||
Name 58 "gl_HitKindEXT"
|
||||
Name 62 "v13"
|
||||
Name 64 "gl_ObjectToWorldEXT"
|
||||
Name 66 "v14"
|
||||
Name 67 "gl_WorldToObjectEXT"
|
||||
Name 69 "v15"
|
||||
Name 70 "gl_GeometryIndexEXT"
|
||||
Name 75 "v16"
|
||||
Name 76 "gl_ObjectToWorld3x4EXT"
|
||||
Name 79 "v17"
|
||||
Name 80 "gl_WorldToObject3x4EXT"
|
||||
Name 85 "accEXT"
|
||||
Name 98 "localPayload"
|
||||
Name 100 "incomingPayload"
|
||||
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
||||
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
||||
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||
Decorate 23(gl_InstanceID) BuiltIn InstanceId
|
||||
Decorate 26(gl_InstanceCustomIndexEXT) BuiltIn InstanceCustomIndexKHR
|
||||
Decorate 33(gl_WorldRayOriginEXT) BuiltIn WorldRayOriginKHR
|
||||
Decorate 36(gl_WorldRayDirectionEXT) BuiltIn WorldRayDirectionKHR
|
||||
Decorate 39(gl_ObjectRayOriginEXT) BuiltIn ObjectRayOriginKHR
|
||||
Decorate 42(gl_ObjectRayDirectionEXT) BuiltIn ObjectRayDirectionKHR
|
||||
Decorate 47(gl_RayTminEXT) BuiltIn RayTminKHR
|
||||
Decorate 50(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
|
||||
Decorate 53(gl_HitTEXT) BuiltIn HitTKHR
|
||||
Decorate 58(gl_HitKindEXT) BuiltIn HitKindKHR
|
||||
Decorate 64(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR
|
||||
Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
|
||||
Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR
|
||||
Decorate 76(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR
|
||||
Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
|
||||
Decorate 85(accEXT) DescriptorSet 0
|
||||
Decorate 85(accEXT) Binding 0
|
||||
Decorate 98(localPayload) Location 0
|
||||
Decorate 100(incomingPayload) Location 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 3
|
||||
8: TypePointer Function 7(ivec3)
|
||||
10: TypePointer Input 7(ivec3)
|
||||
11(gl_LaunchIDEXT): 10(ptr) Variable Input
|
||||
14(gl_LaunchSizeEXT): 10(ptr) Variable Input
|
||||
16: TypeInt 32 1
|
||||
17: TypePointer Function 16(int)
|
||||
19: TypePointer Input 16(int)
|
||||
20(gl_PrimitiveID): 19(ptr) Variable Input
|
||||
23(gl_InstanceID): 19(ptr) Variable Input
|
||||
26(gl_InstanceCustomIndexEXT): 19(ptr) Variable Input
|
||||
28: TypeFloat 32
|
||||
29: TypeVector 28(float) 3
|
||||
30: TypePointer Function 29(fvec3)
|
||||
32: TypePointer Input 29(fvec3)
|
||||
33(gl_WorldRayOriginEXT): 32(ptr) Variable Input
|
||||
36(gl_WorldRayDirectionEXT): 32(ptr) Variable Input
|
||||
39(gl_ObjectRayOriginEXT): 32(ptr) Variable Input
|
||||
42(gl_ObjectRayDirectionEXT): 32(ptr) Variable Input
|
||||
44: TypePointer Function 28(float)
|
||||
46: TypePointer Input 28(float)
|
||||
47(gl_RayTminEXT): 46(ptr) Variable Input
|
||||
50(gl_RayTmaxEXT): 46(ptr) Variable Input
|
||||
53(gl_HitTEXT): 46(ptr) Variable Input
|
||||
55: TypePointer Function 6(int)
|
||||
57: TypePointer Input 6(int)
|
||||
58(gl_HitKindEXT): 57(ptr) Variable Input
|
||||
60: TypeMatrix 29(fvec3) 4
|
||||
61: TypePointer Function 60
|
||||
63: TypePointer Input 60
|
||||
64(gl_ObjectToWorldEXT): 63(ptr) Variable Input
|
||||
67(gl_WorldToObjectEXT): 63(ptr) Variable Input
|
||||
70(gl_GeometryIndexEXT): 19(ptr) Variable Input
|
||||
72: TypeVector 28(float) 4
|
||||
73: TypeMatrix 72(fvec4) 3
|
||||
74: TypePointer Function 73
|
||||
76(gl_ObjectToWorld3x4EXT): 63(ptr) Variable Input
|
||||
80(gl_WorldToObject3x4EXT): 63(ptr) Variable Input
|
||||
83: TypeAccelerationStructureKHR
|
||||
84: TypePointer UniformConstant 83
|
||||
85(accEXT): 84(ptr) Variable UniformConstant
|
||||
87: 6(int) Constant 0
|
||||
88: 6(int) Constant 1
|
||||
89: 6(int) Constant 2
|
||||
90: 6(int) Constant 3
|
||||
91: 28(float) Constant 1056964608
|
||||
92: 29(fvec3) ConstantComposite 91 91 91
|
||||
93: 28(float) Constant 1065353216
|
||||
94: 29(fvec3) ConstantComposite 93 93 93
|
||||
95: 28(float) Constant 1061158912
|
||||
96: 16(int) Constant 1
|
||||
97: TypePointer RayPayloadKHR 72(fvec4)
|
||||
98(localPayload): 97(ptr) Variable RayPayloadKHR
|
||||
99: TypePointer IncomingRayPayloadKHR 72(fvec4)
|
||||
100(incomingPayload): 99(ptr) Variable IncomingRayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(v0): 8(ptr) Variable Function
|
||||
13(v1): 8(ptr) Variable Function
|
||||
18(v2): 17(ptr) Variable Function
|
||||
22(v3): 17(ptr) Variable Function
|
||||
25(v4): 17(ptr) Variable Function
|
||||
31(v5): 30(ptr) Variable Function
|
||||
35(v6): 30(ptr) Variable Function
|
||||
38(v7): 30(ptr) Variable Function
|
||||
41(v8): 30(ptr) Variable Function
|
||||
45(v9): 44(ptr) Variable Function
|
||||
49(v10): 44(ptr) Variable Function
|
||||
52(v11): 44(ptr) Variable Function
|
||||
56(v12): 55(ptr) Variable Function
|
||||
62(v13): 61(ptr) Variable Function
|
||||
66(v14): 61(ptr) Variable Function
|
||||
69(v15): 17(ptr) Variable Function
|
||||
75(v16): 74(ptr) Variable Function
|
||||
79(v17): 74(ptr) Variable Function
|
||||
12: 7(ivec3) Load 11(gl_LaunchIDEXT)
|
||||
Store 9(v0) 12
|
||||
15: 7(ivec3) Load 14(gl_LaunchSizeEXT)
|
||||
Store 13(v1) 15
|
||||
21: 16(int) Load 20(gl_PrimitiveID)
|
||||
Store 18(v2) 21
|
||||
24: 16(int) Load 23(gl_InstanceID)
|
||||
Store 22(v3) 24
|
||||
27: 16(int) Load 26(gl_InstanceCustomIndexEXT)
|
||||
Store 25(v4) 27
|
||||
34: 29(fvec3) Load 33(gl_WorldRayOriginEXT)
|
||||
Store 31(v5) 34
|
||||
37: 29(fvec3) Load 36(gl_WorldRayDirectionEXT)
|
||||
Store 35(v6) 37
|
||||
40: 29(fvec3) Load 39(gl_ObjectRayOriginEXT)
|
||||
Store 38(v7) 40
|
||||
43: 29(fvec3) Load 42(gl_ObjectRayDirectionEXT)
|
||||
Store 41(v8) 43
|
||||
48: 28(float) Load 47(gl_RayTminEXT)
|
||||
Store 45(v9) 48
|
||||
51: 28(float) Load 50(gl_RayTmaxEXT)
|
||||
Store 49(v10) 51
|
||||
54: 28(float) Load 53(gl_HitTEXT)
|
||||
Store 52(v11) 54
|
||||
59: 6(int) Load 58(gl_HitKindEXT)
|
||||
Store 56(v12) 59
|
||||
65: 60 Load 64(gl_ObjectToWorldEXT)
|
||||
Store 62(v13) 65
|
||||
68: 60 Load 67(gl_WorldToObjectEXT)
|
||||
Store 66(v14) 68
|
||||
71: 16(int) Load 70(gl_GeometryIndexEXT)
|
||||
Store 69(v15) 71
|
||||
77: 60 Load 76(gl_ObjectToWorld3x4EXT)
|
||||
78: 73 Transpose 77
|
||||
Store 75(v16) 78
|
||||
81: 60 Load 80(gl_WorldToObject3x4EXT)
|
||||
82: 73 Transpose 81
|
||||
Store 79(v17) 82
|
||||
86: 83 Load 85(accEXT)
|
||||
TraceRayKHR 86 87 88 89 90 87 92 91 94 95 96
|
||||
Return
|
||||
FunctionEnd
|
@ -0,0 +1,9 @@
|
||||
spv.ext.ClosestHitShader_Errors.rchit
|
||||
ERROR: 0:8: 'assign' : l-value required "payload" (cannot modify hitAttributeNV in this stage)
|
||||
ERROR: 0:9: 'reportIntersectionEXT' : no matching overloaded function found
|
||||
ERROR: 0:10: 'terminateRayEXT' : no matching overloaded function found
|
||||
ERROR: 0:11: 'ignoreIntersectionEXT' : no matching overloaded function found
|
||||
ERROR: 4 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
156
Test/baseResults/spv.ext.IntersectShader.rint.out
Normal file
156
Test/baseResults/spv.ext.IntersectShader.rint.out
Normal file
@ -0,0 +1,156 @@
|
||||
spv.ext.IntersectShader.rint
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 81
|
||||
|
||||
Capability RayTracingProvisionalKHR
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint IntersectionKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 56 59 65 69
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 9 "v0"
|
||||
Name 11 "gl_LaunchIDEXT"
|
||||
Name 13 "v1"
|
||||
Name 14 "gl_LaunchSizeEXT"
|
||||
Name 18 "v2"
|
||||
Name 20 "gl_PrimitiveID"
|
||||
Name 22 "v3"
|
||||
Name 23 "gl_InstanceID"
|
||||
Name 25 "v4"
|
||||
Name 26 "gl_InstanceCustomIndexEXT"
|
||||
Name 31 "v5"
|
||||
Name 33 "gl_WorldRayOriginEXT"
|
||||
Name 35 "v6"
|
||||
Name 36 "gl_WorldRayDirectionEXT"
|
||||
Name 38 "v7"
|
||||
Name 39 "gl_ObjectRayOriginEXT"
|
||||
Name 41 "v8"
|
||||
Name 42 "gl_ObjectRayDirectionEXT"
|
||||
Name 45 "v9"
|
||||
Name 47 "gl_RayTminEXT"
|
||||
Name 49 "v10"
|
||||
Name 50 "gl_RayTmaxEXT"
|
||||
Name 54 "v11"
|
||||
Name 56 "gl_ObjectToWorldEXT"
|
||||
Name 58 "v12"
|
||||
Name 59 "gl_WorldToObjectEXT"
|
||||
Name 64 "v13"
|
||||
Name 65 "gl_ObjectToWorld3x4EXT"
|
||||
Name 68 "v14"
|
||||
Name 69 "gl_WorldToObject3x4EXT"
|
||||
Name 73 "iAttr"
|
||||
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
||||
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
||||
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||
Decorate 23(gl_InstanceID) BuiltIn InstanceId
|
||||
Decorate 26(gl_InstanceCustomIndexEXT) BuiltIn InstanceCustomIndexKHR
|
||||
Decorate 33(gl_WorldRayOriginEXT) BuiltIn WorldRayOriginKHR
|
||||
Decorate 36(gl_WorldRayDirectionEXT) BuiltIn WorldRayDirectionKHR
|
||||
Decorate 39(gl_ObjectRayOriginEXT) BuiltIn ObjectRayOriginKHR
|
||||
Decorate 42(gl_ObjectRayDirectionEXT) BuiltIn ObjectRayDirectionKHR
|
||||
Decorate 47(gl_RayTminEXT) BuiltIn RayTminKHR
|
||||
Decorate 50(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
|
||||
Decorate 56(gl_ObjectToWorldEXT) BuiltIn ObjectToWorldKHR
|
||||
Decorate 59(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR
|
||||
Decorate 65(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR
|
||||
Decorate 69(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 3
|
||||
8: TypePointer Function 7(ivec3)
|
||||
10: TypePointer Input 7(ivec3)
|
||||
11(gl_LaunchIDEXT): 10(ptr) Variable Input
|
||||
14(gl_LaunchSizeEXT): 10(ptr) Variable Input
|
||||
16: TypeInt 32 1
|
||||
17: TypePointer Function 16(int)
|
||||
19: TypePointer Input 16(int)
|
||||
20(gl_PrimitiveID): 19(ptr) Variable Input
|
||||
23(gl_InstanceID): 19(ptr) Variable Input
|
||||
26(gl_InstanceCustomIndexEXT): 19(ptr) Variable Input
|
||||
28: TypeFloat 32
|
||||
29: TypeVector 28(float) 3
|
||||
30: TypePointer Function 29(fvec3)
|
||||
32: TypePointer Input 29(fvec3)
|
||||
33(gl_WorldRayOriginEXT): 32(ptr) Variable Input
|
||||
36(gl_WorldRayDirectionEXT): 32(ptr) Variable Input
|
||||
39(gl_ObjectRayOriginEXT): 32(ptr) Variable Input
|
||||
42(gl_ObjectRayDirectionEXT): 32(ptr) Variable Input
|
||||
44: TypePointer Function 28(float)
|
||||
46: TypePointer Input 28(float)
|
||||
47(gl_RayTminEXT): 46(ptr) Variable Input
|
||||
50(gl_RayTmaxEXT): 46(ptr) Variable Input
|
||||
52: TypeMatrix 29(fvec3) 4
|
||||
53: TypePointer Function 52
|
||||
55: TypePointer Input 52
|
||||
56(gl_ObjectToWorldEXT): 55(ptr) Variable Input
|
||||
59(gl_WorldToObjectEXT): 55(ptr) Variable Input
|
||||
61: TypeVector 28(float) 4
|
||||
62: TypeMatrix 61(fvec4) 3
|
||||
63: TypePointer Function 62
|
||||
65(gl_ObjectToWorld3x4EXT): 55(ptr) Variable Input
|
||||
69(gl_WorldToObject3x4EXT): 55(ptr) Variable Input
|
||||
72: TypePointer HitAttributeKHR 61(fvec4)
|
||||
73(iAttr): 72(ptr) Variable HitAttributeKHR
|
||||
74: 28(float) Constant 1056964608
|
||||
75: 28(float) Constant 0
|
||||
76: 28(float) Constant 1065353216
|
||||
77: 61(fvec4) ConstantComposite 74 74 75 76
|
||||
78: 6(int) Constant 1
|
||||
79: TypeBool
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(v0): 8(ptr) Variable Function
|
||||
13(v1): 8(ptr) Variable Function
|
||||
18(v2): 17(ptr) Variable Function
|
||||
22(v3): 17(ptr) Variable Function
|
||||
25(v4): 17(ptr) Variable Function
|
||||
31(v5): 30(ptr) Variable Function
|
||||
35(v6): 30(ptr) Variable Function
|
||||
38(v7): 30(ptr) Variable Function
|
||||
41(v8): 30(ptr) Variable Function
|
||||
45(v9): 44(ptr) Variable Function
|
||||
49(v10): 44(ptr) Variable Function
|
||||
54(v11): 53(ptr) Variable Function
|
||||
58(v12): 53(ptr) Variable Function
|
||||
64(v13): 63(ptr) Variable Function
|
||||
68(v14): 63(ptr) Variable Function
|
||||
12: 7(ivec3) Load 11(gl_LaunchIDEXT)
|
||||
Store 9(v0) 12
|
||||
15: 7(ivec3) Load 14(gl_LaunchSizeEXT)
|
||||
Store 13(v1) 15
|
||||
21: 16(int) Load 20(gl_PrimitiveID)
|
||||
Store 18(v2) 21
|
||||
24: 16(int) Load 23(gl_InstanceID)
|
||||
Store 22(v3) 24
|
||||
27: 16(int) Load 26(gl_InstanceCustomIndexEXT)
|
||||
Store 25(v4) 27
|
||||
34: 29(fvec3) Load 33(gl_WorldRayOriginEXT)
|
||||
Store 31(v5) 34
|
||||
37: 29(fvec3) Load 36(gl_WorldRayDirectionEXT)
|
||||
Store 35(v6) 37
|
||||
40: 29(fvec3) Load 39(gl_ObjectRayOriginEXT)
|
||||
Store 38(v7) 40
|
||||
43: 29(fvec3) Load 42(gl_ObjectRayDirectionEXT)
|
||||
Store 41(v8) 43
|
||||
48: 28(float) Load 47(gl_RayTminEXT)
|
||||
Store 45(v9) 48
|
||||
51: 28(float) Load 50(gl_RayTmaxEXT)
|
||||
Store 49(v10) 51
|
||||
57: 52 Load 56(gl_ObjectToWorldEXT)
|
||||
Store 54(v11) 57
|
||||
60: 52 Load 59(gl_WorldToObjectEXT)
|
||||
Store 58(v12) 60
|
||||
66: 52 Load 65(gl_ObjectToWorld3x4EXT)
|
||||
67: 62 Transpose 66
|
||||
Store 64(v13) 67
|
||||
70: 52 Load 69(gl_WorldToObject3x4EXT)
|
||||
71: 62 Transpose 70
|
||||
Store 68(v14) 71
|
||||
Store 73(iAttr) 77
|
||||
80: 79(bool) ReportIntersectionKHR 74 78
|
||||
Return
|
||||
FunctionEnd
|
10
Test/baseResults/spv.ext.IntersectShader_Errors.rint.out
Normal file
10
Test/baseResults/spv.ext.IntersectShader_Errors.rint.out
Normal file
@ -0,0 +1,10 @@
|
||||
spv.ext.IntersectShader_Errors.rint
|
||||
ERROR: 0:3: 'rayPayloadInEXT' : not supported in this stage: intersection
|
||||
ERROR: 0:4: 'rayPayloadEXT' : not supported in this stage: intersection
|
||||
ERROR: 0:8: 'gl_HitTEXT' : undeclared identifier
|
||||
ERROR: 0:9: 'gl_HitKindEXT' : undeclared identifier
|
||||
ERROR: 0:10: 'traceRayEXT' : no matching overloaded function found
|
||||
ERROR: 5 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
99
Test/baseResults/spv.ext.MissShader.rmiss.out
Normal file
99
Test/baseResults/spv.ext.MissShader.rmiss.out
Normal file
@ -0,0 +1,99 @@
|
||||
spv.ext.MissShader.rmiss
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 54
|
||||
|
||||
Capability RayTracingProvisionalKHR
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MissKHR 4 "main" 11 14 21 24 29 32
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 9 "v0"
|
||||
Name 11 "gl_LaunchIDEXT"
|
||||
Name 13 "v1"
|
||||
Name 14 "gl_LaunchSizeEXT"
|
||||
Name 19 "v2"
|
||||
Name 21 "gl_WorldRayOriginEXT"
|
||||
Name 23 "v3"
|
||||
Name 24 "gl_WorldRayDirectionEXT"
|
||||
Name 27 "v4"
|
||||
Name 29 "gl_RayTminEXT"
|
||||
Name 31 "v5"
|
||||
Name 32 "gl_RayTmaxEXT"
|
||||
Name 36 "accEXT"
|
||||
Name 51 "localPayload"
|
||||
Name 53 "incomingPayload"
|
||||
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
||||
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
||||
Decorate 21(gl_WorldRayOriginEXT) BuiltIn WorldRayOriginKHR
|
||||
Decorate 24(gl_WorldRayDirectionEXT) BuiltIn WorldRayDirectionKHR
|
||||
Decorate 29(gl_RayTminEXT) BuiltIn RayTminKHR
|
||||
Decorate 32(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
|
||||
Decorate 36(accEXT) DescriptorSet 0
|
||||
Decorate 36(accEXT) Binding 0
|
||||
Decorate 51(localPayload) Location 0
|
||||
Decorate 53(incomingPayload) Location 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 3
|
||||
8: TypePointer Function 7(ivec3)
|
||||
10: TypePointer Input 7(ivec3)
|
||||
11(gl_LaunchIDEXT): 10(ptr) Variable Input
|
||||
14(gl_LaunchSizeEXT): 10(ptr) Variable Input
|
||||
16: TypeFloat 32
|
||||
17: TypeVector 16(float) 3
|
||||
18: TypePointer Function 17(fvec3)
|
||||
20: TypePointer Input 17(fvec3)
|
||||
21(gl_WorldRayOriginEXT): 20(ptr) Variable Input
|
||||
24(gl_WorldRayDirectionEXT): 20(ptr) Variable Input
|
||||
26: TypePointer Function 16(float)
|
||||
28: TypePointer Input 16(float)
|
||||
29(gl_RayTminEXT): 28(ptr) Variable Input
|
||||
32(gl_RayTmaxEXT): 28(ptr) Variable Input
|
||||
34: TypeAccelerationStructureKHR
|
||||
35: TypePointer UniformConstant 34
|
||||
36(accEXT): 35(ptr) Variable UniformConstant
|
||||
38: 6(int) Constant 0
|
||||
39: 6(int) Constant 1
|
||||
40: 6(int) Constant 2
|
||||
41: 6(int) Constant 3
|
||||
42: 16(float) Constant 1056964608
|
||||
43: 17(fvec3) ConstantComposite 42 42 42
|
||||
44: 16(float) Constant 1065353216
|
||||
45: 17(fvec3) ConstantComposite 44 44 44
|
||||
46: 16(float) Constant 1061158912
|
||||
47: TypeInt 32 1
|
||||
48: 47(int) Constant 1
|
||||
49: TypeVector 16(float) 4
|
||||
50: TypePointer RayPayloadKHR 49(fvec4)
|
||||
51(localPayload): 50(ptr) Variable RayPayloadKHR
|
||||
52: TypePointer IncomingRayPayloadKHR 49(fvec4)
|
||||
53(incomingPayload): 52(ptr) Variable IncomingRayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(v0): 8(ptr) Variable Function
|
||||
13(v1): 8(ptr) Variable Function
|
||||
19(v2): 18(ptr) Variable Function
|
||||
23(v3): 18(ptr) Variable Function
|
||||
27(v4): 26(ptr) Variable Function
|
||||
31(v5): 26(ptr) Variable Function
|
||||
12: 7(ivec3) Load 11(gl_LaunchIDEXT)
|
||||
Store 9(v0) 12
|
||||
15: 7(ivec3) Load 14(gl_LaunchSizeEXT)
|
||||
Store 13(v1) 15
|
||||
22: 17(fvec3) Load 21(gl_WorldRayOriginEXT)
|
||||
Store 19(v2) 22
|
||||
25: 17(fvec3) Load 24(gl_WorldRayDirectionEXT)
|
||||
Store 23(v3) 25
|
||||
30: 16(float) Load 29(gl_RayTminEXT)
|
||||
Store 27(v4) 30
|
||||
33: 16(float) Load 32(gl_RayTmaxEXT)
|
||||
Store 31(v5) 33
|
||||
37: 34 Load 36(accEXT)
|
||||
TraceRayKHR 37 38 39 40 41 38 43 42 45 46 48
|
||||
Return
|
||||
FunctionEnd
|
21
Test/baseResults/spv.ext.MissShader_Errors.rmiss.out
Normal file
21
Test/baseResults/spv.ext.MissShader_Errors.rmiss.out
Normal file
@ -0,0 +1,21 @@
|
||||
spv.ext.MissShader_Errors.rmiss
|
||||
ERROR: 0:3: 'hitAttributeEXT' : not supported in this stage: miss
|
||||
ERROR: 0:6: 'gl_PrimitiveID' : undeclared identifier
|
||||
ERROR: 0:6: '=' : cannot convert from ' temp float' to ' temp highp int'
|
||||
ERROR: 0:7: 'gl_InstanceID' : undeclared identifier (Did you mean gl_InstanceIndex?)
|
||||
ERROR: 0:7: '=' : cannot convert from ' temp float' to ' temp highp int'
|
||||
ERROR: 0:8: 'gl_InstanceCustomIndexEXT' : undeclared identifier
|
||||
ERROR: 0:8: '=' : cannot convert from ' temp float' to ' temp highp int'
|
||||
ERROR: 0:9: 'gl_ObjectToWorldEXT' : undeclared identifier
|
||||
ERROR: 0:9: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
|
||||
ERROR: 0:10: 'gl_WorldToObjectEXT' : undeclared identifier
|
||||
ERROR: 0:10: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
|
||||
ERROR: 0:11: 'gl_HitTEXT' : undeclared identifier
|
||||
ERROR: 0:12: 'gl_HitKindEXT' : undeclared identifier
|
||||
ERROR: 0:13: 'reportIntersectionEXT' : no matching overloaded function found
|
||||
ERROR: 0:14: 'ignoreIntersectionEXT' : no matching overloaded function found
|
||||
ERROR: 0:15: 'terminateRayEXT' : no matching overloaded function found
|
||||
ERROR: 16 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
60
Test/baseResults/spv.ext.RayCallable.rcall.out
Normal file
60
Test/baseResults/spv.ext.RayCallable.rcall.out
Normal file
@ -0,0 +1,60 @@
|
||||
spv.ext.RayCallable.rcall
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 30
|
||||
|
||||
Capability RayTracingProvisionalKHR
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint CallableKHR 4 "main" 11 14
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 9 "id"
|
||||
Name 11 "gl_LaunchIDEXT"
|
||||
Name 13 "size"
|
||||
Name 14 "gl_LaunchSizeEXT"
|
||||
Name 16 "dataBlock"
|
||||
MemberName 16(dataBlock) 0 "data1"
|
||||
Name 18 ""
|
||||
Name 29 "data0"
|
||||
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
||||
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
||||
Decorate 16(dataBlock) Block
|
||||
Decorate 18 Location 1
|
||||
Decorate 29(data0) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 3
|
||||
8: TypePointer Function 7(ivec3)
|
||||
10: TypePointer Input 7(ivec3)
|
||||
11(gl_LaunchIDEXT): 10(ptr) Variable Input
|
||||
14(gl_LaunchSizeEXT): 10(ptr) Variable Input
|
||||
16(dataBlock): TypeStruct 6(int)
|
||||
17: TypePointer IncomingCallableDataKHR 16(dataBlock)
|
||||
18: 17(ptr) Variable IncomingCallableDataKHR
|
||||
19: TypeInt 32 1
|
||||
20: 19(int) Constant 0
|
||||
21: 6(int) Constant 256
|
||||
22: TypePointer IncomingCallableDataKHR 6(int)
|
||||
24: 6(int) Constant 2
|
||||
25: 19(int) Constant 1
|
||||
26: TypeFloat 32
|
||||
27: TypeVector 26(float) 4
|
||||
28: TypePointer CallableDataKHR 27(fvec4)
|
||||
29(data0): 28(ptr) Variable CallableDataKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(id): 8(ptr) Variable Function
|
||||
13(size): 8(ptr) Variable Function
|
||||
12: 7(ivec3) Load 11(gl_LaunchIDEXT)
|
||||
Store 9(id) 12
|
||||
15: 7(ivec3) Load 14(gl_LaunchSizeEXT)
|
||||
Store 13(size) 15
|
||||
23: 22(ptr) AccessChain 18 20
|
||||
Store 23 21
|
||||
ExecuteCallableKHR 24 25
|
||||
Return
|
||||
FunctionEnd
|
35
Test/baseResults/spv.ext.RayCallable_Errors.rcall.out
Normal file
35
Test/baseResults/spv.ext.RayCallable_Errors.rcall.out
Normal file
@ -0,0 +1,35 @@
|
||||
spv.ext.RayCallable_Errors.rcall
|
||||
ERROR: 0:3: 'hitAttributeEXT' : not supported in this stage: callable
|
||||
ERROR: 0:4: 'rayPayloadEXT' : not supported in this stage: callable
|
||||
ERROR: 0:5: 'rayPayloadInEXT' : not supported in this stage: callable
|
||||
ERROR: 0:9: 'gl_PrimitiveID' : undeclared identifier
|
||||
ERROR: 0:9: '=' : cannot convert from ' temp float' to ' temp highp int'
|
||||
ERROR: 0:10: 'gl_InstanceID' : undeclared identifier (Did you mean gl_InstanceIndex?)
|
||||
ERROR: 0:10: '=' : cannot convert from ' temp float' to ' temp highp int'
|
||||
ERROR: 0:11: 'gl_InstanceCustomIndexEXT' : undeclared identifier
|
||||
ERROR: 0:11: '=' : cannot convert from ' temp float' to ' temp highp int'
|
||||
ERROR: 0:12: 'gl_WorldRayOriginEXT' : undeclared identifier
|
||||
ERROR: 0:12: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
|
||||
ERROR: 0:13: 'gl_WorldRayDirectionEXT' : undeclared identifier
|
||||
ERROR: 0:13: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
|
||||
ERROR: 0:14: 'gl_ObjectRayOriginEXT' : undeclared identifier
|
||||
ERROR: 0:14: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
|
||||
ERROR: 0:15: 'gl_ObjectRayDirectionEXT' : undeclared identifier
|
||||
ERROR: 0:15: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
|
||||
ERROR: 0:16: 'gl_RayTminEXT' : undeclared identifier
|
||||
ERROR: 0:17: 'gl_RayTmaxEXT' : undeclared identifier
|
||||
ERROR: 0:18: 'gl_ObjectToWorldEXT' : undeclared identifier
|
||||
ERROR: 0:18: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
|
||||
ERROR: 0:19: 'gl_WorldToObjectEXT' : undeclared identifier
|
||||
ERROR: 0:19: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
|
||||
ERROR: 0:20: 'gl_HitTEXT' : undeclared identifier
|
||||
ERROR: 0:21: 'gl_HitKindEXT' : undeclared identifier
|
||||
ERROR: 0:22: 'gl_IncomingRayFlagsEXT' : undeclared identifier
|
||||
ERROR: 0:22: '=' : cannot convert from ' temp float' to ' temp highp uint'
|
||||
ERROR: 0:23: 'reportIntersectionEXT' : no matching overloaded function found
|
||||
ERROR: 0:24: 'ignoreIntersectionEXT' : no matching overloaded function found
|
||||
ERROR: 0:25: 'terminateRayEXT' : no matching overloaded function found
|
||||
ERROR: 30 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
46
Test/baseResults/spv.ext.RayConstants.rgen.out
Normal file
46
Test/baseResults/spv.ext.RayConstants.rgen.out
Normal file
@ -0,0 +1,46 @@
|
||||
spv.ext.RayConstants.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 27
|
||||
|
||||
Capability RayTracingProvisionalKHR
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main"
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 8 "accEXT"
|
||||
Name 26 "payload"
|
||||
Decorate 8(accEXT) DescriptorSet 0
|
||||
Decorate 8(accEXT) Binding 0
|
||||
Decorate 26(payload) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeAccelerationStructureKHR
|
||||
7: TypePointer UniformConstant 6
|
||||
8(accEXT): 7(ptr) Variable UniformConstant
|
||||
10: TypeInt 32 0
|
||||
11: 10(int) Constant 255
|
||||
12: 10(int) Constant 0
|
||||
13: 10(int) Constant 1
|
||||
14: TypeFloat 32
|
||||
15: TypeVector 14(float) 3
|
||||
16: 14(float) Constant 0
|
||||
17: 15(fvec3) ConstantComposite 16 16 16
|
||||
18: 14(float) Constant 1056964608
|
||||
19: 14(float) Constant 1065353216
|
||||
20: 15(fvec3) ConstantComposite 19 19 19
|
||||
21: 14(float) Constant 1061158912
|
||||
22: TypeInt 32 1
|
||||
23: 22(int) Constant 1
|
||||
24: TypeVector 14(float) 4
|
||||
25: TypePointer RayPayloadKHR 24(fvec4)
|
||||
26(payload): 25(ptr) Variable RayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9: 6 Load 8(accEXT)
|
||||
TraceRayKHR 9 11 12 13 13 12 17 18 20 21 23
|
||||
Return
|
||||
FunctionEnd
|
101
Test/baseResults/spv.ext.RayGenShader.rgen.out
Normal file
101
Test/baseResults/spv.ext.RayGenShader.rgen.out
Normal file
@ -0,0 +1,101 @@
|
||||
spv.ext.RayGenShader.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 57
|
||||
|
||||
Capability RayTracingProvisionalKHR
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main" 11 21
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 8 "lx"
|
||||
Name 11 "gl_LaunchIDEXT"
|
||||
Name 16 "ly"
|
||||
Name 20 "sx"
|
||||
Name 21 "gl_LaunchSizeEXT"
|
||||
Name 24 "sy"
|
||||
Name 29 "accEXT0"
|
||||
Name 37 "block"
|
||||
MemberName 37(block) 0 "dir"
|
||||
MemberName 37(block) 1 "origin"
|
||||
Name 39 ""
|
||||
Name 50 "accEXT1"
|
||||
Name 53 "imageu"
|
||||
Name 56 "payload"
|
||||
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
||||
Decorate 21(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
||||
Decorate 29(accEXT0) DescriptorSet 0
|
||||
Decorate 29(accEXT0) Binding 0
|
||||
MemberDecorate 37(block) 0 Offset 0
|
||||
MemberDecorate 37(block) 1 Offset 16
|
||||
Decorate 37(block) BufferBlock
|
||||
Decorate 50(accEXT1) DescriptorSet 0
|
||||
Decorate 50(accEXT1) Binding 1
|
||||
Decorate 53(imageu) DescriptorSet 0
|
||||
Decorate 53(imageu) Binding 2
|
||||
Decorate 56(payload) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypePointer Function 6(int)
|
||||
9: TypeVector 6(int) 3
|
||||
10: TypePointer Input 9(ivec3)
|
||||
11(gl_LaunchIDEXT): 10(ptr) Variable Input
|
||||
12: 6(int) Constant 0
|
||||
13: TypePointer Input 6(int)
|
||||
17: 6(int) Constant 1
|
||||
21(gl_LaunchSizeEXT): 10(ptr) Variable Input
|
||||
27: TypeAccelerationStructureKHR
|
||||
28: TypePointer UniformConstant 27
|
||||
29(accEXT0): 28(ptr) Variable UniformConstant
|
||||
35: TypeFloat 32
|
||||
36: TypeVector 35(float) 3
|
||||
37(block): TypeStruct 36(fvec3) 36(fvec3)
|
||||
38: TypePointer ShaderRecordBufferKHR 37(block)
|
||||
39: 38(ptr) Variable ShaderRecordBufferKHR
|
||||
40: TypeInt 32 1
|
||||
41: 40(int) Constant 1
|
||||
42: TypePointer ShaderRecordBufferKHR 36(fvec3)
|
||||
45: 35(float) Constant 1056964608
|
||||
46: 40(int) Constant 0
|
||||
49: 35(float) Constant 1061158912
|
||||
50(accEXT1): 28(ptr) Variable UniformConstant
|
||||
51: TypeImage 6(int) 2D nonsampled format:R32ui
|
||||
52: TypePointer UniformConstant 51
|
||||
53(imageu): 52(ptr) Variable UniformConstant
|
||||
54: TypeVector 35(float) 4
|
||||
55: TypePointer RayPayloadKHR 54(fvec4)
|
||||
56(payload): 55(ptr) Variable RayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(lx): 7(ptr) Variable Function
|
||||
16(ly): 7(ptr) Variable Function
|
||||
20(sx): 7(ptr) Variable Function
|
||||
24(sy): 7(ptr) Variable Function
|
||||
14: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 12
|
||||
15: 6(int) Load 14
|
||||
Store 8(lx) 15
|
||||
18: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 17
|
||||
19: 6(int) Load 18
|
||||
Store 16(ly) 19
|
||||
22: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 12
|
||||
23: 6(int) Load 22
|
||||
Store 20(sx) 23
|
||||
25: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 17
|
||||
26: 6(int) Load 25
|
||||
Store 24(sy) 26
|
||||
30: 27 Load 29(accEXT0)
|
||||
31: 6(int) Load 8(lx)
|
||||
32: 6(int) Load 16(ly)
|
||||
33: 6(int) Load 20(sx)
|
||||
34: 6(int) Load 24(sy)
|
||||
43: 42(ptr) AccessChain 39 41
|
||||
44: 36(fvec3) Load 43
|
||||
47: 42(ptr) AccessChain 39 46
|
||||
48: 36(fvec3) Load 47
|
||||
TraceRayKHR 30 31 32 33 34 12 44 45 48 49 41
|
||||
Return
|
||||
FunctionEnd
|
91
Test/baseResults/spv.ext.RayGenShader11.rgen.out
Normal file
91
Test/baseResults/spv.ext.RayGenShader11.rgen.out
Normal file
@ -0,0 +1,91 @@
|
||||
spv.ext.RayGenShader11.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 53
|
||||
|
||||
Capability RayTracingProvisionalKHR
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main" 11 21
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 8 "lx"
|
||||
Name 11 "gl_LaunchIDEXT"
|
||||
Name 16 "ly"
|
||||
Name 20 "sx"
|
||||
Name 21 "gl_LaunchSizeEXT"
|
||||
Name 24 "sy"
|
||||
Name 29 "accEXT"
|
||||
Name 37 "block"
|
||||
MemberName 37(block) 0 "dir"
|
||||
MemberName 37(block) 1 "origin"
|
||||
Name 39 ""
|
||||
Name 52 "payload"
|
||||
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
||||
Decorate 21(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
||||
Decorate 29(accEXT) DescriptorSet 0
|
||||
Decorate 29(accEXT) Binding 0
|
||||
MemberDecorate 37(block) 0 Offset 0
|
||||
MemberDecorate 37(block) 1 Offset 16
|
||||
Decorate 37(block) BufferBlock
|
||||
Decorate 52(payload) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypePointer Function 6(int)
|
||||
9: TypeVector 6(int) 3
|
||||
10: TypePointer Input 9(ivec3)
|
||||
11(gl_LaunchIDEXT): 10(ptr) Variable Input
|
||||
12: 6(int) Constant 0
|
||||
13: TypePointer Input 6(int)
|
||||
17: 6(int) Constant 1
|
||||
21(gl_LaunchSizeEXT): 10(ptr) Variable Input
|
||||
27: TypeAccelerationStructureKHR
|
||||
28: TypePointer UniformConstant 27
|
||||
29(accEXT): 28(ptr) Variable UniformConstant
|
||||
35: TypeFloat 32
|
||||
36: TypeVector 35(float) 3
|
||||
37(block): TypeStruct 36(fvec3) 36(fvec3)
|
||||
38: TypePointer ShaderRecordBufferKHR 37(block)
|
||||
39: 38(ptr) Variable ShaderRecordBufferKHR
|
||||
40: TypeInt 32 1
|
||||
41: 40(int) Constant 1
|
||||
42: TypePointer ShaderRecordBufferKHR 36(fvec3)
|
||||
45: 35(float) Constant 1056964608
|
||||
46: 40(int) Constant 0
|
||||
49: 35(float) Constant 1061158912
|
||||
50: TypeVector 35(float) 4
|
||||
51: TypePointer RayPayloadKHR 50(fvec4)
|
||||
52(payload): 51(ptr) Variable RayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(lx): 7(ptr) Variable Function
|
||||
16(ly): 7(ptr) Variable Function
|
||||
20(sx): 7(ptr) Variable Function
|
||||
24(sy): 7(ptr) Variable Function
|
||||
14: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 12
|
||||
15: 6(int) Load 14
|
||||
Store 8(lx) 15
|
||||
18: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 17
|
||||
19: 6(int) Load 18
|
||||
Store 16(ly) 19
|
||||
22: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 12
|
||||
23: 6(int) Load 22
|
||||
Store 20(sx) 23
|
||||
25: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 17
|
||||
26: 6(int) Load 25
|
||||
Store 24(sy) 26
|
||||
30: 27 Load 29(accEXT)
|
||||
31: 6(int) Load 8(lx)
|
||||
32: 6(int) Load 16(ly)
|
||||
33: 6(int) Load 20(sx)
|
||||
34: 6(int) Load 24(sy)
|
||||
43: 42(ptr) AccessChain 39 41
|
||||
44: 36(fvec3) Load 43
|
||||
47: 42(ptr) AccessChain 39 46
|
||||
48: 36(fvec3) Load 47
|
||||
TraceRayKHR 30 31 32 33 34 12 44 45 48 49 41
|
||||
Return
|
||||
FunctionEnd
|
141
Test/baseResults/spv.ext.RayGenShaderArray.rgen.out
Normal file
141
Test/baseResults/spv.ext.RayGenShaderArray.rgen.out
Normal file
@ -0,0 +1,141 @@
|
||||
spv.ext.RayGenShaderArray.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 89
|
||||
|
||||
Capability ShaderNonUniformEXT
|
||||
Capability RuntimeDescriptorArrayEXT
|
||||
Capability RayTracingProvisionalKHR
|
||||
Extension "SPV_EXT_descriptor_indexing"
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main" 11 21
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_nonuniform_qualifier"
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 8 "lx"
|
||||
Name 11 "gl_LaunchIDEXT"
|
||||
Name 16 "ly"
|
||||
Name 20 "sx"
|
||||
Name 21 "gl_LaunchSizeEXT"
|
||||
Name 24 "sy"
|
||||
Name 30 "accEXT0"
|
||||
Name 34 "block"
|
||||
MemberName 34(block) 0 "dir"
|
||||
MemberName 34(block) 1 "origin"
|
||||
MemberName 34(block) 2 "i"
|
||||
Name 36 ""
|
||||
Name 60 "accEXT1"
|
||||
Name 88 "payload"
|
||||
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
||||
Decorate 21(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
||||
Decorate 30(accEXT0) DescriptorSet 0
|
||||
Decorate 30(accEXT0) Binding 0
|
||||
MemberDecorate 34(block) 0 Offset 0
|
||||
MemberDecorate 34(block) 1 Offset 16
|
||||
MemberDecorate 34(block) 2 Offset 28
|
||||
Decorate 34(block) BufferBlock
|
||||
Decorate 60(accEXT1) DescriptorSet 0
|
||||
Decorate 60(accEXT1) Binding 1
|
||||
Decorate 75 DecorationNonUniformEXT
|
||||
Decorate 76 DecorationNonUniformEXT
|
||||
Decorate 77 DecorationNonUniformEXT
|
||||
Decorate 88(payload) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypePointer Function 6(int)
|
||||
9: TypeVector 6(int) 3
|
||||
10: TypePointer Input 9(ivec3)
|
||||
11(gl_LaunchIDEXT): 10(ptr) Variable Input
|
||||
12: 6(int) Constant 0
|
||||
13: TypePointer Input 6(int)
|
||||
17: 6(int) Constant 1
|
||||
21(gl_LaunchSizeEXT): 10(ptr) Variable Input
|
||||
27: TypeAccelerationStructureKHR
|
||||
28: TypeRuntimeArray 27
|
||||
29: TypePointer UniformConstant 28
|
||||
30(accEXT0): 29(ptr) Variable UniformConstant
|
||||
31: TypeFloat 32
|
||||
32: TypeVector 31(float) 3
|
||||
33: TypeInt 32 1
|
||||
34(block): TypeStruct 32(fvec3) 32(fvec3) 33(int)
|
||||
35: TypePointer ShaderRecordBufferKHR 34(block)
|
||||
36: 35(ptr) Variable ShaderRecordBufferKHR
|
||||
37: 33(int) Constant 2
|
||||
38: TypePointer ShaderRecordBufferKHR 33(int)
|
||||
41: TypePointer UniformConstant 27
|
||||
48: 33(int) Constant 1
|
||||
49: TypePointer ShaderRecordBufferKHR 32(fvec3)
|
||||
52: 31(float) Constant 1056964608
|
||||
53: 33(int) Constant 0
|
||||
56: 31(float) Constant 1061158912
|
||||
57: 6(int) Constant 2
|
||||
58: TypeArray 27 57
|
||||
59: TypePointer UniformConstant 58
|
||||
60(accEXT1): 59(ptr) Variable UniformConstant
|
||||
86: TypeVector 31(float) 4
|
||||
87: TypePointer RayPayloadKHR 86(fvec4)
|
||||
88(payload): 87(ptr) Variable RayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(lx): 7(ptr) Variable Function
|
||||
16(ly): 7(ptr) Variable Function
|
||||
20(sx): 7(ptr) Variable Function
|
||||
24(sy): 7(ptr) Variable Function
|
||||
14: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 12
|
||||
15: 6(int) Load 14
|
||||
Store 8(lx) 15
|
||||
18: 13(ptr) AccessChain 11(gl_LaunchIDEXT) 17
|
||||
19: 6(int) Load 18
|
||||
Store 16(ly) 19
|
||||
22: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 12
|
||||
23: 6(int) Load 22
|
||||
Store 20(sx) 23
|
||||
25: 13(ptr) AccessChain 21(gl_LaunchSizeEXT) 17
|
||||
26: 6(int) Load 25
|
||||
Store 24(sy) 26
|
||||
39: 38(ptr) AccessChain 36 37
|
||||
40: 33(int) Load 39
|
||||
42: 41(ptr) AccessChain 30(accEXT0) 40
|
||||
43: 27 Load 42
|
||||
44: 6(int) Load 8(lx)
|
||||
45: 6(int) Load 16(ly)
|
||||
46: 6(int) Load 20(sx)
|
||||
47: 6(int) Load 24(sy)
|
||||
50: 49(ptr) AccessChain 36 48
|
||||
51: 32(fvec3) Load 50
|
||||
54: 49(ptr) AccessChain 36 53
|
||||
55: 32(fvec3) Load 54
|
||||
TraceRayKHR 43 44 45 46 47 12 51 52 55 56 48
|
||||
61: 38(ptr) AccessChain 36 37
|
||||
62: 33(int) Load 61
|
||||
63: 41(ptr) AccessChain 60(accEXT1) 62
|
||||
64: 27 Load 63
|
||||
65: 6(int) Load 8(lx)
|
||||
66: 6(int) Load 16(ly)
|
||||
67: 6(int) Load 20(sx)
|
||||
68: 6(int) Load 24(sy)
|
||||
69: 49(ptr) AccessChain 36 48
|
||||
70: 32(fvec3) Load 69
|
||||
71: 49(ptr) AccessChain 36 53
|
||||
72: 32(fvec3) Load 71
|
||||
TraceRayKHR 64 65 66 67 68 12 70 52 72 56 48
|
||||
73: 38(ptr) AccessChain 36 37
|
||||
74: 33(int) Load 73
|
||||
75: 33(int) CopyObject 74
|
||||
76: 41(ptr) AccessChain 30(accEXT0) 75
|
||||
77: 27 Load 76
|
||||
78: 6(int) Load 8(lx)
|
||||
79: 6(int) Load 16(ly)
|
||||
80: 6(int) Load 20(sx)
|
||||
81: 6(int) Load 24(sy)
|
||||
82: 49(ptr) AccessChain 36 48
|
||||
83: 32(fvec3) Load 82
|
||||
84: 49(ptr) AccessChain 36 53
|
||||
85: 32(fvec3) Load 84
|
||||
TraceRayKHR 77 78 79 80 81 12 83 52 85 56 48
|
||||
Return
|
||||
FunctionEnd
|
40
Test/baseResults/spv.ext.RayGenShader_Errors.rgen.out
Normal file
40
Test/baseResults/spv.ext.RayGenShader_Errors.rgen.out
Normal file
@ -0,0 +1,40 @@
|
||||
spv.ext.RayGenShader_Errors.rgen
|
||||
ERROR: 0:3: 'hitAttributeEXT' : not supported in this stage: ray-generation
|
||||
ERROR: 0:4: 'rayPayloadInEXT' : not supported in this stage: ray-generation
|
||||
ERROR: 0:5: 'shaderRecordNV' : can only be used with a buffer
|
||||
ERROR: 0:9: 'binding' : cannot be used with shaderRecordNV
|
||||
ERROR: 0:12: 'set' : cannot be used with shaderRecordNV
|
||||
ERROR: 0:23: 'accelerationStructureNV' : accelerationStructureNV can only be used in uniform variables or function parameters: a
|
||||
ERROR: 0:23: '=' : cannot convert from ' const int' to ' temp accelerationStructureNV'
|
||||
ERROR: 0:24: 'gl_PrimitiveID' : undeclared identifier
|
||||
ERROR: 0:24: '=' : cannot convert from ' temp float' to ' temp highp int'
|
||||
ERROR: 0:25: 'gl_InstanceID' : undeclared identifier (Did you mean gl_InstanceIndex?)
|
||||
ERROR: 0:25: '=' : cannot convert from ' temp float' to ' temp highp int'
|
||||
ERROR: 0:26: 'gl_InstanceCustomIndexEXT' : undeclared identifier
|
||||
ERROR: 0:26: '=' : cannot convert from ' temp float' to ' temp highp int'
|
||||
ERROR: 0:27: 'gl_WorldRayOriginEXT' : undeclared identifier
|
||||
ERROR: 0:27: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
|
||||
ERROR: 0:28: 'gl_WorldRayDirectionEXT' : undeclared identifier
|
||||
ERROR: 0:28: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
|
||||
ERROR: 0:29: 'gl_ObjectRayOriginEXT' : undeclared identifier
|
||||
ERROR: 0:29: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
|
||||
ERROR: 0:30: 'gl_ObjectRayDirectionEXT' : undeclared identifier
|
||||
ERROR: 0:30: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
|
||||
ERROR: 0:31: 'gl_RayTminEXT' : undeclared identifier
|
||||
ERROR: 0:32: 'gl_RayTmaxEXT' : undeclared identifier
|
||||
ERROR: 0:33: 'gl_ObjectToWorldEXT' : undeclared identifier
|
||||
ERROR: 0:33: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
|
||||
ERROR: 0:34: 'gl_WorldToObjectEXT' : undeclared identifier
|
||||
ERROR: 0:34: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
|
||||
ERROR: 0:35: 'gl_HitTEXT' : undeclared identifier
|
||||
ERROR: 0:36: 'gl_HitKindEXT' : undeclared identifier
|
||||
ERROR: 0:37: 'reportIntersectionEXT' : no matching overloaded function found
|
||||
ERROR: 0:38: 'ignoreIntersectionEXT' : no matching overloaded function found
|
||||
ERROR: 0:39: 'terminateRayEXT' : no matching overloaded function found
|
||||
ERROR: 0:40: 'assign' : l-value required "anon@3" (can't modify a shaderrecordnv qualified buffer)
|
||||
ERROR: 33 compilation errors. No code generated.
|
||||
|
||||
|
||||
ERROR: Linking ray-generation stage: Only one shaderRecordNV buffer block is allowed per stage
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
29
Test/spv.ext.AnyHitShader.rahit
Normal file
29
Test/spv.ext.AnyHitShader.rahit
Normal file
@ -0,0 +1,29 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
layout(location = 1) rayPayloadInEXT vec4 incomingPayload;
|
||||
void main()
|
||||
{
|
||||
uvec3 v0 = gl_LaunchIDEXT;
|
||||
uvec3 v1 = gl_LaunchSizeEXT;
|
||||
int v2 = gl_PrimitiveID;
|
||||
int v3 = gl_InstanceID;
|
||||
int v4 = gl_InstanceCustomIndexEXT;
|
||||
vec3 v5 = gl_WorldRayOriginEXT;
|
||||
vec3 v6 = gl_WorldRayDirectionEXT;
|
||||
vec3 v7 = gl_ObjectRayOriginEXT;
|
||||
vec3 v8 = gl_ObjectRayDirectionEXT;
|
||||
float v9 = gl_RayTminEXT;
|
||||
float v10 = gl_RayTmaxEXT;
|
||||
float v11 = gl_HitTEXT;
|
||||
uint v12 = gl_HitKindEXT;
|
||||
mat4x3 v13 = gl_ObjectToWorldEXT;
|
||||
mat4x3 v14 = gl_WorldToObjectEXT;
|
||||
int v15 = gl_GeometryIndexEXT;
|
||||
mat3x4 v16 = gl_ObjectToWorld3x4EXT;
|
||||
mat3x4 v17 = gl_WorldToObject3x4EXT;
|
||||
incomingPayload = vec4(0.5f);
|
||||
if (v2 == 1)
|
||||
ignoreIntersectionEXT();
|
||||
else
|
||||
terminateRayEXT();
|
||||
}
|
11
Test/spv.ext.AnyHitShader_Errors.rahit
Normal file
11
Test/spv.ext.AnyHitShader_Errors.rahit
Normal file
@ -0,0 +1,11 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
hitAttributeEXT vec4 payload;
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
|
||||
|
||||
void main()
|
||||
{
|
||||
payload.x = 1.0f; // ERROR, cannot write to hitattributeEXT in stage
|
||||
reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage
|
||||
traceRayEXT(accEXT, 0, 0, 1, 1, 0, vec3(0.0f), 0.5f, vec3(1.0f), 0.75f, 0); // ERROR, unsupported builtin in stage
|
||||
}
|
27
Test/spv.ext.ClosestHitShader.rchit
Normal file
27
Test/spv.ext.ClosestHitShader.rchit
Normal file
@ -0,0 +1,27 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
|
||||
layout(location = 0) rayPayloadEXT vec4 localPayload;
|
||||
layout(location = 1) rayPayloadInEXT vec4 incomingPayload;
|
||||
void main()
|
||||
{
|
||||
uvec3 v0 = gl_LaunchIDEXT;
|
||||
uvec3 v1 = gl_LaunchSizeEXT;
|
||||
int v2 = gl_PrimitiveID;
|
||||
int v3 = gl_InstanceID;
|
||||
int v4 = gl_InstanceCustomIndexEXT;
|
||||
vec3 v5 = gl_WorldRayOriginEXT;
|
||||
vec3 v6 = gl_WorldRayDirectionEXT;
|
||||
vec3 v7 = gl_ObjectRayOriginEXT;
|
||||
vec3 v8 = gl_ObjectRayDirectionEXT;
|
||||
float v9 = gl_RayTminEXT;
|
||||
float v10 = gl_RayTmaxEXT;
|
||||
float v11 = gl_HitTEXT;
|
||||
uint v12 = gl_HitKindEXT;
|
||||
mat4x3 v13 = gl_ObjectToWorldEXT;
|
||||
mat4x3 v14 = gl_WorldToObjectEXT;
|
||||
int v15 = gl_GeometryIndexEXT;
|
||||
mat3x4 v16 = gl_ObjectToWorld3x4EXT;
|
||||
mat3x4 v17 = gl_WorldToObject3x4EXT;
|
||||
traceRayEXT(accEXT, 0u, 1u, 2u, 3u, 0u, vec3(0.5f), 0.5f, vec3(1.0f), 0.75f, 1);
|
||||
}
|
12
Test/spv.ext.ClosestHitShader_Errors.rchit
Normal file
12
Test/spv.ext.ClosestHitShader_Errors.rchit
Normal file
@ -0,0 +1,12 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
hitAttributeEXT vec4 payload;
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
|
||||
|
||||
void main()
|
||||
{
|
||||
payload.x = 1.0f; // ERROR, cannot write to hitattributeEXT in stage
|
||||
reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage
|
||||
terminateRayEXT();
|
||||
ignoreIntersectionEXT();
|
||||
}
|
23
Test/spv.ext.IntersectShader.rint
Normal file
23
Test/spv.ext.IntersectShader.rint
Normal file
@ -0,0 +1,23 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
hitAttributeEXT vec4 iAttr;
|
||||
void main()
|
||||
{
|
||||
uvec3 v0 = gl_LaunchIDEXT;
|
||||
uvec3 v1 = gl_LaunchSizeEXT;
|
||||
int v2 = gl_PrimitiveID;
|
||||
int v3 = gl_InstanceID;
|
||||
int v4 = gl_InstanceCustomIndexEXT;
|
||||
vec3 v5 = gl_WorldRayOriginEXT;
|
||||
vec3 v6 = gl_WorldRayDirectionEXT;
|
||||
vec3 v7 = gl_ObjectRayOriginEXT;
|
||||
vec3 v8 = gl_ObjectRayDirectionEXT;
|
||||
float v9 = gl_RayTminEXT;
|
||||
float v10 = gl_RayTmaxEXT;
|
||||
mat4x3 v11 = gl_ObjectToWorldEXT;
|
||||
mat4x3 v12 = gl_WorldToObjectEXT;
|
||||
mat3x4 v13 = gl_ObjectToWorld3x4EXT;
|
||||
mat3x4 v14 = gl_WorldToObject3x4EXT;
|
||||
iAttr = vec4(0.5f,0.5f,0.0f,1.0f);
|
||||
reportIntersectionEXT(0.5, 1U);
|
||||
}
|
11
Test/spv.ext.IntersectShader_Errors.rint
Normal file
11
Test/spv.ext.IntersectShader_Errors.rint
Normal file
@ -0,0 +1,11 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
rayPayloadInEXT vec4 payloadIn; // ERROR, rayPayloadIn unsupported in this stage
|
||||
rayPayloadEXT vec4 payload; // ERROR, rayPayload unsuppoted in this stage
|
||||
uniform accelerationStructureEXT accEXT;
|
||||
void main()
|
||||
{
|
||||
float e12 = gl_HitTEXT; // ERROR, unsupported builtin in stage
|
||||
float e13 = gl_HitKindEXT; // ERROR, unsupported builtin in stage
|
||||
traceRayEXT(accEXT, 0, 0, 1, 1, 0, vec3(0.0f), 0.5f, vec3(1.0f), 0.75f, 0); // ERROR, unsupported
|
||||
}
|
15
Test/spv.ext.MissShader.rmiss
Normal file
15
Test/spv.ext.MissShader.rmiss
Normal file
@ -0,0 +1,15 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
|
||||
layout(location = 0) rayPayloadEXT vec4 localPayload;
|
||||
layout(location = 1) rayPayloadInEXT vec4 incomingPayload;
|
||||
void main()
|
||||
{
|
||||
uvec3 v0 = gl_LaunchIDEXT;
|
||||
uvec3 v1 = gl_LaunchSizeEXT;
|
||||
vec3 v2 = gl_WorldRayOriginEXT;
|
||||
vec3 v3 = gl_WorldRayDirectionEXT;
|
||||
float v4 = gl_RayTminEXT;
|
||||
float v5 = gl_RayTmaxEXT;
|
||||
traceRayEXT(accEXT, 0u, 1u, 2u, 3u, 0u, vec3(0.5f), 0.5f, vec3(1.0f), 0.75f, 1);
|
||||
}
|
16
Test/spv.ext.MissShader_Errors.rmiss
Normal file
16
Test/spv.ext.MissShader_Errors.rmiss
Normal file
@ -0,0 +1,16 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
hitAttributeEXT vec4 payload; // ERROR, hitattributeEXT unsupported in this stage
|
||||
void main()
|
||||
{
|
||||
int e0 = gl_PrimitiveID; // ERROR, unsupported builtin in stage
|
||||
int e1 = gl_InstanceID; // ERROR, unsupported builtin in stage
|
||||
int e3 = gl_InstanceCustomIndexEXT; // ERROR, unsupported builtin in stage
|
||||
mat4x3 e10 = gl_ObjectToWorldEXT; // ERROR, unsupported builtin in stage
|
||||
mat4x3 e11 = gl_WorldToObjectEXT; // ERROR, unsupported builtin in stage
|
||||
float e12 = gl_HitTEXT; // ERROR, unsupported builtin in stage
|
||||
float e13 = gl_HitKindEXT; // ERROR, unsupported builtin in stage
|
||||
reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage
|
||||
ignoreIntersectionEXT(); // ERROR, unsupported builtin in stage
|
||||
terminateRayEXT(); // ERROR, unsupported builtin in stage
|
||||
}
|
13
Test/spv.ext.RayCallable.rcall
Normal file
13
Test/spv.ext.RayCallable.rcall
Normal file
@ -0,0 +1,13 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
layout(location = 0) callableDataEXT vec4 data0;
|
||||
layout(location = 1) callableDataInEXT dataBlock {
|
||||
uint data1;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
uvec3 id = gl_LaunchIDEXT;
|
||||
uvec3 size = gl_LaunchSizeEXT;
|
||||
data1 = 256U;
|
||||
executeCallableEXT(2,1);
|
||||
}
|
26
Test/spv.ext.RayCallable_Errors.rcall
Normal file
26
Test/spv.ext.RayCallable_Errors.rcall
Normal file
@ -0,0 +1,26 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
hitAttributeEXT vec4 hitattr; // ERROR, hitattributeEXT unsupported in this stage
|
||||
rayPayloadEXT vec4 payload; // ERROR, rayPayloadEXT unsupported in this stage
|
||||
rayPayloadInEXT vec4 payloadIn; // ERROR, rayPayloadInEXT unsupported in this stage
|
||||
|
||||
void main()
|
||||
{
|
||||
int e0 = gl_PrimitiveID; // ERROR, unsupported builtin in stage
|
||||
int e1 = gl_InstanceID; // ERROR, unsupported builtin in stage
|
||||
int e3 = gl_InstanceCustomIndexEXT; // ERROR, unsupported builtin in stage
|
||||
vec3 e4 = gl_WorldRayOriginEXT; // ERROR, unsupported builtin in stage
|
||||
vec3 e5 = gl_WorldRayDirectionEXT; // ERROR, unsupported builtin in stage
|
||||
vec3 e6 = gl_ObjectRayOriginEXT; // ERROR, unsupported builtin in stage
|
||||
vec3 e7 = gl_ObjectRayDirectionEXT; // ERROR, unsupported builtin in stage
|
||||
float e8 = gl_RayTminEXT; // ERROR, unsupported builtin in stage
|
||||
float e9 = gl_RayTmaxEXT; // ERROR, unsupported builtin in stage
|
||||
mat4x3 e10 = gl_ObjectToWorldEXT; // ERROR, unsupported builtin in stage
|
||||
mat4x3 e11 = gl_WorldToObjectEXT; // ERROR, unsupported builtin in stage
|
||||
float e12 = gl_HitTEXT; // ERROR, unsupported builtin in stage
|
||||
float e13 = gl_HitKindEXT; // ERROR, unsupported builtin in stage
|
||||
uint curFlags = gl_IncomingRayFlagsEXT; // ERROR, unsupported builtin in stage
|
||||
reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage
|
||||
ignoreIntersectionEXT(); // ERROR, unsupported builtin in stage
|
||||
terminateRayEXT(); // ERROR, unsupported builtin in stage
|
||||
}
|
15
Test/spv.ext.RayConstants.rgen
Normal file
15
Test/spv.ext.RayConstants.rgen
Normal file
@ -0,0 +1,15 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
|
||||
layout(location = 0) rayPayloadEXT vec4 payload;
|
||||
void main()
|
||||
{
|
||||
const uint rayFlags = gl_RayFlagsNoneEXT | gl_RayFlagsOpaqueEXT |
|
||||
gl_RayFlagsNoOpaqueEXT | gl_RayFlagsTerminateOnFirstHitEXT |
|
||||
gl_RayFlagsSkipClosestHitShaderEXT | gl_RayFlagsCullBackFacingTrianglesEXT |
|
||||
gl_RayFlagsCullFrontFacingTrianglesEXT | gl_RayFlagsCullOpaqueEXT |
|
||||
gl_RayFlagsCullNoOpaqueEXT;
|
||||
|
||||
const int payloadId = 1;
|
||||
traceRayEXT(accEXT, rayFlags, 0, 1, 1, 0, vec3(0.0f), 0.5f, vec3(1.0f), 0.75f, payloadId);
|
||||
}
|
20
Test/spv.ext.RayGenShader.rgen
Normal file
20
Test/spv.ext.RayGenShader.rgen
Normal file
@ -0,0 +1,20 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT0;
|
||||
layout(binding = 1, set = 0) uniform accelerationStructureEXT accEXT1; // Unused
|
||||
layout(binding = 2, r32ui) shadercallcoherent uniform uimage2D imageu;
|
||||
layout(location = 0) rayPayloadEXT vec4 payload;
|
||||
layout(shaderRecordEXT) buffer block
|
||||
{
|
||||
vec3 dir;
|
||||
vec3 origin;
|
||||
|
||||
};
|
||||
void main()
|
||||
{
|
||||
uint lx = gl_LaunchIDEXT.x;
|
||||
uint ly = gl_LaunchIDEXT.y;
|
||||
uint sx = gl_LaunchSizeEXT.x;
|
||||
uint sy = gl_LaunchSizeEXT.y;
|
||||
traceRayEXT(accEXT0, lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
|
||||
}
|
17
Test/spv.ext.RayGenShader11.rgen
Normal file
17
Test/spv.ext.RayGenShader11.rgen
Normal file
@ -0,0 +1,17 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT;
|
||||
layout(location = 0) rayPayloadEXT vec4 payload;
|
||||
layout(shaderRecordEXT) buffer block
|
||||
{
|
||||
vec3 dir;
|
||||
vec3 origin;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
uint lx = gl_LaunchIDEXT.x;
|
||||
uint ly = gl_LaunchIDEXT.y;
|
||||
uint sx = gl_LaunchSizeEXT.x;
|
||||
uint sy = gl_LaunchSizeEXT.y;
|
||||
traceRayEXT(accEXT, lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
|
||||
}
|
22
Test/spv.ext.RayGenShaderArray.rgen
Normal file
22
Test/spv.ext.RayGenShaderArray.rgen
Normal file
@ -0,0 +1,22 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
#extension GL_EXT_nonuniform_qualifier : enable
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT0[];
|
||||
layout(binding = 1, set = 0) uniform accelerationStructureEXT accEXT1[2];
|
||||
layout(location = 0) rayPayloadEXT vec4 payload;
|
||||
layout(shaderRecordEXT) buffer block
|
||||
{
|
||||
vec3 dir;
|
||||
vec3 origin;
|
||||
int i;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
uint lx = gl_LaunchIDEXT.x;
|
||||
uint ly = gl_LaunchIDEXT.y;
|
||||
uint sx = gl_LaunchSizeEXT.x;
|
||||
uint sy = gl_LaunchSizeEXT.y;
|
||||
traceRayEXT(accEXT0[i], lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
|
||||
traceRayEXT(accEXT1[i], lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
|
||||
traceRayEXT(accEXT0[nonuniformEXT(i)], lx, ly, sx, sy, 0u, origin, 0.5f, dir, 0.75f, 1);
|
||||
}
|
41
Test/spv.ext.RayGenShader_Errors.rgen
Normal file
41
Test/spv.ext.RayGenShader_Errors.rgen
Normal file
@ -0,0 +1,41 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
hitAttributeEXT vec4 payload; // ERROR, hitattributeEXT unsupported in this stage
|
||||
rayPayloadInEXT vec4 payloadIn; // ERROR, rayPayloadIn unsupported in this stage
|
||||
layout(shaderRecordEXT) uniform ublock // ERROR, shaderRecordEXT unsupported on uniform blocks
|
||||
{
|
||||
float a;
|
||||
};
|
||||
layout(binding = 0, shaderRecordEXT) buffer bblock { // ERROR, binding unsupported on shaderRecordEXT blocks
|
||||
float b;
|
||||
};
|
||||
layout(set = 0, shaderRecordEXT) buffer bblock2 { // ERROR, set unsupported on shaderRecordEXT blocks
|
||||
float c;
|
||||
};
|
||||
layout(shaderRecordEXT) buffer bblock3 {
|
||||
float d;
|
||||
};
|
||||
layout(shaderRecordEXT) buffer bblock4 { // ERROR, cannot have more than one shaderRecordEXTX block
|
||||
float e;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
accelerationStructureEXT a = 0;
|
||||
int e0 = gl_PrimitiveID; // ERROR, unsupported builtin in stage
|
||||
int e1 = gl_InstanceID; // ERROR, unsupported builtin in stage
|
||||
int e3 = gl_InstanceCustomIndexEXT; // ERROR, unsupported builtin in stage
|
||||
vec3 e4 = gl_WorldRayOriginEXT; // ERROR, unsupported builtin in stage
|
||||
vec3 e5 = gl_WorldRayDirectionEXT; // ERROR, unsupported builtin in stage
|
||||
vec3 e6 = gl_ObjectRayOriginEXT; // ERROR, unsupported builtin in stage
|
||||
vec3 e7 = gl_ObjectRayDirectionEXT; // ERROR, unsupported builtin in stage
|
||||
float e8 = gl_RayTminEXT; // ERROR, unsupported builtin in stage
|
||||
float e9 = gl_RayTmaxEXT; // ERROR, unsupported builtin in stage
|
||||
mat4x3 e10 = gl_ObjectToWorldEXT; // ERROR, unsupported builtin in stage
|
||||
mat4x3 e11 = gl_WorldToObjectEXT; // ERROR, unsupported builtin in stage
|
||||
float e12 = gl_HitTEXT; // ERROR, unsupported builtin in stage
|
||||
float e13 = gl_HitKindEXT; // ERROR, unsupported builtin in stage
|
||||
reportIntersectionEXT(1.0, 1U); // ERROR, unsupported builtin in stage
|
||||
ignoreIntersectionEXT(); // ERROR, unsupported builtin in stage
|
||||
terminateRayEXT(); // ERROR, unsupported builtin in stage
|
||||
d = 1.0f; // ERROR, can't modify shaderRecordEXT block
|
||||
}
|
@ -183,17 +183,17 @@ static EShLanguage c_shader_stage(glslang_stage_t stage)
|
||||
case GLSLANG_STAGE_COMPUTE:
|
||||
return EShLangCompute;
|
||||
case GLSLANG_STAGE_RAYGEN_NV:
|
||||
return EShLangRayGenNV;
|
||||
return EShLangRayGen;
|
||||
case GLSLANG_STAGE_INTERSECT_NV:
|
||||
return EShLangIntersectNV;
|
||||
return EShLangIntersect;
|
||||
case GLSLANG_STAGE_ANYHIT_NV:
|
||||
return EShLangAnyHitNV;
|
||||
return EShLangAnyHit;
|
||||
case GLSLANG_STAGE_CLOSESTHIT_NV:
|
||||
return EShLangClosestHitNV;
|
||||
return EShLangClosestHit;
|
||||
case GLSLANG_STAGE_MISS_NV:
|
||||
return EShLangMissNV;
|
||||
return EShLangMiss;
|
||||
case GLSLANG_STAGE_CALLABLE_NV:
|
||||
return EShLangCallableNV;
|
||||
return EShLangCallable;
|
||||
case GLSLANG_STAGE_TASK_NV:
|
||||
return EShLangTaskNV;
|
||||
case GLSLANG_STAGE_MESH_NV:
|
||||
|
@ -61,7 +61,7 @@ enum TBasicType {
|
||||
EbtSampler,
|
||||
EbtStruct,
|
||||
EbtBlock,
|
||||
EbtAccStructNV,
|
||||
EbtAccStruct,
|
||||
EbtReference,
|
||||
|
||||
// HLSL types that live only temporarily.
|
||||
@ -90,11 +90,11 @@ enum TStorageQualifier {
|
||||
EvqBuffer, // read/write, shared with app
|
||||
EvqShared, // compute shader's read/write 'shared' qualifier
|
||||
|
||||
EvqPayloadNV,
|
||||
EvqPayloadInNV,
|
||||
EvqHitAttrNV,
|
||||
EvqCallableDataNV,
|
||||
EvqCallableDataInNV,
|
||||
EvqPayload,
|
||||
EvqPayloadIn,
|
||||
EvqHitAttr,
|
||||
EvqCallableData,
|
||||
EvqCallableDataIn,
|
||||
|
||||
// parameters
|
||||
EvqIn, // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter
|
||||
@ -238,20 +238,23 @@ enum TBuiltInVariable {
|
||||
EbvFragmentSizeNV,
|
||||
EbvInvocationsPerPixelNV,
|
||||
// ray tracing
|
||||
EbvLaunchIdNV,
|
||||
EbvLaunchSizeNV,
|
||||
EbvInstanceCustomIndexNV,
|
||||
EbvWorldRayOriginNV,
|
||||
EbvWorldRayDirectionNV,
|
||||
EbvObjectRayOriginNV,
|
||||
EbvObjectRayDirectionNV,
|
||||
EbvRayTminNV,
|
||||
EbvRayTmaxNV,
|
||||
EbvHitTNV,
|
||||
EbvHitKindNV,
|
||||
EbvObjectToWorldNV,
|
||||
EbvWorldToObjectNV,
|
||||
EbvIncomingRayFlagsNV,
|
||||
EbvLaunchId,
|
||||
EbvLaunchSize,
|
||||
EbvInstanceCustomIndex,
|
||||
EbvGeometryIndex,
|
||||
EbvWorldRayOrigin,
|
||||
EbvWorldRayDirection,
|
||||
EbvObjectRayOrigin,
|
||||
EbvObjectRayDirection,
|
||||
EbvRayTmin,
|
||||
EbvRayTmax,
|
||||
EbvHitT,
|
||||
EbvHitKind,
|
||||
EbvObjectToWorld,
|
||||
EbvObjectToWorld3x4,
|
||||
EbvWorldToObject,
|
||||
EbvWorldToObject3x4,
|
||||
EbvIncomingRayFlags,
|
||||
// barycentrics
|
||||
EbvBaryCoordNV,
|
||||
EbvBaryCoordNoPerspNV,
|
||||
@ -328,11 +331,11 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
|
||||
case EvqPointCoord: return "gl_PointCoord"; break;
|
||||
case EvqFragColor: return "fragColor"; break;
|
||||
case EvqFragDepth: return "gl_FragDepth"; break;
|
||||
case EvqPayloadNV: return "rayPayloadNV"; break;
|
||||
case EvqPayloadInNV: return "rayPayloadInNV"; break;
|
||||
case EvqHitAttrNV: return "hitAttributeNV"; break;
|
||||
case EvqCallableDataNV: return "callableDataNV"; break;
|
||||
case EvqCallableDataInNV: return "callableDataInNV"; break;
|
||||
case EvqPayload: return "rayPayloadNV"; break;
|
||||
case EvqPayloadIn: return "rayPayloadInNV"; break;
|
||||
case EvqHitAttr: return "hitAttributeNV"; break;
|
||||
case EvqCallableData: return "callableDataNV"; break;
|
||||
case EvqCallableDataIn: return "callableDataInNV"; break;
|
||||
default: return "unknown qualifier";
|
||||
}
|
||||
}
|
||||
@ -436,20 +439,21 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
|
||||
case EbvFragFullyCoveredNV: return "FragFullyCoveredNV";
|
||||
case EbvFragmentSizeNV: return "FragmentSizeNV";
|
||||
case EbvInvocationsPerPixelNV: return "InvocationsPerPixelNV";
|
||||
case EbvLaunchIdNV: return "LaunchIdNV";
|
||||
case EbvLaunchSizeNV: return "LaunchSizeNV";
|
||||
case EbvInstanceCustomIndexNV: return "InstanceCustomIndexNV";
|
||||
case EbvWorldRayOriginNV: return "WorldRayOriginNV";
|
||||
case EbvWorldRayDirectionNV: return "WorldRayDirectionNV";
|
||||
case EbvObjectRayOriginNV: return "ObjectRayOriginNV";
|
||||
case EbvObjectRayDirectionNV: return "ObjectRayDirectionNV";
|
||||
case EbvRayTminNV: return "ObjectRayTminNV";
|
||||
case EbvRayTmaxNV: return "ObjectRayTmaxNV";
|
||||
case EbvHitTNV: return "HitTNV";
|
||||
case EbvHitKindNV: return "HitKindNV";
|
||||
case EbvIncomingRayFlagsNV: return "IncomingRayFlagsNV";
|
||||
case EbvObjectToWorldNV: return "ObjectToWorldNV";
|
||||
case EbvWorldToObjectNV: return "WorldToObjectNV";
|
||||
case EbvLaunchId: return "LaunchIdNV";
|
||||
case EbvLaunchSize: return "LaunchSizeNV";
|
||||
case EbvInstanceCustomIndex: return "InstanceCustomIndexNV";
|
||||
case EbvGeometryIndex: return "GeometryIndexEXT";
|
||||
case EbvWorldRayOrigin: return "WorldRayOriginNV";
|
||||
case EbvWorldRayDirection: return "WorldRayDirectionNV";
|
||||
case EbvObjectRayOrigin: return "ObjectRayOriginNV";
|
||||
case EbvObjectRayDirection: return "ObjectRayDirectionNV";
|
||||
case EbvRayTmin: return "ObjectRayTminNV";
|
||||
case EbvRayTmax: return "ObjectRayTmaxNV";
|
||||
case EbvHitT: return "HitTNV";
|
||||
case EbvHitKind: return "HitKindNV";
|
||||
case EbvIncomingRayFlags: return "IncomingRayFlagsNV";
|
||||
case EbvObjectToWorld: return "ObjectToWorldNV";
|
||||
case EbvWorldToObject: return "WorldToObjectNV";
|
||||
|
||||
case EbvBaryCoordNV: return "BaryCoordNV";
|
||||
case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
|
||||
|
@ -532,6 +532,7 @@ public:
|
||||
queuefamilycoherent = false;
|
||||
workgroupcoherent = false;
|
||||
subgroupcoherent = false;
|
||||
shadercallcoherent = false;
|
||||
nonprivate = false;
|
||||
volatil = false;
|
||||
restrict = false;
|
||||
@ -591,6 +592,7 @@ public:
|
||||
bool queuefamilycoherent : 1;
|
||||
bool workgroupcoherent : 1;
|
||||
bool subgroupcoherent : 1;
|
||||
bool shadercallcoherent : 1;
|
||||
bool nonprivate : 1;
|
||||
bool isWriteOnly() const { return writeonly; }
|
||||
bool isReadOnly() const { return readonly; }
|
||||
@ -600,11 +602,11 @@ public:
|
||||
bool isSample() const { return sample; }
|
||||
bool isMemory() const
|
||||
{
|
||||
return subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly || nonprivate;
|
||||
return shadercallcoherent || subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly || nonprivate;
|
||||
}
|
||||
bool isMemoryQualifierImageAndSSBOOnly() const
|
||||
{
|
||||
return subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly;
|
||||
return shadercallcoherent || subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly;
|
||||
}
|
||||
bool bufferReferenceNeedsVulkanMemoryModel() const
|
||||
{
|
||||
@ -774,7 +776,7 @@ public:
|
||||
layoutViewportRelative = false;
|
||||
// -2048 as the default value indicating layoutSecondaryViewportRelative is not set
|
||||
layoutSecondaryViewportRelativeOffset = -2048;
|
||||
layoutShaderRecordNV = false;
|
||||
layoutShaderRecord = false;
|
||||
layoutBufferReferenceAlign = layoutBufferReferenceAlignEnd;
|
||||
layoutFormat = ElfNone;
|
||||
#endif
|
||||
@ -813,7 +815,7 @@ public:
|
||||
hasAnyLocation() ||
|
||||
hasStream() ||
|
||||
hasFormat() ||
|
||||
isShaderRecordNV() ||
|
||||
isShaderRecord() ||
|
||||
isPushConstant() ||
|
||||
hasBufferReference();
|
||||
}
|
||||
@ -872,7 +874,7 @@ public:
|
||||
bool layoutPassthrough;
|
||||
bool layoutViewportRelative;
|
||||
int layoutSecondaryViewportRelativeOffset;
|
||||
bool layoutShaderRecordNV;
|
||||
bool layoutShaderRecord;
|
||||
#endif
|
||||
|
||||
bool hasUniformLayout() const
|
||||
@ -994,7 +996,7 @@ public:
|
||||
}
|
||||
TLayoutFormat getFormat() const { return layoutFormat; }
|
||||
bool isPushConstant() const { return layoutPushConstant; }
|
||||
bool isShaderRecordNV() const { return layoutShaderRecordNV; }
|
||||
bool isShaderRecord() const { return layoutShaderRecord; }
|
||||
bool hasBufferReference() const { return layoutBufferReference; }
|
||||
bool hasBufferReferenceAlign() const
|
||||
{
|
||||
@ -1671,7 +1673,7 @@ public:
|
||||
}
|
||||
virtual bool isOpaque() const { return basicType == EbtSampler
|
||||
#ifndef GLSLANG_WEB
|
||||
|| basicType == EbtAtomicUint || basicType == EbtAccStructNV
|
||||
|| basicType == EbtAtomicUint || basicType == EbtAccStruct
|
||||
#endif
|
||||
; }
|
||||
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
|
||||
@ -1947,7 +1949,7 @@ public:
|
||||
case EbtAtomicUint: return "atomic_uint";
|
||||
case EbtStruct: return "structure";
|
||||
case EbtBlock: return "block";
|
||||
case EbtAccStructNV: return "accelerationStructureNV";
|
||||
case EbtAccStruct: return "accelerationStructureNV";
|
||||
case EbtReference: return "reference";
|
||||
#endif
|
||||
default: return "unknown type";
|
||||
@ -2057,7 +2059,7 @@ public:
|
||||
appendStr(" layoutSecondaryViewportRelativeOffset=");
|
||||
appendInt(qualifier.layoutSecondaryViewportRelativeOffset);
|
||||
}
|
||||
if (qualifier.layoutShaderRecordNV)
|
||||
if (qualifier.layoutShaderRecord)
|
||||
appendStr(" shaderRecordNV");
|
||||
|
||||
appendStr(")");
|
||||
@ -2100,6 +2102,8 @@ public:
|
||||
appendStr(" workgroupcoherent");
|
||||
if (qualifier.subgroupcoherent)
|
||||
appendStr(" subgroupcoherent");
|
||||
if (qualifier.shadercallcoherent)
|
||||
appendStr(" shadercallcoherent");
|
||||
if (qualifier.nonprivate)
|
||||
appendStr(" nonprivate");
|
||||
if (qualifier.volatil)
|
||||
|
@ -910,11 +910,11 @@ enum TOperator {
|
||||
EOpAverageRounded,
|
||||
EOpMul32x16,
|
||||
|
||||
EOpTraceNV,
|
||||
EOpReportIntersectionNV,
|
||||
EOpIgnoreIntersectionNV,
|
||||
EOpTerminateRayNV,
|
||||
EOpExecuteCallableNV,
|
||||
EOpTrace,
|
||||
EOpReportIntersection,
|
||||
EOpIgnoreIntersection,
|
||||
EOpTerminateRay,
|
||||
EOpExecuteCallable,
|
||||
EOpWritePackedPrimitiveIndices4x8NV,
|
||||
//
|
||||
// HLSL operations
|
||||
|
@ -4322,29 +4322,39 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
"\n");
|
||||
}
|
||||
|
||||
// Builtins for GL_NV_ray_tracing
|
||||
// Builtins for GL_NV_ray_tracing/GL_EXT_ray_tracing
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
stageBuiltins[EShLangRayGenNV].append(
|
||||
stageBuiltins[EShLangRayGen].append(
|
||||
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void executeCallableNV(uint, int);"
|
||||
"void executeCallableEXT(uint, int);"
|
||||
"\n");
|
||||
stageBuiltins[EShLangIntersectNV].append(
|
||||
stageBuiltins[EShLangIntersect].append(
|
||||
"bool reportIntersectionNV(float, uint);"
|
||||
"bool reportIntersectionEXT(float, uint);"
|
||||
"\n");
|
||||
stageBuiltins[EShLangAnyHitNV].append(
|
||||
stageBuiltins[EShLangAnyHit].append(
|
||||
"void ignoreIntersectionNV();"
|
||||
"void ignoreIntersectionEXT();"
|
||||
"void terminateRayNV();"
|
||||
"void terminateRayEXT();"
|
||||
"\n");
|
||||
stageBuiltins[EShLangClosestHitNV].append(
|
||||
stageBuiltins[EShLangClosestHit].append(
|
||||
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void executeCallableNV(uint, int);"
|
||||
"void executeCallableEXT(uint, int);"
|
||||
"\n");
|
||||
stageBuiltins[EShLangMissNV].append(
|
||||
stageBuiltins[EShLangMiss].append(
|
||||
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void executeCallableNV(uint, int);"
|
||||
"void executeCallableEXT(uint, int);"
|
||||
"\n");
|
||||
stageBuiltins[EShLangCallableNV].append(
|
||||
stageBuiltins[EShLangCallable].append(
|
||||
"void executeCallableNV(uint, int);"
|
||||
"void executeCallableEXT(uint, int);"
|
||||
"\n");
|
||||
}
|
||||
|
||||
@ -5393,100 +5403,156 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
stageBuiltins[EShLangMeshNV] .append(computeSubgroupDecls);
|
||||
stageBuiltins[EShLangTaskNV] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangTaskNV] .append(computeSubgroupDecls);
|
||||
stageBuiltins[EShLangRayGenNV] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangIntersectNV] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangAnyHitNV] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangClosestHitNV] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangMissNV] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangCallableNV] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangRayGen] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangIntersect] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangAnyHit] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangClosestHit] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangMiss] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangCallable] .append(subgroupDecls);
|
||||
}
|
||||
|
||||
// GL_NV_ray_tracing
|
||||
// GL_NV_ray_tracing/GL_EXT_ray_tracing
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
|
||||
const char *constRayFlags =
|
||||
"const uint gl_RayFlagsNoneNV = 0U;"
|
||||
"const uint gl_RayFlagsNoneEXT = 0U;"
|
||||
"const uint gl_RayFlagsOpaqueNV = 1U;"
|
||||
"const uint gl_RayFlagsOpaqueEXT = 1U;"
|
||||
"const uint gl_RayFlagsNoOpaqueNV = 2U;"
|
||||
"const uint gl_RayFlagsNoOpaqueEXT = 2U;"
|
||||
"const uint gl_RayFlagsTerminateOnFirstHitNV = 4U;"
|
||||
"const uint gl_RayFlagsTerminateOnFirstHitEXT = 4U;"
|
||||
"const uint gl_RayFlagsSkipClosestHitShaderNV = 8U;"
|
||||
"const uint gl_RayFlagsSkipClosestHitShaderEXT = 8U;"
|
||||
"const uint gl_RayFlagsCullBackFacingTrianglesNV = 16U;"
|
||||
"const uint gl_RayFlagsCullBackFacingTrianglesEXT = 16U;"
|
||||
"const uint gl_RayFlagsCullFrontFacingTrianglesNV = 32U;"
|
||||
"const uint gl_RayFlagsCullFrontFacingTrianglesEXT = 32U;"
|
||||
"const uint gl_RayFlagsCullOpaqueNV = 64U;"
|
||||
"const uint gl_RayFlagsCullOpaqueEXT = 64U;"
|
||||
"const uint gl_RayFlagsCullNoOpaqueNV = 128U;"
|
||||
"const uint gl_RayFlagsCullNoOpaqueEXT = 128U;"
|
||||
"const uint gl_HitKindFrontFacingTriangleEXT = 254U;"
|
||||
"const uint gl_HitKindBackFacingTriangleEXT = 255U;"
|
||||
"\n";
|
||||
const char *rayGenDecls =
|
||||
"in uvec3 gl_LaunchIDNV;"
|
||||
"in uvec3 gl_LaunchIDEXT;"
|
||||
"in uvec3 gl_LaunchSizeNV;"
|
||||
"in uvec3 gl_LaunchSizeEXT;"
|
||||
"\n";
|
||||
const char *intersectDecls =
|
||||
"in uvec3 gl_LaunchIDNV;"
|
||||
"in uvec3 gl_LaunchIDEXT;"
|
||||
"in uvec3 gl_LaunchSizeNV;"
|
||||
"in uvec3 gl_LaunchSizeEXT;"
|
||||
"in int gl_PrimitiveID;"
|
||||
"in int gl_InstanceID;"
|
||||
"in int gl_InstanceCustomIndexNV;"
|
||||
"in int gl_InstanceCustomIndexEXT;"
|
||||
"in int gl_GeometryIndexEXT;"
|
||||
"in vec3 gl_WorldRayOriginNV;"
|
||||
"in vec3 gl_WorldRayOriginEXT;"
|
||||
"in vec3 gl_WorldRayDirectionNV;"
|
||||
"in vec3 gl_WorldRayDirectionEXT;"
|
||||
"in vec3 gl_ObjectRayOriginNV;"
|
||||
"in vec3 gl_ObjectRayOriginEXT;"
|
||||
"in vec3 gl_ObjectRayDirectionNV;"
|
||||
"in vec3 gl_ObjectRayDirectionEXT;"
|
||||
"in float gl_RayTminNV;"
|
||||
"in float gl_RayTminEXT;"
|
||||
"in float gl_RayTmaxNV;"
|
||||
"in float gl_RayTmaxEXT;"
|
||||
"in mat4x3 gl_ObjectToWorldNV;"
|
||||
"in mat4x3 gl_ObjectToWorldEXT;"
|
||||
"in mat3x4 gl_ObjectToWorld3x4EXT;"
|
||||
"in mat4x3 gl_WorldToObjectNV;"
|
||||
"in mat4x3 gl_WorldToObjectEXT;"
|
||||
"in mat3x4 gl_WorldToObject3x4EXT;"
|
||||
"in uint gl_IncomingRayFlagsNV;"
|
||||
"in uint gl_IncomingRayFlagsEXT;"
|
||||
"\n";
|
||||
const char *hitDecls =
|
||||
"in uvec3 gl_LaunchIDNV;"
|
||||
"in uvec3 gl_LaunchIDEXT;"
|
||||
"in uvec3 gl_LaunchSizeNV;"
|
||||
"in uvec3 gl_LaunchSizeEXT;"
|
||||
"in int gl_PrimitiveID;"
|
||||
"in int gl_InstanceID;"
|
||||
"in int gl_InstanceCustomIndexNV;"
|
||||
"in int gl_InstanceCustomIndexEXT;"
|
||||
"in int gl_GeometryIndexEXT;"
|
||||
"in vec3 gl_WorldRayOriginNV;"
|
||||
"in vec3 gl_WorldRayOriginEXT;"
|
||||
"in vec3 gl_WorldRayDirectionNV;"
|
||||
"in vec3 gl_WorldRayDirectionEXT;"
|
||||
"in vec3 gl_ObjectRayOriginNV;"
|
||||
"in vec3 gl_ObjectRayOriginEXT;"
|
||||
"in vec3 gl_ObjectRayDirectionNV;"
|
||||
"in vec3 gl_ObjectRayDirectionEXT;"
|
||||
"in float gl_RayTminNV;"
|
||||
"in float gl_RayTminEXT;"
|
||||
"in float gl_RayTmaxNV;"
|
||||
"in float gl_RayTmaxEXT;"
|
||||
"in float gl_HitTNV;"
|
||||
"in float gl_HitTEXT;"
|
||||
"in uint gl_HitKindNV;"
|
||||
"in uint gl_HitKindEXT;"
|
||||
"in mat4x3 gl_ObjectToWorldNV;"
|
||||
"in mat4x3 gl_ObjectToWorldEXT;"
|
||||
"in mat3x4 gl_ObjectToWorld3x4EXT;"
|
||||
"in mat4x3 gl_WorldToObjectNV;"
|
||||
"in mat4x3 gl_WorldToObjectEXT;"
|
||||
"in mat3x4 gl_WorldToObject3x4EXT;"
|
||||
"in uint gl_IncomingRayFlagsNV;"
|
||||
"in uint gl_IncomingRayFlagsEXT;"
|
||||
"\n";
|
||||
const char *missDecls =
|
||||
"in uvec3 gl_LaunchIDNV;"
|
||||
"in uvec3 gl_LaunchIDEXT;"
|
||||
"in uvec3 gl_LaunchSizeNV;"
|
||||
"in uvec3 gl_LaunchSizeEXT;"
|
||||
"in vec3 gl_WorldRayOriginNV;"
|
||||
"in vec3 gl_WorldRayOriginEXT;"
|
||||
"in vec3 gl_WorldRayDirectionNV;"
|
||||
"in vec3 gl_WorldRayDirectionEXT;"
|
||||
"in vec3 gl_ObjectRayOriginNV;"
|
||||
"in vec3 gl_ObjectRayDirectionNV;"
|
||||
"in float gl_RayTminNV;"
|
||||
"in float gl_RayTminEXT;"
|
||||
"in float gl_RayTmaxNV;"
|
||||
"in float gl_RayTmaxEXT;"
|
||||
"in uint gl_IncomingRayFlagsNV;"
|
||||
"in uint gl_IncomingRayFlagsEXT;"
|
||||
"\n";
|
||||
|
||||
const char *callableDecls =
|
||||
"in uvec3 gl_LaunchIDNV;"
|
||||
"in uvec3 gl_LaunchIDEXT;"
|
||||
"in uvec3 gl_LaunchSizeNV;"
|
||||
"in uvec3 gl_LaunchSizeEXT;"
|
||||
"\n";
|
||||
|
||||
stageBuiltins[EShLangRayGenNV].append(rayGenDecls);
|
||||
stageBuiltins[EShLangRayGenNV].append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangIntersectNV].append(intersectDecls);
|
||||
stageBuiltins[EShLangIntersectNV].append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangAnyHitNV].append(hitDecls);
|
||||
stageBuiltins[EShLangAnyHitNV].append(constRayFlags);
|
||||
stageBuiltins[EShLangRayGen].append(rayGenDecls);
|
||||
stageBuiltins[EShLangRayGen].append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangClosestHitNV].append(hitDecls);
|
||||
stageBuiltins[EShLangClosestHitNV].append(constRayFlags);
|
||||
stageBuiltins[EShLangIntersect].append(intersectDecls);
|
||||
stageBuiltins[EShLangIntersect].append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangMissNV].append(missDecls);
|
||||
stageBuiltins[EShLangMissNV].append(constRayFlags);
|
||||
stageBuiltins[EShLangAnyHit].append(hitDecls);
|
||||
stageBuiltins[EShLangAnyHit].append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangCallableNV].append(callableDecls);
|
||||
stageBuiltins[EShLangCallableNV].append(constRayFlags);
|
||||
stageBuiltins[EShLangClosestHit].append(hitDecls);
|
||||
stageBuiltins[EShLangClosestHit].append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangMiss].append(missDecls);
|
||||
stageBuiltins[EShLangMiss].append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangCallable].append(callableDecls);
|
||||
stageBuiltins[EShLangCallable].append(constRayFlags);
|
||||
|
||||
}
|
||||
if ((profile != EEsProfile && version >= 140)) {
|
||||
@ -5494,11 +5560,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
"in highp int gl_DeviceIndex;" // GL_EXT_device_group
|
||||
"\n";
|
||||
|
||||
stageBuiltins[EShLangRayGenNV].append(deviceIndex);
|
||||
stageBuiltins[EShLangIntersectNV].append(deviceIndex);
|
||||
stageBuiltins[EShLangAnyHitNV].append(deviceIndex);
|
||||
stageBuiltins[EShLangClosestHitNV].append(deviceIndex);
|
||||
stageBuiltins[EShLangMissNV].append(deviceIndex);
|
||||
stageBuiltins[EShLangRayGen].append(deviceIndex);
|
||||
stageBuiltins[EShLangIntersect].append(deviceIndex);
|
||||
stageBuiltins[EShLangAnyHit].append(deviceIndex);
|
||||
stageBuiltins[EShLangClosestHit].append(deviceIndex);
|
||||
stageBuiltins[EShLangMiss].append(deviceIndex);
|
||||
}
|
||||
|
||||
if (version >= 300 /* both ES and non-ES */) {
|
||||
@ -5514,6 +5580,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
commonBuiltins.append("const int gl_ScopeSubgroup = 3;\n");
|
||||
commonBuiltins.append("const int gl_ScopeInvocation = 4;\n");
|
||||
commonBuiltins.append("const int gl_ScopeQueueFamily = 5;\n");
|
||||
commonBuiltins.append("const int gl_ScopeShaderCallEXT = 6;\n");
|
||||
|
||||
commonBuiltins.append("const int gl_SemanticsRelaxed = 0x0;\n");
|
||||
commonBuiltins.append("const int gl_SemanticsAcquire = 0x2;\n");
|
||||
@ -7995,49 +8062,97 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
break;
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
case EShLangRayGenNV:
|
||||
case EShLangIntersectNV:
|
||||
case EShLangAnyHitNV:
|
||||
case EShLangClosestHitNV:
|
||||
case EShLangMissNV:
|
||||
case EShLangCallableNV:
|
||||
case EShLangRayGen:
|
||||
case EShLangIntersect:
|
||||
case EShLangAnyHit:
|
||||
case EShLangClosestHit:
|
||||
case EShLangMiss:
|
||||
case EShLangCallable:
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
const char *rtexts[] = { E_GL_NV_ray_tracing, E_GL_EXT_ray_tracing };
|
||||
symbolTable.setVariableExtensions("gl_LaunchIDNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_LaunchIDEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_LaunchSizeNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_PrimitiveID", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_InstanceID", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_LaunchSizeEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_PrimitiveID", 2, rtexts);
|
||||
symbolTable.setVariableExtensions("gl_InstanceID", 2, rtexts);
|
||||
symbolTable.setVariableExtensions("gl_InstanceCustomIndexNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_InstanceCustomIndexEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_GeometryIndexEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_WorldRayOriginNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_WorldRayOriginEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_WorldRayDirectionNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_WorldRayDirectionEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_ObjectRayOriginNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_ObjectRayOriginEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_ObjectRayDirectionNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_ObjectRayDirectionEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_RayTminNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_RayTminEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_RayTmaxNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_RayTmaxEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_HitTNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_HitTEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_HitKindNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_HitKindEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_ObjectToWorldNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_ObjectToWorldEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_ObjectToWorld3x4EXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_WorldToObjectNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_WorldToObjectEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_WorldToObject3x4EXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_IncomingRayFlagsNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_IncomingRayFlagsEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
|
||||
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
|
||||
|
||||
BuiltInVariable("gl_LaunchIDNV", EbvLaunchIdNV, symbolTable);
|
||||
BuiltInVariable("gl_LaunchSizeNV", EbvLaunchSizeNV, symbolTable);
|
||||
BuiltInVariable("gl_PrimitiveID", EbvPrimitiveId, symbolTable);
|
||||
BuiltInVariable("gl_InstanceID", EbvInstanceId, symbolTable);
|
||||
BuiltInVariable("gl_InstanceCustomIndexNV", EbvInstanceCustomIndexNV,symbolTable);
|
||||
BuiltInVariable("gl_WorldRayOriginNV", EbvWorldRayOriginNV, symbolTable);
|
||||
BuiltInVariable("gl_WorldRayDirectionNV", EbvWorldRayDirectionNV, symbolTable);
|
||||
BuiltInVariable("gl_ObjectRayOriginNV", EbvObjectRayOriginNV, symbolTable);
|
||||
BuiltInVariable("gl_ObjectRayDirectionNV", EbvObjectRayDirectionNV, symbolTable);
|
||||
BuiltInVariable("gl_RayTminNV", EbvRayTminNV, symbolTable);
|
||||
BuiltInVariable("gl_RayTmaxNV", EbvRayTmaxNV, symbolTable);
|
||||
BuiltInVariable("gl_HitTNV", EbvHitTNV, symbolTable);
|
||||
BuiltInVariable("gl_HitKindNV", EbvHitKindNV, symbolTable);
|
||||
BuiltInVariable("gl_ObjectToWorldNV", EbvObjectToWorldNV, symbolTable);
|
||||
BuiltInVariable("gl_WorldToObjectNV", EbvWorldToObjectNV, symbolTable);
|
||||
BuiltInVariable("gl_IncomingRayFlagsNV", EbvIncomingRayFlagsNV, symbolTable);
|
||||
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
|
||||
|
||||
symbolTable.setFunctionExtensions("traceNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setFunctionExtensions("traceRayEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setFunctionExtensions("reportIntersectionNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setFunctionExtensions("reportIntersectionEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setFunctionExtensions("ignoreIntersectionNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setFunctionExtensions("ignoreIntersectionEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setFunctionExtensions("terminateRayNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setFunctionExtensions("terminateRayEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setFunctionExtensions("executeCallableNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setFunctionExtensions("executeCallableEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
|
||||
|
||||
BuiltInVariable("gl_LaunchIDNV", EbvLaunchId, symbolTable);
|
||||
BuiltInVariable("gl_LaunchIDEXT", EbvLaunchId, symbolTable);
|
||||
BuiltInVariable("gl_LaunchSizeNV", EbvLaunchSize, symbolTable);
|
||||
BuiltInVariable("gl_LaunchSizeEXT", EbvLaunchSize, symbolTable);
|
||||
BuiltInVariable("gl_PrimitiveID", EbvPrimitiveId, symbolTable);
|
||||
BuiltInVariable("gl_InstanceID", EbvInstanceId, symbolTable);
|
||||
BuiltInVariable("gl_InstanceCustomIndexNV", EbvInstanceCustomIndex,symbolTable);
|
||||
BuiltInVariable("gl_InstanceCustomIndexEXT", EbvInstanceCustomIndex,symbolTable);
|
||||
BuiltInVariable("gl_GeometryIndexEXT", EbvGeometryIndex, symbolTable);
|
||||
BuiltInVariable("gl_WorldRayOriginNV", EbvWorldRayOrigin, symbolTable);
|
||||
BuiltInVariable("gl_WorldRayOriginEXT", EbvWorldRayOrigin, symbolTable);
|
||||
BuiltInVariable("gl_WorldRayDirectionNV", EbvWorldRayDirection, symbolTable);
|
||||
BuiltInVariable("gl_WorldRayDirectionEXT", EbvWorldRayDirection, symbolTable);
|
||||
BuiltInVariable("gl_ObjectRayOriginNV", EbvObjectRayOrigin, symbolTable);
|
||||
BuiltInVariable("gl_ObjectRayOriginEXT", EbvObjectRayOrigin, symbolTable);
|
||||
BuiltInVariable("gl_ObjectRayDirectionNV", EbvObjectRayDirection, symbolTable);
|
||||
BuiltInVariable("gl_ObjectRayDirectionEXT", EbvObjectRayDirection, symbolTable);
|
||||
BuiltInVariable("gl_RayTminNV", EbvRayTmin, symbolTable);
|
||||
BuiltInVariable("gl_RayTminEXT", EbvRayTmin, symbolTable);
|
||||
BuiltInVariable("gl_RayTmaxNV", EbvRayTmax, symbolTable);
|
||||
BuiltInVariable("gl_RayTmaxEXT", EbvRayTmax, symbolTable);
|
||||
BuiltInVariable("gl_HitTNV", EbvHitT, symbolTable);
|
||||
BuiltInVariable("gl_HitTEXT", EbvHitT, symbolTable);
|
||||
BuiltInVariable("gl_HitKindNV", EbvHitKind, symbolTable);
|
||||
BuiltInVariable("gl_HitKindEXT", EbvHitKind, symbolTable);
|
||||
BuiltInVariable("gl_ObjectToWorldNV", EbvObjectToWorld, symbolTable);
|
||||
BuiltInVariable("gl_ObjectToWorldEXT", EbvObjectToWorld, symbolTable);
|
||||
BuiltInVariable("gl_ObjectToWorld3x4EXT", EbvObjectToWorld3x4, symbolTable);
|
||||
BuiltInVariable("gl_WorldToObjectNV", EbvWorldToObject, symbolTable);
|
||||
BuiltInVariable("gl_WorldToObjectEXT", EbvWorldToObject, symbolTable);
|
||||
BuiltInVariable("gl_WorldToObject3x4EXT", EbvWorldToObject3x4, symbolTable);
|
||||
BuiltInVariable("gl_IncomingRayFlagsNV", EbvIncomingRayFlags, symbolTable);
|
||||
BuiltInVariable("gl_IncomingRayFlagsEXT", EbvIncomingRayFlags, symbolTable);
|
||||
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
|
||||
|
||||
// GL_ARB_shader_ballot
|
||||
symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot);
|
||||
@ -8776,27 +8891,33 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
symbolTable.relateToOperator("coopMatMulAddNV", EOpCooperativeMatrixMulAdd);
|
||||
break;
|
||||
|
||||
case EShLangRayGenNV:
|
||||
case EShLangClosestHitNV:
|
||||
case EShLangMissNV:
|
||||
case EShLangRayGen:
|
||||
case EShLangClosestHit:
|
||||
case EShLangMiss:
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
symbolTable.relateToOperator("traceNV", EOpTraceNV);
|
||||
symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV);
|
||||
symbolTable.relateToOperator("traceNV", EOpTrace);
|
||||
symbolTable.relateToOperator("traceRayEXT", EOpTrace);
|
||||
symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallable);
|
||||
symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallable);
|
||||
}
|
||||
break;
|
||||
case EShLangIntersectNV:
|
||||
case EShLangIntersect:
|
||||
if (profile != EEsProfile && version >= 460)
|
||||
symbolTable.relateToOperator("reportIntersectionNV", EOpReportIntersectionNV);
|
||||
symbolTable.relateToOperator("reportIntersectionNV", EOpReportIntersection);
|
||||
symbolTable.relateToOperator("reportIntersectionEXT", EOpReportIntersection);
|
||||
break;
|
||||
case EShLangAnyHitNV:
|
||||
case EShLangAnyHit:
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
symbolTable.relateToOperator("ignoreIntersectionNV", EOpIgnoreIntersectionNV);
|
||||
symbolTable.relateToOperator("terminateRayNV", EOpTerminateRayNV);
|
||||
symbolTable.relateToOperator("ignoreIntersectionNV", EOpIgnoreIntersection);
|
||||
symbolTable.relateToOperator("ignoreIntersectionEXT", EOpIgnoreIntersection);
|
||||
symbolTable.relateToOperator("terminateRayNV", EOpTerminateRay);
|
||||
symbolTable.relateToOperator("terminateRayEXT", EOpTerminateRay);
|
||||
}
|
||||
break;
|
||||
case EShLangCallableNV:
|
||||
case EShLangCallable:
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV);
|
||||
symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallable);
|
||||
symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallable);
|
||||
}
|
||||
break;
|
||||
case EShLangMeshNV:
|
||||
|
@ -538,7 +538,7 @@ bool TIntermediate::isConversionAllowed(TOperator op, TIntermTyped* node) const
|
||||
return false;
|
||||
case EbtAtomicUint:
|
||||
case EbtSampler:
|
||||
case EbtAccStructNV:
|
||||
case EbtAccStruct:
|
||||
// opaque types can be passed to functions
|
||||
if (op == EOpFunction)
|
||||
break;
|
||||
|
@ -157,11 +157,11 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
|
||||
case EvqBuffer:
|
||||
if (node->getQualifier().isReadOnly())
|
||||
message = "can't modify a readonly buffer";
|
||||
if (node->getQualifier().isShaderRecordNV())
|
||||
if (node->getQualifier().isShaderRecord())
|
||||
message = "can't modify a shaderrecordnv qualified buffer";
|
||||
break;
|
||||
case EvqHitAttrNV:
|
||||
if (language != EShLangIntersectNV)
|
||||
case EvqHitAttr:
|
||||
if (language != EShLangIntersect)
|
||||
message = "cannot modify hitAttributeNV in this stage";
|
||||
break;
|
||||
#endif
|
||||
@ -181,7 +181,7 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
|
||||
case EbtAtomicUint:
|
||||
message = "can't modify an atomic_uint";
|
||||
break;
|
||||
case EbtAccStructNV:
|
||||
case EbtAccStruct:
|
||||
message = "can't modify accelerationStructureNV";
|
||||
break;
|
||||
#endif
|
||||
|
@ -2032,11 +2032,11 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
case EOpTraceNV:
|
||||
case EOpTrace:
|
||||
if (!(*argp)[10]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "payload number", "");
|
||||
break;
|
||||
case EOpExecuteCallableNV:
|
||||
case EOpExecuteCallable:
|
||||
if (!(*argp)[1]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "callable data number", "");
|
||||
break;
|
||||
@ -3228,14 +3228,14 @@ void TParseContext::atomicUintCheck(const TSourceLoc& loc, const TType& type, co
|
||||
error(loc, "atomic_uints can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str());
|
||||
}
|
||||
|
||||
void TParseContext::accStructNVCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
|
||||
void TParseContext::accStructCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
|
||||
{
|
||||
if (type.getQualifier().storage == EvqUniform)
|
||||
return;
|
||||
|
||||
if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtAccStructNV))
|
||||
if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtAccStruct))
|
||||
error(loc, "non-uniform struct contains an accelerationStructureNV:", type.getBasicTypeString().c_str(), identifier.c_str());
|
||||
else if (type.getBasicType() == EbtAccStructNV && type.getQualifier().storage != EvqUniform)
|
||||
else if (type.getBasicType() == EbtAccStruct && type.getQualifier().storage != EvqUniform)
|
||||
error(loc, "accelerationStructureNV can only be used in uniform variables or function parameters:",
|
||||
type.getBasicTypeString().c_str(), identifier.c_str());
|
||||
|
||||
@ -3519,12 +3519,14 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
|
||||
dst.precision = src.precision;
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if (!force && ((src.coherent && (dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent)) ||
|
||||
(src.devicecoherent && (dst.coherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent)) ||
|
||||
(src.queuefamilycoherent && (dst.coherent || dst.devicecoherent || dst.workgroupcoherent || dst.subgroupcoherent)) ||
|
||||
(src.workgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.subgroupcoherent)) ||
|
||||
(src.subgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent)))) {
|
||||
error(loc, "only one coherent/devicecoherent/queuefamilycoherent/workgroupcoherent/subgroupcoherent qualifier allowed", GetPrecisionQualifierString(src.precision), "");
|
||||
if (!force && ((src.coherent && (dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) ||
|
||||
(src.devicecoherent && (dst.coherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) ||
|
||||
(src.queuefamilycoherent && (dst.coherent || dst.devicecoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) ||
|
||||
(src.workgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.subgroupcoherent || dst.shadercallcoherent)) ||
|
||||
(src.subgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.shadercallcoherent)) ||
|
||||
(src.shadercallcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent)))) {
|
||||
error(loc, "only one coherent/devicecoherent/queuefamilycoherent/workgroupcoherent/subgroupcoherent/shadercallcoherent qualifier allowed",
|
||||
GetPrecisionQualifierString(src.precision), "");
|
||||
}
|
||||
#endif
|
||||
// Layout qualifiers
|
||||
@ -3552,6 +3554,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
|
||||
MERGE_SINGLETON(queuefamilycoherent);
|
||||
MERGE_SINGLETON(workgroupcoherent);
|
||||
MERGE_SINGLETON(subgroupcoherent);
|
||||
MERGE_SINGLETON(shadercallcoherent);
|
||||
MERGE_SINGLETON(nonprivate);
|
||||
MERGE_SINGLETON(volatil);
|
||||
MERGE_SINGLETON(restrict);
|
||||
@ -3989,7 +3992,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() == EbtAccStructNV ||
|
||||
if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStruct ||
|
||||
(base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer()))
|
||||
requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index");
|
||||
else
|
||||
@ -4493,6 +4496,7 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali
|
||||
type.getQualifier().queuefamilycoherent = qualifier.queuefamilycoherent;
|
||||
type.getQualifier().workgroupcoherent = qualifier.workgroupcoherent;
|
||||
type.getQualifier().subgroupcoherent = qualifier.subgroupcoherent;
|
||||
type.getQualifier().shadercallcoherent = qualifier.shadercallcoherent;
|
||||
type.getQualifier().nonprivate = qualifier.nonprivate;
|
||||
type.getQualifier().readonly = qualifier.readonly;
|
||||
type.getQualifier().writeonly = qualifier.writeonly;
|
||||
@ -5073,13 +5077,19 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (language == EShLangRayGenNV || language == EShLangIntersectNV ||
|
||||
language == EShLangAnyHitNV || language == EShLangClosestHitNV ||
|
||||
language == EShLangMissNV || language == EShLangCallableNV) {
|
||||
if (id == "shaderrecordnv") {
|
||||
publicType.qualifier.layoutShaderRecordNV = true;
|
||||
if (language == EShLangRayGen || language == EShLangIntersect ||
|
||||
language == EShLangAnyHit || language == EShLangClosestHit ||
|
||||
language == EShLangMiss || language == EShLangCallable) {
|
||||
if (id == "shaderrecordnv" || id == "shaderrecordext") {
|
||||
if (id == "shaderrecordnv") {
|
||||
requireExtensions(loc, 1, &E_GL_NV_ray_tracing, "shader record NV");
|
||||
} else {
|
||||
requireExtensions(loc, 1, &E_GL_EXT_ray_tracing, "shader record EXT");
|
||||
}
|
||||
publicType.qualifier.layoutShaderRecord = true;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (language == EShLangCompute) {
|
||||
@ -5521,8 +5531,8 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie
|
||||
dst.layoutViewportRelative = true;
|
||||
if (src.layoutSecondaryViewportRelativeOffset != -2048)
|
||||
dst.layoutSecondaryViewportRelativeOffset = src.layoutSecondaryViewportRelativeOffset;
|
||||
if (src.layoutShaderRecordNV)
|
||||
dst.layoutShaderRecordNV = true;
|
||||
if (src.layoutShaderRecord)
|
||||
dst.layoutShaderRecord = true;
|
||||
if (src.pervertexNV)
|
||||
dst.pervertexNV = true;
|
||||
#endif
|
||||
@ -5590,7 +5600,7 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb
|
||||
error(loc, "cannot specify on a variable declaration", "align", "");
|
||||
if (qualifier.isPushConstant())
|
||||
error(loc, "can only specify on a uniform block", "push_constant", "");
|
||||
if (qualifier.isShaderRecordNV())
|
||||
if (qualifier.isShaderRecord())
|
||||
error(loc, "can only specify on a buffer block", "shaderRecordNV", "");
|
||||
}
|
||||
break;
|
||||
@ -5664,11 +5674,11 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
||||
error(loc, "cannot apply to uniform or buffer block", "location", "");
|
||||
break;
|
||||
#ifndef GLSLANG_WEB
|
||||
case EvqPayloadNV:
|
||||
case EvqPayloadInNV:
|
||||
case EvqHitAttrNV:
|
||||
case EvqCallableDataNV:
|
||||
case EvqCallableDataInNV:
|
||||
case EvqPayload:
|
||||
case EvqPayloadIn:
|
||||
case EvqHitAttr:
|
||||
case EvqCallableData:
|
||||
case EvqCallableDataIn:
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@ -5763,7 +5773,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
||||
if (spvVersion.spv > 0) {
|
||||
if (qualifier.isUniformOrBuffer()) {
|
||||
if (type.getBasicType() == EbtBlock && !qualifier.isPushConstant() &&
|
||||
!qualifier.isShaderRecordNV() &&
|
||||
!qualifier.isShaderRecord() &&
|
||||
!qualifier.hasAttachment() &&
|
||||
!qualifier.hasBufferReference())
|
||||
error(loc, "uniform/buffer blocks require layout(binding=X)", "binding", "");
|
||||
@ -5820,7 +5830,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
||||
if (qualifier.hasBufferReference() && type.getBasicType() != EbtBlock)
|
||||
error(loc, "can only be used with a block", "buffer_reference", "");
|
||||
|
||||
if (qualifier.isShaderRecordNV() && type.getBasicType() != EbtBlock)
|
||||
if (qualifier.isShaderRecord() && type.getBasicType() != EbtBlock)
|
||||
error(loc, "can only be used with a block", "shaderRecordNV", "");
|
||||
|
||||
// input attachment
|
||||
@ -5965,7 +5975,7 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
|
||||
if (qualifier.storage != EvqBuffer)
|
||||
error(loc, "can only be used with buffer", "buffer_reference", "");
|
||||
}
|
||||
if (qualifier.isShaderRecordNV()) {
|
||||
if (qualifier.isShaderRecord()) {
|
||||
if (qualifier.storage != EvqBuffer)
|
||||
error(loc, "can only be used with a buffer", "shaderRecordNV", "");
|
||||
if (qualifier.hasBinding())
|
||||
@ -5974,7 +5984,7 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
|
||||
error(loc, "cannot be used with shaderRecordNV", "set", "");
|
||||
|
||||
}
|
||||
if (qualifier.storage == EvqHitAttrNV && qualifier.hasLayout()) {
|
||||
if (qualifier.storage == EvqHitAttr && qualifier.hasLayout()) {
|
||||
error(loc, "cannot apply layout qualifiers to hitAttributeNV variable", "hitAttributeNV", "");
|
||||
}
|
||||
}
|
||||
@ -6477,7 +6487,7 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
|
||||
transparentOpaqueCheck(loc, type, identifier);
|
||||
#ifndef GLSLANG_WEB
|
||||
atomicUintCheck(loc, type, identifier);
|
||||
accStructNVCheck(loc, type, identifier);
|
||||
accStructCheck(loc, type, identifier);
|
||||
checkAndResizeMeshViewDim(loc, type, /*isBlockMember*/ false);
|
||||
#endif
|
||||
if (type.getQualifier().storage == EvqConst && type.containsReference()) {
|
||||
@ -7411,7 +7421,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
|
||||
// Special case for "push_constant uniform", which has a default of std430,
|
||||
// contrary to normal uniform defaults, and can't have a default tracked for it.
|
||||
if ((currentBlockQualifier.isPushConstant() && !currentBlockQualifier.hasPacking()) ||
|
||||
(currentBlockQualifier.isShaderRecordNV() && !currentBlockQualifier.hasPacking()))
|
||||
(currentBlockQualifier.isShaderRecord() && !currentBlockQualifier.hasPacking()))
|
||||
currentBlockQualifier.layoutPacking = ElpStd430;
|
||||
|
||||
// Special case for "taskNV in/out", which has a default of std430,
|
||||
@ -7628,6 +7638,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
|
||||
// with a particular stage.
|
||||
void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& qualifier)
|
||||
{
|
||||
const char *extsrt[2] = { E_GL_NV_ray_tracing, E_GL_EXT_ray_tracing };
|
||||
switch (qualifier.storage) {
|
||||
case EvqUniform:
|
||||
profileRequires(loc, EEsProfile, 300, nullptr, "uniform block");
|
||||
@ -7666,28 +7677,28 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
|
||||
}
|
||||
break;
|
||||
#ifndef GLSLANG_WEB
|
||||
case EvqPayloadNV:
|
||||
profileRequires(loc, ~EEsProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangAnyHitNVMask | EShLangClosestHitNVMask | EShLangMissNVMask),
|
||||
case EvqPayload:
|
||||
profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "rayPayloadNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangAnyHitMask | EShLangClosestHitMask | EShLangMissMask),
|
||||
"rayPayloadNV block");
|
||||
break;
|
||||
case EvqPayloadInNV:
|
||||
profileRequires(loc, ~EEsProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangAnyHitNVMask | EShLangClosestHitNVMask | EShLangMissNVMask),
|
||||
case EvqPayloadIn:
|
||||
profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "rayPayloadInNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangAnyHitMask | EShLangClosestHitMask | EShLangMissMask),
|
||||
"rayPayloadInNV block");
|
||||
break;
|
||||
case EvqHitAttrNV:
|
||||
profileRequires(loc, ~EEsProfile, 460, E_GL_NV_ray_tracing, "hitAttributeNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangIntersectNVMask | EShLangAnyHitNVMask | EShLangClosestHitNVMask), "hitAttributeNV block");
|
||||
case EvqHitAttr:
|
||||
profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "hitAttributeNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangIntersectMask | EShLangAnyHitMask | EShLangClosestHitMask), "hitAttributeNV block");
|
||||
break;
|
||||
case EvqCallableDataNV:
|
||||
profileRequires(loc, ~EEsProfile, 460, E_GL_NV_ray_tracing, "callableDataNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangClosestHitNVMask | EShLangMissNVMask | EShLangCallableNVMask),
|
||||
case EvqCallableData:
|
||||
profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "callableDataNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask),
|
||||
"callableDataNV block");
|
||||
break;
|
||||
case EvqCallableDataInNV:
|
||||
profileRequires(loc, ~EEsProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangCallableNVMask), "callableDataInNV block");
|
||||
case EvqCallableDataIn:
|
||||
profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "callableDataInNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV block");
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@ -7726,8 +7737,8 @@ void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier&
|
||||
error(loc, "cannot use invariant qualifier on an interface block", "invariant", "");
|
||||
if (qualifier.isPushConstant())
|
||||
intermediate.addPushConstantCount();
|
||||
if (qualifier.isShaderRecordNV())
|
||||
intermediate.addShaderRecordNVCount();
|
||||
if (qualifier.isShaderRecord())
|
||||
intermediate.addShaderRecordCount();
|
||||
if (qualifier.isTaskMemory())
|
||||
intermediate.addTaskNVCount();
|
||||
}
|
||||
@ -8249,7 +8260,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
||||
error(loc, "cannot declare a default, can only be used on a block", "buffer_reference", "");
|
||||
if (qualifier.hasSpecConstantId())
|
||||
error(loc, "cannot declare a default, can only be used on a scalar", "constant_id", "");
|
||||
if (qualifier.isShaderRecordNV())
|
||||
if (qualifier.isShaderRecord())
|
||||
error(loc, "cannot declare a default, can only be used on a block", "shaderRecordNV", "");
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,7 @@ public:
|
||||
void boolCheck(const TSourceLoc&, const TPublicType&);
|
||||
void samplerCheck(const TSourceLoc&, const TType&, const TString& identifier, TIntermTyped* initializer);
|
||||
void atomicUintCheck(const TSourceLoc&, const TType&, const TString& identifier);
|
||||
void accStructNVCheck(const TSourceLoc & loc, const TType & type, const TString & identifier);
|
||||
void accStructCheck(const TSourceLoc & loc, const TType & type, const TString & identifier);
|
||||
void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier);
|
||||
void memberQualifierCheck(glslang::TPublicType&);
|
||||
void globalQualifierFixCheck(const TSourceLoc&, TQualifier&);
|
||||
|
@ -415,6 +415,7 @@ void TScanContext::fillInKeywordMap()
|
||||
(*KeywordMap)["queuefamilycoherent"] = QUEUEFAMILYCOHERENT;
|
||||
(*KeywordMap)["workgroupcoherent"] = WORKGROUPCOHERENT;
|
||||
(*KeywordMap)["subgroupcoherent"] = SUBGROUPCOHERENT;
|
||||
(*KeywordMap)["shadercallcoherent"] = SHADERCALLCOHERENT;
|
||||
(*KeywordMap)["nonprivate"] = NONPRIVATE;
|
||||
(*KeywordMap)["restrict"] = RESTRICT;
|
||||
(*KeywordMap)["readonly"] = READONLY;
|
||||
@ -703,11 +704,17 @@ void TScanContext::fillInKeywordMap()
|
||||
(*KeywordMap)["precise"] = PRECISE;
|
||||
|
||||
(*KeywordMap)["rayPayloadNV"] = PAYLOADNV;
|
||||
(*KeywordMap)["rayPayloadEXT"] = PAYLOADEXT;
|
||||
(*KeywordMap)["rayPayloadInNV"] = PAYLOADINNV;
|
||||
(*KeywordMap)["rayPayloadInEXT"] = PAYLOADINEXT;
|
||||
(*KeywordMap)["hitAttributeNV"] = HITATTRNV;
|
||||
(*KeywordMap)["hitAttributeEXT"] = HITATTREXT;
|
||||
(*KeywordMap)["callableDataNV"] = CALLDATANV;
|
||||
(*KeywordMap)["callableDataEXT"] = CALLDATAEXT;
|
||||
(*KeywordMap)["callableDataInNV"] = CALLDATAINNV;
|
||||
(*KeywordMap)["callableDataInEXT"] = CALLDATAINEXT;
|
||||
(*KeywordMap)["accelerationStructureNV"] = ACCSTRUCTNV;
|
||||
(*KeywordMap)["accelerationStructureEXT"] = ACCSTRUCTEXT;
|
||||
(*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV;
|
||||
(*KeywordMap)["perviewNV"] = PERVIEWNV;
|
||||
(*KeywordMap)["taskNV"] = PERTASKNV;
|
||||
@ -1014,6 +1021,16 @@ int TScanContext::tokenizeIdentifier()
|
||||
parseContext.extensionTurnedOn(E_GL_NV_ray_tracing))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
case PAYLOADEXT:
|
||||
case PAYLOADINEXT:
|
||||
case HITATTREXT:
|
||||
case CALLDATAEXT:
|
||||
case CALLDATAINEXT:
|
||||
case ACCSTRUCTEXT:
|
||||
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||
parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
case ATOMIC_UINT:
|
||||
if ((parseContext.isEsProfile() && parseContext.version >= 310) ||
|
||||
parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters))
|
||||
@ -1025,6 +1042,7 @@ int TScanContext::tokenizeIdentifier()
|
||||
case QUEUEFAMILYCOHERENT:
|
||||
case WORKGROUPCOHERENT:
|
||||
case SUBGROUPCOHERENT:
|
||||
case SHADERCALLCOHERENT:
|
||||
case NONPRIVATE:
|
||||
case RESTRICT:
|
||||
case READONLY:
|
||||
|
@ -361,17 +361,17 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
|
||||
|
||||
// check for ray tracing stages
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGenNV, source,
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangIntersectNV, source,
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangIntersect, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangAnyHitNV, source,
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangAnyHit, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangClosestHitNV, source,
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangClosestHit, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMissNV, source,
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMiss, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCallableNV, source,
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCallable, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
}
|
||||
|
||||
@ -623,12 +623,12 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
|
||||
version = profile == EEsProfile ? 310 : 420;
|
||||
}
|
||||
break;
|
||||
case EShLangRayGenNV:
|
||||
case EShLangIntersectNV:
|
||||
case EShLangAnyHitNV:
|
||||
case EShLangClosestHitNV:
|
||||
case EShLangMissNV:
|
||||
case EShLangCallableNV:
|
||||
case EShLangRayGen:
|
||||
case EShLangIntersect:
|
||||
case EShLangAnyHit:
|
||||
case EShLangClosestHit:
|
||||
case EShLangMiss:
|
||||
case EShLangCallable:
|
||||
if (profile == EEsProfile || version < 460) {
|
||||
correct = false;
|
||||
infoSink.info.message(EPrefixError, "#version: ray tracing shaders require non-es profile with version 460 or above");
|
||||
|
@ -74,7 +74,7 @@ void TType::buildMangledName(TString& mangledName) const
|
||||
case EbtInt64: mangledName += "i64"; break;
|
||||
case EbtUint64: mangledName += "u64"; break;
|
||||
case EbtAtomicUint: mangledName += "au"; break;
|
||||
case EbtAccStructNV: mangledName += "asnv"; break;
|
||||
case EbtAccStruct: mangledName += "as"; break;
|
||||
#endif
|
||||
case EbtSampler:
|
||||
switch (sampler.type) {
|
||||
|
@ -295,6 +295,7 @@ void TParseVersions::initializeExtensionBehavior()
|
||||
extensionBehavior[E_GL_EXT_device_group] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_multiview] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_realtime_clock] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_ray_tracing] = EBhDisable;
|
||||
|
||||
// OVR extensions
|
||||
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
|
||||
@ -433,6 +434,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
||||
|
||||
"#define E_GL_EXT_shader_atomic_int64 1\n"
|
||||
"#define E_GL_EXT_shader_realtime_clock 1\n"
|
||||
"#define E_GL_EXT_ray_tracing 1\n"
|
||||
|
||||
"#define GL_AMD_shader_ballot 1\n"
|
||||
"#define GL_AMD_shader_trinary_minmax 1\n"
|
||||
@ -546,12 +548,12 @@ const char* StageName(EShLanguage stage)
|
||||
case EShLangTessControl: return "tessellation control";
|
||||
case EShLangTessEvaluation: return "tessellation evaluation";
|
||||
case EShLangGeometry: return "geometry";
|
||||
case EShLangRayGenNV: return "ray-generation";
|
||||
case EShLangIntersectNV: return "intersection";
|
||||
case EShLangAnyHitNV: return "any-hit";
|
||||
case EShLangClosestHitNV: return "closest-hit";
|
||||
case EShLangMissNV: return "miss";
|
||||
case EShLangCallableNV: return "callable";
|
||||
case EShLangRayGen: return "ray-generation";
|
||||
case EShLangIntersect: return "intersection";
|
||||
case EShLangAnyHit: return "any-hit";
|
||||
case EShLangClosestHit: return "closest-hit";
|
||||
case EShLangMiss: return "miss";
|
||||
case EShLangCallable: return "callable";
|
||||
case EShLangMeshNV: return "mesh";
|
||||
case EShLangTaskNV: return "task";
|
||||
#endif
|
||||
|
@ -186,6 +186,7 @@ const char* const E_GL_EXT_buffer_reference_uvec2 = "GL_EXT_buffer_ref
|
||||
const char* const E_GL_EXT_demote_to_helper_invocation = "GL_EXT_demote_to_helper_invocation";
|
||||
const char* const E_GL_EXT_shader_realtime_clock = "GL_EXT_shader_realtime_clock";
|
||||
const char* const E_GL_EXT_debug_printf = "GL_EXT_debug_printf";
|
||||
const char* const E_GL_EXT_ray_tracing = "GL_EXT_ray_tracing";
|
||||
|
||||
// Arrays of extensions for the above viewportEXTs duplications
|
||||
|
||||
|
@ -204,6 +204,7 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
%token <lex> F64MAT4X2 F64MAT4X3 F64MAT4X4
|
||||
%token <lex> ATOMIC_UINT
|
||||
%token <lex> ACCSTRUCTNV
|
||||
%token <lex> ACCSTRUCTEXT
|
||||
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||
|
||||
// combined image/sampler
|
||||
@ -286,9 +287,10 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
%token <lex> INT64CONSTANT UINT64CONSTANT
|
||||
%token <lex> SUBROUTINE DEMOTE
|
||||
%token <lex> PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV
|
||||
%token <lex> PAYLOADEXT PAYLOADINEXT HITATTREXT CALLDATAEXT CALLDATAINEXT
|
||||
%token <lex> PATCH SAMPLE NONUNIFORM
|
||||
%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT
|
||||
%token <lex> SUBGROUPCOHERENT NONPRIVATE
|
||||
%token <lex> SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT
|
||||
%token <lex> NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV
|
||||
%token <lex> PRECISE
|
||||
GLSLANG_WEB_EXCLUDE_OFF
|
||||
@ -1419,42 +1421,81 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
}
|
||||
| HITATTRNV {
|
||||
parseContext.globalCheck($1.loc, "hitAttributeNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectNVMask | EShLangClosestHitNVMask
|
||||
| EShLangAnyHitNVMask), "hitAttributeNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
|
||||
| EShLangAnyHitMask), "hitAttributeNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "hitAttributeNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqHitAttrNV;
|
||||
$$.qualifier.storage = EvqHitAttr;
|
||||
}
|
||||
| HITATTREXT {
|
||||
parseContext.globalCheck($1.loc, "hitAttributeEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
|
||||
| EShLangAnyHitMask), "hitAttributeEXT");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "hitAttributeNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqHitAttr;
|
||||
}
|
||||
| PAYLOADNV {
|
||||
parseContext.globalCheck($1.loc, "rayPayloadNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangClosestHitNVMask |
|
||||
EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask |
|
||||
EShLangAnyHitMask | EShLangMissMask), "rayPayloadNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqPayloadNV;
|
||||
$$.qualifier.storage = EvqPayload;
|
||||
}
|
||||
| PAYLOADEXT {
|
||||
parseContext.globalCheck($1.loc, "rayPayloadEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask |
|
||||
EShLangAnyHitMask | EShLangMissMask), "rayPayloadEXT");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadEXT");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqPayload;
|
||||
}
|
||||
| PAYLOADINNV {
|
||||
parseContext.globalCheck($1.loc, "rayPayloadInNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitNVMask |
|
||||
EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadInNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitMask |
|
||||
EShLangAnyHitMask | EShLangMissMask), "rayPayloadInNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqPayloadInNV;
|
||||
$$.qualifier.storage = EvqPayloadIn;
|
||||
}
|
||||
| PAYLOADINEXT {
|
||||
parseContext.globalCheck($1.loc, "rayPayloadInEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitMask |
|
||||
EShLangAnyHitMask | EShLangMissMask), "rayPayloadInEXT");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadInEXT");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqPayloadIn;
|
||||
}
|
||||
| CALLDATANV {
|
||||
parseContext.globalCheck($1.loc, "callableDataNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask |
|
||||
EShLangClosestHitNVMask | EShLangMissNVMask | EShLangCallableNVMask), "callableDataNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask |
|
||||
EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqCallableDataNV;
|
||||
$$.qualifier.storage = EvqCallableData;
|
||||
}
|
||||
| CALLDATAEXT {
|
||||
parseContext.globalCheck($1.loc, "callableDataEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask |
|
||||
EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataEXT");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataEXT");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqCallableData;
|
||||
}
|
||||
| CALLDATAINNV {
|
||||
parseContext.globalCheck($1.loc, "callableDataInNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableNVMask), "callableDataInNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqCallableDataInNV;
|
||||
$$.qualifier.storage = EvqCallableDataIn;
|
||||
}
|
||||
| CALLDATAINEXT {
|
||||
parseContext.globalCheck($1.loc, "callableDataInEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataInEXT");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqCallableDataIn;
|
||||
}
|
||||
| COHERENT {
|
||||
$$.init($1.loc);
|
||||
@ -1485,6 +1526,11 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "nonprivate");
|
||||
$$.qualifier.nonprivate = true;
|
||||
}
|
||||
| SHADERCALLCOHERENT {
|
||||
$$.init($1.loc);
|
||||
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_ray_tracing, "shadercallcoherent");
|
||||
$$.qualifier.shadercallcoherent = true;
|
||||
}
|
||||
| VOLATILE {
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.volatil = true;
|
||||
@ -2354,7 +2400,11 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
}
|
||||
| ACCSTRUCTNV {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtAccStructNV;
|
||||
$$.basicType = EbtAccStruct;
|
||||
}
|
||||
| ACCSTRUCTEXT {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtAccStruct;
|
||||
}
|
||||
| ATOMIC_UINT {
|
||||
parseContext.vulkanRemoved($1.loc, "atomic counter types");
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Copyright (C) 2015-2018 Google, Inc.
|
||||
// Copyright (C) 2015-2019 Google, Inc.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -204,6 +204,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
||||
%token <lex> F64MAT4X2 F64MAT4X3 F64MAT4X4
|
||||
%token <lex> ATOMIC_UINT
|
||||
%token <lex> ACCSTRUCTNV
|
||||
%token <lex> ACCSTRUCTEXT
|
||||
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||
|
||||
// combined image/sampler
|
||||
@ -286,9 +287,10 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
||||
%token <lex> INT64CONSTANT UINT64CONSTANT
|
||||
%token <lex> SUBROUTINE DEMOTE
|
||||
%token <lex> PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV
|
||||
%token <lex> PAYLOADEXT PAYLOADINEXT HITATTREXT CALLDATAEXT CALLDATAINEXT
|
||||
%token <lex> PATCH SAMPLE NONUNIFORM
|
||||
%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT
|
||||
%token <lex> SUBGROUPCOHERENT NONPRIVATE
|
||||
%token <lex> SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT
|
||||
%token <lex> NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV
|
||||
%token <lex> PRECISE
|
||||
|
||||
@ -1419,42 +1421,81 @@ storage_qualifier
|
||||
}
|
||||
| HITATTRNV {
|
||||
parseContext.globalCheck($1.loc, "hitAttributeNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectNVMask | EShLangClosestHitNVMask
|
||||
| EShLangAnyHitNVMask), "hitAttributeNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
|
||||
| EShLangAnyHitMask), "hitAttributeNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "hitAttributeNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqHitAttrNV;
|
||||
$$.qualifier.storage = EvqHitAttr;
|
||||
}
|
||||
| HITATTREXT {
|
||||
parseContext.globalCheck($1.loc, "hitAttributeEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
|
||||
| EShLangAnyHitMask), "hitAttributeEXT");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "hitAttributeNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqHitAttr;
|
||||
}
|
||||
| PAYLOADNV {
|
||||
parseContext.globalCheck($1.loc, "rayPayloadNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangClosestHitNVMask |
|
||||
EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask |
|
||||
EShLangAnyHitMask | EShLangMissMask), "rayPayloadNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqPayloadNV;
|
||||
$$.qualifier.storage = EvqPayload;
|
||||
}
|
||||
| PAYLOADEXT {
|
||||
parseContext.globalCheck($1.loc, "rayPayloadEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask |
|
||||
EShLangAnyHitMask | EShLangMissMask), "rayPayloadEXT");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadEXT");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqPayload;
|
||||
}
|
||||
| PAYLOADINNV {
|
||||
parseContext.globalCheck($1.loc, "rayPayloadInNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitNVMask |
|
||||
EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadInNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitMask |
|
||||
EShLangAnyHitMask | EShLangMissMask), "rayPayloadInNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqPayloadInNV;
|
||||
$$.qualifier.storage = EvqPayloadIn;
|
||||
}
|
||||
| PAYLOADINEXT {
|
||||
parseContext.globalCheck($1.loc, "rayPayloadInEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitMask |
|
||||
EShLangAnyHitMask | EShLangMissMask), "rayPayloadInEXT");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadInEXT");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqPayloadIn;
|
||||
}
|
||||
| CALLDATANV {
|
||||
parseContext.globalCheck($1.loc, "callableDataNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask |
|
||||
EShLangClosestHitNVMask | EShLangMissNVMask | EShLangCallableNVMask), "callableDataNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask |
|
||||
EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqCallableDataNV;
|
||||
$$.qualifier.storage = EvqCallableData;
|
||||
}
|
||||
| CALLDATAEXT {
|
||||
parseContext.globalCheck($1.loc, "callableDataEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask |
|
||||
EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataEXT");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataEXT");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqCallableData;
|
||||
}
|
||||
| CALLDATAINNV {
|
||||
parseContext.globalCheck($1.loc, "callableDataInNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableNVMask), "callableDataInNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqCallableDataInNV;
|
||||
$$.qualifier.storage = EvqCallableDataIn;
|
||||
}
|
||||
| CALLDATAINEXT {
|
||||
parseContext.globalCheck($1.loc, "callableDataInEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataInEXT");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqCallableDataIn;
|
||||
}
|
||||
| COHERENT {
|
||||
$$.init($1.loc);
|
||||
@ -1485,6 +1526,11 @@ storage_qualifier
|
||||
parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "nonprivate");
|
||||
$$.qualifier.nonprivate = true;
|
||||
}
|
||||
| SHADERCALLCOHERENT {
|
||||
$$.init($1.loc);
|
||||
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_ray_tracing, "shadercallcoherent");
|
||||
$$.qualifier.shadercallcoherent = true;
|
||||
}
|
||||
| VOLATILE {
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.volatil = true;
|
||||
@ -2354,7 +2400,11 @@ type_specifier_nonarray
|
||||
}
|
||||
| ACCSTRUCTNV {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtAccStructNV;
|
||||
$$.basicType = EbtAccStruct;
|
||||
}
|
||||
| ACCSTRUCTEXT {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtAccStruct;
|
||||
}
|
||||
| ATOMIC_UINT {
|
||||
parseContext.vulkanRemoved($1.loc, "atomic counter types");
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -203,257 +203,264 @@ extern int yydebug;
|
||||
F64MAT4X4 = 413,
|
||||
ATOMIC_UINT = 414,
|
||||
ACCSTRUCTNV = 415,
|
||||
FCOOPMATNV = 416,
|
||||
ICOOPMATNV = 417,
|
||||
UCOOPMATNV = 418,
|
||||
SAMPLERCUBEARRAY = 419,
|
||||
SAMPLERCUBEARRAYSHADOW = 420,
|
||||
ISAMPLERCUBEARRAY = 421,
|
||||
USAMPLERCUBEARRAY = 422,
|
||||
SAMPLER1D = 423,
|
||||
SAMPLER1DARRAY = 424,
|
||||
SAMPLER1DARRAYSHADOW = 425,
|
||||
ISAMPLER1D = 426,
|
||||
SAMPLER1DSHADOW = 427,
|
||||
SAMPLER2DRECT = 428,
|
||||
SAMPLER2DRECTSHADOW = 429,
|
||||
ISAMPLER2DRECT = 430,
|
||||
USAMPLER2DRECT = 431,
|
||||
SAMPLERBUFFER = 432,
|
||||
ISAMPLERBUFFER = 433,
|
||||
USAMPLERBUFFER = 434,
|
||||
SAMPLER2DMS = 435,
|
||||
ISAMPLER2DMS = 436,
|
||||
USAMPLER2DMS = 437,
|
||||
SAMPLER2DMSARRAY = 438,
|
||||
ISAMPLER2DMSARRAY = 439,
|
||||
USAMPLER2DMSARRAY = 440,
|
||||
SAMPLEREXTERNALOES = 441,
|
||||
SAMPLEREXTERNAL2DY2YEXT = 442,
|
||||
ISAMPLER1DARRAY = 443,
|
||||
USAMPLER1D = 444,
|
||||
USAMPLER1DARRAY = 445,
|
||||
F16SAMPLER1D = 446,
|
||||
F16SAMPLER2D = 447,
|
||||
F16SAMPLER3D = 448,
|
||||
F16SAMPLER2DRECT = 449,
|
||||
F16SAMPLERCUBE = 450,
|
||||
F16SAMPLER1DARRAY = 451,
|
||||
F16SAMPLER2DARRAY = 452,
|
||||
F16SAMPLERCUBEARRAY = 453,
|
||||
F16SAMPLERBUFFER = 454,
|
||||
F16SAMPLER2DMS = 455,
|
||||
F16SAMPLER2DMSARRAY = 456,
|
||||
F16SAMPLER1DSHADOW = 457,
|
||||
F16SAMPLER2DSHADOW = 458,
|
||||
F16SAMPLER1DARRAYSHADOW = 459,
|
||||
F16SAMPLER2DARRAYSHADOW = 460,
|
||||
F16SAMPLER2DRECTSHADOW = 461,
|
||||
F16SAMPLERCUBESHADOW = 462,
|
||||
F16SAMPLERCUBEARRAYSHADOW = 463,
|
||||
IMAGE1D = 464,
|
||||
IIMAGE1D = 465,
|
||||
UIMAGE1D = 466,
|
||||
IMAGE2D = 467,
|
||||
IIMAGE2D = 468,
|
||||
UIMAGE2D = 469,
|
||||
IMAGE3D = 470,
|
||||
IIMAGE3D = 471,
|
||||
UIMAGE3D = 472,
|
||||
IMAGE2DRECT = 473,
|
||||
IIMAGE2DRECT = 474,
|
||||
UIMAGE2DRECT = 475,
|
||||
IMAGECUBE = 476,
|
||||
IIMAGECUBE = 477,
|
||||
UIMAGECUBE = 478,
|
||||
IMAGEBUFFER = 479,
|
||||
IIMAGEBUFFER = 480,
|
||||
UIMAGEBUFFER = 481,
|
||||
IMAGE1DARRAY = 482,
|
||||
IIMAGE1DARRAY = 483,
|
||||
UIMAGE1DARRAY = 484,
|
||||
IMAGE2DARRAY = 485,
|
||||
IIMAGE2DARRAY = 486,
|
||||
UIMAGE2DARRAY = 487,
|
||||
IMAGECUBEARRAY = 488,
|
||||
IIMAGECUBEARRAY = 489,
|
||||
UIMAGECUBEARRAY = 490,
|
||||
IMAGE2DMS = 491,
|
||||
IIMAGE2DMS = 492,
|
||||
UIMAGE2DMS = 493,
|
||||
IMAGE2DMSARRAY = 494,
|
||||
IIMAGE2DMSARRAY = 495,
|
||||
UIMAGE2DMSARRAY = 496,
|
||||
F16IMAGE1D = 497,
|
||||
F16IMAGE2D = 498,
|
||||
F16IMAGE3D = 499,
|
||||
F16IMAGE2DRECT = 500,
|
||||
F16IMAGECUBE = 501,
|
||||
F16IMAGE1DARRAY = 502,
|
||||
F16IMAGE2DARRAY = 503,
|
||||
F16IMAGECUBEARRAY = 504,
|
||||
F16IMAGEBUFFER = 505,
|
||||
F16IMAGE2DMS = 506,
|
||||
F16IMAGE2DMSARRAY = 507,
|
||||
TEXTURECUBEARRAY = 508,
|
||||
ITEXTURECUBEARRAY = 509,
|
||||
UTEXTURECUBEARRAY = 510,
|
||||
TEXTURE1D = 511,
|
||||
ITEXTURE1D = 512,
|
||||
UTEXTURE1D = 513,
|
||||
TEXTURE1DARRAY = 514,
|
||||
ITEXTURE1DARRAY = 515,
|
||||
UTEXTURE1DARRAY = 516,
|
||||
TEXTURE2DRECT = 517,
|
||||
ITEXTURE2DRECT = 518,
|
||||
UTEXTURE2DRECT = 519,
|
||||
TEXTUREBUFFER = 520,
|
||||
ITEXTUREBUFFER = 521,
|
||||
UTEXTUREBUFFER = 522,
|
||||
TEXTURE2DMS = 523,
|
||||
ITEXTURE2DMS = 524,
|
||||
UTEXTURE2DMS = 525,
|
||||
TEXTURE2DMSARRAY = 526,
|
||||
ITEXTURE2DMSARRAY = 527,
|
||||
UTEXTURE2DMSARRAY = 528,
|
||||
F16TEXTURE1D = 529,
|
||||
F16TEXTURE2D = 530,
|
||||
F16TEXTURE3D = 531,
|
||||
F16TEXTURE2DRECT = 532,
|
||||
F16TEXTURECUBE = 533,
|
||||
F16TEXTURE1DARRAY = 534,
|
||||
F16TEXTURE2DARRAY = 535,
|
||||
F16TEXTURECUBEARRAY = 536,
|
||||
F16TEXTUREBUFFER = 537,
|
||||
F16TEXTURE2DMS = 538,
|
||||
F16TEXTURE2DMSARRAY = 539,
|
||||
SUBPASSINPUT = 540,
|
||||
SUBPASSINPUTMS = 541,
|
||||
ISUBPASSINPUT = 542,
|
||||
ISUBPASSINPUTMS = 543,
|
||||
USUBPASSINPUT = 544,
|
||||
USUBPASSINPUTMS = 545,
|
||||
F16SUBPASSINPUT = 546,
|
||||
F16SUBPASSINPUTMS = 547,
|
||||
LEFT_OP = 548,
|
||||
RIGHT_OP = 549,
|
||||
INC_OP = 550,
|
||||
DEC_OP = 551,
|
||||
LE_OP = 552,
|
||||
GE_OP = 553,
|
||||
EQ_OP = 554,
|
||||
NE_OP = 555,
|
||||
AND_OP = 556,
|
||||
OR_OP = 557,
|
||||
XOR_OP = 558,
|
||||
MUL_ASSIGN = 559,
|
||||
DIV_ASSIGN = 560,
|
||||
ADD_ASSIGN = 561,
|
||||
MOD_ASSIGN = 562,
|
||||
LEFT_ASSIGN = 563,
|
||||
RIGHT_ASSIGN = 564,
|
||||
AND_ASSIGN = 565,
|
||||
XOR_ASSIGN = 566,
|
||||
OR_ASSIGN = 567,
|
||||
SUB_ASSIGN = 568,
|
||||
STRING_LITERAL = 569,
|
||||
LEFT_PAREN = 570,
|
||||
RIGHT_PAREN = 571,
|
||||
LEFT_BRACKET = 572,
|
||||
RIGHT_BRACKET = 573,
|
||||
LEFT_BRACE = 574,
|
||||
RIGHT_BRACE = 575,
|
||||
DOT = 576,
|
||||
COMMA = 577,
|
||||
COLON = 578,
|
||||
EQUAL = 579,
|
||||
SEMICOLON = 580,
|
||||
BANG = 581,
|
||||
DASH = 582,
|
||||
TILDE = 583,
|
||||
PLUS = 584,
|
||||
STAR = 585,
|
||||
SLASH = 586,
|
||||
PERCENT = 587,
|
||||
LEFT_ANGLE = 588,
|
||||
RIGHT_ANGLE = 589,
|
||||
VERTICAL_BAR = 590,
|
||||
CARET = 591,
|
||||
AMPERSAND = 592,
|
||||
QUESTION = 593,
|
||||
INVARIANT = 594,
|
||||
HIGH_PRECISION = 595,
|
||||
MEDIUM_PRECISION = 596,
|
||||
LOW_PRECISION = 597,
|
||||
PRECISION = 598,
|
||||
PACKED = 599,
|
||||
RESOURCE = 600,
|
||||
SUPERP = 601,
|
||||
FLOATCONSTANT = 602,
|
||||
INTCONSTANT = 603,
|
||||
UINTCONSTANT = 604,
|
||||
BOOLCONSTANT = 605,
|
||||
IDENTIFIER = 606,
|
||||
TYPE_NAME = 607,
|
||||
CENTROID = 608,
|
||||
IN = 609,
|
||||
OUT = 610,
|
||||
INOUT = 611,
|
||||
STRUCT = 612,
|
||||
VOID = 613,
|
||||
WHILE = 614,
|
||||
BREAK = 615,
|
||||
CONTINUE = 616,
|
||||
DO = 617,
|
||||
ELSE = 618,
|
||||
FOR = 619,
|
||||
IF = 620,
|
||||
DISCARD = 621,
|
||||
RETURN = 622,
|
||||
SWITCH = 623,
|
||||
CASE = 624,
|
||||
DEFAULT = 625,
|
||||
UNIFORM = 626,
|
||||
SHARED = 627,
|
||||
BUFFER = 628,
|
||||
FLAT = 629,
|
||||
SMOOTH = 630,
|
||||
LAYOUT = 631,
|
||||
DOUBLECONSTANT = 632,
|
||||
INT16CONSTANT = 633,
|
||||
UINT16CONSTANT = 634,
|
||||
FLOAT16CONSTANT = 635,
|
||||
INT32CONSTANT = 636,
|
||||
UINT32CONSTANT = 637,
|
||||
INT64CONSTANT = 638,
|
||||
UINT64CONSTANT = 639,
|
||||
SUBROUTINE = 640,
|
||||
DEMOTE = 641,
|
||||
PAYLOADNV = 642,
|
||||
PAYLOADINNV = 643,
|
||||
HITATTRNV = 644,
|
||||
CALLDATANV = 645,
|
||||
CALLDATAINNV = 646,
|
||||
PATCH = 647,
|
||||
SAMPLE = 648,
|
||||
NONUNIFORM = 649,
|
||||
COHERENT = 650,
|
||||
VOLATILE = 651,
|
||||
RESTRICT = 652,
|
||||
READONLY = 653,
|
||||
WRITEONLY = 654,
|
||||
DEVICECOHERENT = 655,
|
||||
QUEUEFAMILYCOHERENT = 656,
|
||||
WORKGROUPCOHERENT = 657,
|
||||
SUBGROUPCOHERENT = 658,
|
||||
NONPRIVATE = 659,
|
||||
NOPERSPECTIVE = 660,
|
||||
EXPLICITINTERPAMD = 661,
|
||||
PERVERTEXNV = 662,
|
||||
PERPRIMITIVENV = 663,
|
||||
PERVIEWNV = 664,
|
||||
PERTASKNV = 665,
|
||||
PRECISE = 666
|
||||
ACCSTRUCTEXT = 416,
|
||||
FCOOPMATNV = 417,
|
||||
ICOOPMATNV = 418,
|
||||
UCOOPMATNV = 419,
|
||||
SAMPLERCUBEARRAY = 420,
|
||||
SAMPLERCUBEARRAYSHADOW = 421,
|
||||
ISAMPLERCUBEARRAY = 422,
|
||||
USAMPLERCUBEARRAY = 423,
|
||||
SAMPLER1D = 424,
|
||||
SAMPLER1DARRAY = 425,
|
||||
SAMPLER1DARRAYSHADOW = 426,
|
||||
ISAMPLER1D = 427,
|
||||
SAMPLER1DSHADOW = 428,
|
||||
SAMPLER2DRECT = 429,
|
||||
SAMPLER2DRECTSHADOW = 430,
|
||||
ISAMPLER2DRECT = 431,
|
||||
USAMPLER2DRECT = 432,
|
||||
SAMPLERBUFFER = 433,
|
||||
ISAMPLERBUFFER = 434,
|
||||
USAMPLERBUFFER = 435,
|
||||
SAMPLER2DMS = 436,
|
||||
ISAMPLER2DMS = 437,
|
||||
USAMPLER2DMS = 438,
|
||||
SAMPLER2DMSARRAY = 439,
|
||||
ISAMPLER2DMSARRAY = 440,
|
||||
USAMPLER2DMSARRAY = 441,
|
||||
SAMPLEREXTERNALOES = 442,
|
||||
SAMPLEREXTERNAL2DY2YEXT = 443,
|
||||
ISAMPLER1DARRAY = 444,
|
||||
USAMPLER1D = 445,
|
||||
USAMPLER1DARRAY = 446,
|
||||
F16SAMPLER1D = 447,
|
||||
F16SAMPLER2D = 448,
|
||||
F16SAMPLER3D = 449,
|
||||
F16SAMPLER2DRECT = 450,
|
||||
F16SAMPLERCUBE = 451,
|
||||
F16SAMPLER1DARRAY = 452,
|
||||
F16SAMPLER2DARRAY = 453,
|
||||
F16SAMPLERCUBEARRAY = 454,
|
||||
F16SAMPLERBUFFER = 455,
|
||||
F16SAMPLER2DMS = 456,
|
||||
F16SAMPLER2DMSARRAY = 457,
|
||||
F16SAMPLER1DSHADOW = 458,
|
||||
F16SAMPLER2DSHADOW = 459,
|
||||
F16SAMPLER1DARRAYSHADOW = 460,
|
||||
F16SAMPLER2DARRAYSHADOW = 461,
|
||||
F16SAMPLER2DRECTSHADOW = 462,
|
||||
F16SAMPLERCUBESHADOW = 463,
|
||||
F16SAMPLERCUBEARRAYSHADOW = 464,
|
||||
IMAGE1D = 465,
|
||||
IIMAGE1D = 466,
|
||||
UIMAGE1D = 467,
|
||||
IMAGE2D = 468,
|
||||
IIMAGE2D = 469,
|
||||
UIMAGE2D = 470,
|
||||
IMAGE3D = 471,
|
||||
IIMAGE3D = 472,
|
||||
UIMAGE3D = 473,
|
||||
IMAGE2DRECT = 474,
|
||||
IIMAGE2DRECT = 475,
|
||||
UIMAGE2DRECT = 476,
|
||||
IMAGECUBE = 477,
|
||||
IIMAGECUBE = 478,
|
||||
UIMAGECUBE = 479,
|
||||
IMAGEBUFFER = 480,
|
||||
IIMAGEBUFFER = 481,
|
||||
UIMAGEBUFFER = 482,
|
||||
IMAGE1DARRAY = 483,
|
||||
IIMAGE1DARRAY = 484,
|
||||
UIMAGE1DARRAY = 485,
|
||||
IMAGE2DARRAY = 486,
|
||||
IIMAGE2DARRAY = 487,
|
||||
UIMAGE2DARRAY = 488,
|
||||
IMAGECUBEARRAY = 489,
|
||||
IIMAGECUBEARRAY = 490,
|
||||
UIMAGECUBEARRAY = 491,
|
||||
IMAGE2DMS = 492,
|
||||
IIMAGE2DMS = 493,
|
||||
UIMAGE2DMS = 494,
|
||||
IMAGE2DMSARRAY = 495,
|
||||
IIMAGE2DMSARRAY = 496,
|
||||
UIMAGE2DMSARRAY = 497,
|
||||
F16IMAGE1D = 498,
|
||||
F16IMAGE2D = 499,
|
||||
F16IMAGE3D = 500,
|
||||
F16IMAGE2DRECT = 501,
|
||||
F16IMAGECUBE = 502,
|
||||
F16IMAGE1DARRAY = 503,
|
||||
F16IMAGE2DARRAY = 504,
|
||||
F16IMAGECUBEARRAY = 505,
|
||||
F16IMAGEBUFFER = 506,
|
||||
F16IMAGE2DMS = 507,
|
||||
F16IMAGE2DMSARRAY = 508,
|
||||
TEXTURECUBEARRAY = 509,
|
||||
ITEXTURECUBEARRAY = 510,
|
||||
UTEXTURECUBEARRAY = 511,
|
||||
TEXTURE1D = 512,
|
||||
ITEXTURE1D = 513,
|
||||
UTEXTURE1D = 514,
|
||||
TEXTURE1DARRAY = 515,
|
||||
ITEXTURE1DARRAY = 516,
|
||||
UTEXTURE1DARRAY = 517,
|
||||
TEXTURE2DRECT = 518,
|
||||
ITEXTURE2DRECT = 519,
|
||||
UTEXTURE2DRECT = 520,
|
||||
TEXTUREBUFFER = 521,
|
||||
ITEXTUREBUFFER = 522,
|
||||
UTEXTUREBUFFER = 523,
|
||||
TEXTURE2DMS = 524,
|
||||
ITEXTURE2DMS = 525,
|
||||
UTEXTURE2DMS = 526,
|
||||
TEXTURE2DMSARRAY = 527,
|
||||
ITEXTURE2DMSARRAY = 528,
|
||||
UTEXTURE2DMSARRAY = 529,
|
||||
F16TEXTURE1D = 530,
|
||||
F16TEXTURE2D = 531,
|
||||
F16TEXTURE3D = 532,
|
||||
F16TEXTURE2DRECT = 533,
|
||||
F16TEXTURECUBE = 534,
|
||||
F16TEXTURE1DARRAY = 535,
|
||||
F16TEXTURE2DARRAY = 536,
|
||||
F16TEXTURECUBEARRAY = 537,
|
||||
F16TEXTUREBUFFER = 538,
|
||||
F16TEXTURE2DMS = 539,
|
||||
F16TEXTURE2DMSARRAY = 540,
|
||||
SUBPASSINPUT = 541,
|
||||
SUBPASSINPUTMS = 542,
|
||||
ISUBPASSINPUT = 543,
|
||||
ISUBPASSINPUTMS = 544,
|
||||
USUBPASSINPUT = 545,
|
||||
USUBPASSINPUTMS = 546,
|
||||
F16SUBPASSINPUT = 547,
|
||||
F16SUBPASSINPUTMS = 548,
|
||||
LEFT_OP = 549,
|
||||
RIGHT_OP = 550,
|
||||
INC_OP = 551,
|
||||
DEC_OP = 552,
|
||||
LE_OP = 553,
|
||||
GE_OP = 554,
|
||||
EQ_OP = 555,
|
||||
NE_OP = 556,
|
||||
AND_OP = 557,
|
||||
OR_OP = 558,
|
||||
XOR_OP = 559,
|
||||
MUL_ASSIGN = 560,
|
||||
DIV_ASSIGN = 561,
|
||||
ADD_ASSIGN = 562,
|
||||
MOD_ASSIGN = 563,
|
||||
LEFT_ASSIGN = 564,
|
||||
RIGHT_ASSIGN = 565,
|
||||
AND_ASSIGN = 566,
|
||||
XOR_ASSIGN = 567,
|
||||
OR_ASSIGN = 568,
|
||||
SUB_ASSIGN = 569,
|
||||
STRING_LITERAL = 570,
|
||||
LEFT_PAREN = 571,
|
||||
RIGHT_PAREN = 572,
|
||||
LEFT_BRACKET = 573,
|
||||
RIGHT_BRACKET = 574,
|
||||
LEFT_BRACE = 575,
|
||||
RIGHT_BRACE = 576,
|
||||
DOT = 577,
|
||||
COMMA = 578,
|
||||
COLON = 579,
|
||||
EQUAL = 580,
|
||||
SEMICOLON = 581,
|
||||
BANG = 582,
|
||||
DASH = 583,
|
||||
TILDE = 584,
|
||||
PLUS = 585,
|
||||
STAR = 586,
|
||||
SLASH = 587,
|
||||
PERCENT = 588,
|
||||
LEFT_ANGLE = 589,
|
||||
RIGHT_ANGLE = 590,
|
||||
VERTICAL_BAR = 591,
|
||||
CARET = 592,
|
||||
AMPERSAND = 593,
|
||||
QUESTION = 594,
|
||||
INVARIANT = 595,
|
||||
HIGH_PRECISION = 596,
|
||||
MEDIUM_PRECISION = 597,
|
||||
LOW_PRECISION = 598,
|
||||
PRECISION = 599,
|
||||
PACKED = 600,
|
||||
RESOURCE = 601,
|
||||
SUPERP = 602,
|
||||
FLOATCONSTANT = 603,
|
||||
INTCONSTANT = 604,
|
||||
UINTCONSTANT = 605,
|
||||
BOOLCONSTANT = 606,
|
||||
IDENTIFIER = 607,
|
||||
TYPE_NAME = 608,
|
||||
CENTROID = 609,
|
||||
IN = 610,
|
||||
OUT = 611,
|
||||
INOUT = 612,
|
||||
STRUCT = 613,
|
||||
VOID = 614,
|
||||
WHILE = 615,
|
||||
BREAK = 616,
|
||||
CONTINUE = 617,
|
||||
DO = 618,
|
||||
ELSE = 619,
|
||||
FOR = 620,
|
||||
IF = 621,
|
||||
DISCARD = 622,
|
||||
RETURN = 623,
|
||||
SWITCH = 624,
|
||||
CASE = 625,
|
||||
DEFAULT = 626,
|
||||
UNIFORM = 627,
|
||||
SHARED = 628,
|
||||
BUFFER = 629,
|
||||
FLAT = 630,
|
||||
SMOOTH = 631,
|
||||
LAYOUT = 632,
|
||||
DOUBLECONSTANT = 633,
|
||||
INT16CONSTANT = 634,
|
||||
UINT16CONSTANT = 635,
|
||||
FLOAT16CONSTANT = 636,
|
||||
INT32CONSTANT = 637,
|
||||
UINT32CONSTANT = 638,
|
||||
INT64CONSTANT = 639,
|
||||
UINT64CONSTANT = 640,
|
||||
SUBROUTINE = 641,
|
||||
DEMOTE = 642,
|
||||
PAYLOADNV = 643,
|
||||
PAYLOADINNV = 644,
|
||||
HITATTRNV = 645,
|
||||
CALLDATANV = 646,
|
||||
CALLDATAINNV = 647,
|
||||
PAYLOADEXT = 648,
|
||||
PAYLOADINEXT = 649,
|
||||
HITATTREXT = 650,
|
||||
CALLDATAEXT = 651,
|
||||
CALLDATAINEXT = 652,
|
||||
PATCH = 653,
|
||||
SAMPLE = 654,
|
||||
NONUNIFORM = 655,
|
||||
COHERENT = 656,
|
||||
VOLATILE = 657,
|
||||
RESTRICT = 658,
|
||||
READONLY = 659,
|
||||
WRITEONLY = 660,
|
||||
DEVICECOHERENT = 661,
|
||||
QUEUEFAMILYCOHERENT = 662,
|
||||
WORKGROUPCOHERENT = 663,
|
||||
SUBGROUPCOHERENT = 664,
|
||||
NONPRIVATE = 665,
|
||||
SHADERCALLCOHERENT = 666,
|
||||
NOPERSPECTIVE = 667,
|
||||
EXPLICITINTERPAMD = 668,
|
||||
PERVERTEXNV = 669,
|
||||
PERPRIMITIVENV = 670,
|
||||
PERVIEWNV = 671,
|
||||
PERTASKNV = 672,
|
||||
PRECISE = 673
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -498,7 +505,7 @@ union YYSTYPE
|
||||
glslang::TArraySizes* typeParameters;
|
||||
} interm;
|
||||
|
||||
#line 502 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
|
||||
#line 509 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
|
||||
};
|
||||
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
|
@ -1078,11 +1078,11 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
||||
case EOpSubpassLoad: out.debug << "subpassLoad"; break;
|
||||
case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
|
||||
|
||||
case EOpTraceNV: out.debug << "traceNV"; break;
|
||||
case EOpReportIntersectionNV: out.debug << "reportIntersectionNV"; break;
|
||||
case EOpIgnoreIntersectionNV: out.debug << "ignoreIntersectionNV"; break;
|
||||
case EOpTerminateRayNV: out.debug << "terminateRayNV"; break;
|
||||
case EOpExecuteCallableNV: out.debug << "executeCallableNV"; break;
|
||||
case EOpTrace: out.debug << "traceNV"; break;
|
||||
case EOpReportIntersection: out.debug << "reportIntersectionNV"; break;
|
||||
case EOpIgnoreIntersection: out.debug << "ignoreIntersectionNV"; break;
|
||||
case EOpTerminateRay: out.debug << "terminateRayNV"; break;
|
||||
case EOpExecuteCallable: out.debug << "executeCallableNV"; break;
|
||||
case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; break;
|
||||
|
||||
case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix"; break;
|
||||
|
@ -290,7 +290,7 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit)
|
||||
}
|
||||
|
||||
// Getting this far means we have two existing trees to merge...
|
||||
numShaderRecordNVBlocks += unit.numShaderRecordNVBlocks;
|
||||
numShaderRecordBlocks += unit.numShaderRecordBlocks;
|
||||
numTaskNVBlocks += unit.numTaskNVBlocks;
|
||||
|
||||
// Get the top-level globals of each unit
|
||||
@ -562,6 +562,7 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
|
||||
symbol.getQualifier().queuefamilycoherent != unitSymbol.getQualifier().queuefamilycoherent ||
|
||||
symbol.getQualifier().workgroupcoherent != unitSymbol.getQualifier().workgroupcoherent ||
|
||||
symbol.getQualifier().subgroupcoherent != unitSymbol.getQualifier().subgroupcoherent ||
|
||||
symbol.getQualifier().shadercallcoherent!= unitSymbol.getQualifier().shadercallcoherent ||
|
||||
symbol.getQualifier().nonprivate != unitSymbol.getQualifier().nonprivate ||
|
||||
symbol.getQualifier().volatil != unitSymbol.getQualifier().volatil ||
|
||||
symbol.getQualifier().restrict != unitSymbol.getQualifier().restrict ||
|
||||
@ -728,13 +729,13 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
|
||||
break;
|
||||
case EShLangCompute:
|
||||
break;
|
||||
case EShLangRayGenNV:
|
||||
case EShLangIntersectNV:
|
||||
case EShLangAnyHitNV:
|
||||
case EShLangClosestHitNV:
|
||||
case EShLangMissNV:
|
||||
case EShLangCallableNV:
|
||||
if (numShaderRecordNVBlocks > 1)
|
||||
case EShLangRayGen:
|
||||
case EShLangIntersect:
|
||||
case EShLangAnyHit:
|
||||
case EShLangClosestHit:
|
||||
case EShLangMiss:
|
||||
case EShLangCallable:
|
||||
if (numShaderRecordBlocks > 1)
|
||||
error(infoSink, "Only one shaderRecordNV buffer block is allowed per stage");
|
||||
break;
|
||||
case EShLangMeshNV:
|
||||
|
@ -249,7 +249,7 @@ public:
|
||||
blendEquations(0), xfbMode(false), multiStream(false),
|
||||
layoutOverrideCoverage(false),
|
||||
geoPassthroughEXT(false),
|
||||
numShaderRecordNVBlocks(0),
|
||||
numShaderRecordBlocks(0),
|
||||
computeDerivativeMode(LayoutDerivativeNone),
|
||||
primitives(TQualifier::layoutNotSet),
|
||||
numTaskNVBlocks(0),
|
||||
@ -620,7 +620,7 @@ public:
|
||||
|
||||
void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { textureSamplerTransformMode = mode; }
|
||||
int getNumPushConstants() const { return numPushConstants; }
|
||||
void addShaderRecordNVCount() { ++numShaderRecordNVBlocks; }
|
||||
void addShaderRecordCount() { ++numShaderRecordBlocks; }
|
||||
void addTaskNVCount() { ++numTaskNVBlocks; }
|
||||
|
||||
bool setInvocations(int i)
|
||||
@ -945,7 +945,7 @@ protected:
|
||||
bool multiStream;
|
||||
bool layoutOverrideCoverage;
|
||||
bool geoPassthroughEXT;
|
||||
int numShaderRecordNVBlocks;
|
||||
int numShaderRecordBlocks;
|
||||
ComputeDerivativeMode computeDerivativeMode;
|
||||
int primitives;
|
||||
int numTaskNVBlocks;
|
||||
|
@ -92,12 +92,12 @@ typedef enum {
|
||||
EShLangGeometry,
|
||||
EShLangFragment,
|
||||
EShLangCompute,
|
||||
EShLangRayGenNV,
|
||||
EShLangIntersectNV,
|
||||
EShLangAnyHitNV,
|
||||
EShLangClosestHitNV,
|
||||
EShLangMissNV,
|
||||
EShLangCallableNV,
|
||||
EShLangRayGen,
|
||||
EShLangIntersect,
|
||||
EShLangAnyHit,
|
||||
EShLangClosestHit,
|
||||
EShLangMiss,
|
||||
EShLangCallable,
|
||||
EShLangTaskNV,
|
||||
EShLangMeshNV,
|
||||
LAST_ELEMENT_MARKER(EShLangCount),
|
||||
@ -110,12 +110,12 @@ typedef enum {
|
||||
EShLangGeometryMask = (1 << EShLangGeometry),
|
||||
EShLangFragmentMask = (1 << EShLangFragment),
|
||||
EShLangComputeMask = (1 << EShLangCompute),
|
||||
EShLangRayGenNVMask = (1 << EShLangRayGenNV),
|
||||
EShLangIntersectNVMask = (1 << EShLangIntersectNV),
|
||||
EShLangAnyHitNVMask = (1 << EShLangAnyHitNV),
|
||||
EShLangClosestHitNVMask = (1 << EShLangClosestHitNV),
|
||||
EShLangMissNVMask = (1 << EShLangMissNV),
|
||||
EShLangCallableNVMask = (1 << EShLangCallableNV),
|
||||
EShLangRayGenMask = (1 << EShLangRayGen),
|
||||
EShLangIntersectMask = (1 << EShLangIntersect),
|
||||
EShLangAnyHitMask = (1 << EShLangAnyHit),
|
||||
EShLangClosestHitMask = (1 << EShLangClosestHit),
|
||||
EShLangMissMask = (1 << EShLangMiss),
|
||||
EShLangCallableMask = (1 << EShLangCallable),
|
||||
EShLangTaskNVMask = (1 << EShLangTaskNV),
|
||||
EShLangMeshNVMask = (1 << EShLangMeshNV),
|
||||
LAST_ELEMENT_MARKER(EShLanguageMaskCount),
|
||||
|
@ -320,6 +320,20 @@ INSTANTIATE_TEST_CASE_P(
|
||||
"spv.earlyReturnDiscard.frag",
|
||||
"spv.extPostDepthCoverage.frag",
|
||||
"spv.extPostDepthCoverage_Error.frag",
|
||||
"spv.ext.AnyHitShader.rahit",
|
||||
"spv.ext.AnyHitShader_Errors.rahit",
|
||||
"spv.ext.ClosestHitShader.rchit",
|
||||
"spv.ext.ClosestHitShader_Errors.rchit",
|
||||
"spv.ext.IntersectShader.rint",
|
||||
"spv.ext.IntersectShader_Errors.rint",
|
||||
"spv.ext.MissShader.rmiss",
|
||||
"spv.ext.MissShader_Errors.rmiss",
|
||||
"spv.ext.RayCallable.rcall",
|
||||
"spv.ext.RayCallable_Errors.rcall",
|
||||
"spv.ext.RayConstants.rgen",
|
||||
"spv.ext.RayGenShader.rgen",
|
||||
"spv.ext.RayGenShader11.rgen",
|
||||
"spv.ext.RayGenShaderArray.rgen",
|
||||
"spv.float16convertonlyarith.comp",
|
||||
"spv.float16convertonlystorage.comp",
|
||||
"spv.flowControl.frag",
|
||||
|
@ -61,17 +61,17 @@ EShLanguage GetShaderStage(const std::string& stage)
|
||||
} else if (stage == "comp") {
|
||||
return EShLangCompute;
|
||||
} else if (stage == "rgen") {
|
||||
return EShLangRayGenNV;
|
||||
return EShLangRayGen;
|
||||
} else if (stage == "rint") {
|
||||
return EShLangIntersectNV;
|
||||
return EShLangIntersect;
|
||||
} else if (stage == "rahit") {
|
||||
return EShLangAnyHitNV;
|
||||
return EShLangAnyHit;
|
||||
} else if (stage == "rchit") {
|
||||
return EShLangClosestHitNV;
|
||||
return EShLangClosestHit;
|
||||
} else if (stage == "rmiss") {
|
||||
return EShLangMissNV;
|
||||
return EShLangMiss;
|
||||
} else if (stage == "rcall") {
|
||||
return EShLangCallableNV;
|
||||
return EShLangCallable;
|
||||
} else if (stage == "task") {
|
||||
return EShLangTaskNV;
|
||||
} else if (stage == "mesh") {
|
||||
|
Loading…
Reference in New Issue
Block a user