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