mirror of https://github.com/bkaradzic/bgfx
Updated glslang.
This commit is contained in:
parent
a20478dc0a
commit
5d3c1325d5
|
@ -33,7 +33,7 @@ enum Op;
|
|||
enum Capability;
|
||||
|
||||
static const int GLSLextNVVersion = 100;
|
||||
static const int GLSLextNVRevision = 5;
|
||||
static const int GLSLextNVRevision = 11;
|
||||
|
||||
//SPV_NV_sample_mask_override_coverage
|
||||
const char* const E_SPV_NV_sample_mask_override_coverage = "SPV_NV_sample_mask_override_coverage";
|
||||
|
@ -54,4 +54,22 @@ const char* const E_SPV_NVX_multiview_per_view_attributes = "SPV_NVX_multiview_p
|
|||
//SPV_NV_shader_subgroup_partitioned
|
||||
const char* const E_SPV_NV_shader_subgroup_partitioned = "SPV_NV_shader_subgroup_partitioned";
|
||||
|
||||
#endif // #ifndef GLSLextNV_H
|
||||
//SPV_NV_fragment_shader_barycentric
|
||||
const char* const E_SPV_NV_fragment_shader_barycentric = "SPV_NV_fragment_shader_barycentric";
|
||||
|
||||
//SPV_NV_compute_shader_derivatives
|
||||
const char* const E_SPV_NV_compute_shader_derivatives = "SPV_NV_compute_shader_derivatives";
|
||||
|
||||
//SPV_NV_shader_image_footprint
|
||||
const char* const E_SPV_NV_shader_image_footprint = "SPV_NV_shader_image_footprint";
|
||||
|
||||
//SPV_NV_mesh_shader
|
||||
const char* const E_SPV_NV_mesh_shader = "SPV_NV_mesh_shader";
|
||||
|
||||
//SPV_NVX_raytracing
|
||||
const char* const E_SPV_NVX_raytracing = "SPV_NVX_raytracing";
|
||||
|
||||
//SPV_NV_shading_rate
|
||||
const char* const E_SPV_NV_shading_rate = "SPV_NV_shading_rate";
|
||||
|
||||
#endif // #ifndef GLSLextNV_H
|
||||
|
|
|
@ -194,6 +194,9 @@ protected:
|
|||
spv::Id createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
|
||||
spv::Id createNoArgOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId);
|
||||
spv::Id getSymbolId(const glslang::TIntermSymbol* node);
|
||||
#ifdef NV_EXTENSIONS
|
||||
void addMeshNVDecoration(spv::Id id, int member, const glslang::TQualifier & qualifier);
|
||||
#endif
|
||||
spv::Id createSpvConstant(const glslang::TIntermTyped&);
|
||||
spv::Id createSpvConstantFromConstUnionArray(const glslang::TType& type, const glslang::TConstUnionArray&, int& nextConst, bool specConstant);
|
||||
bool isTrivialLeaf(const glslang::TIntermTyped* node);
|
||||
|
@ -272,6 +275,16 @@ spv::ExecutionModel TranslateExecutionModel(EShLanguage stage)
|
|||
case EShLangGeometry: return spv::ExecutionModelGeometry;
|
||||
case EShLangFragment: return spv::ExecutionModelFragment;
|
||||
case EShLangCompute: return spv::ExecutionModelGLCompute;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EShLangRayGenNV: return spv::ExecutionModelRayGenerationNVX;
|
||||
case EShLangIntersectNV: return spv::ExecutionModelIntersectionNVX;
|
||||
case EShLangAnyHitNV: return spv::ExecutionModelAnyHitNVX;
|
||||
case EShLangClosestHitNV: return spv::ExecutionModelClosestHitNVX;
|
||||
case EShLangMissNV: return spv::ExecutionModelMissNVX;
|
||||
case EShLangCallableNV: return spv::ExecutionModelCallableNVX;
|
||||
case EShLangTaskNV: return spv::ExecutionModelTaskNV;
|
||||
case EShLangMeshNV: return spv::ExecutionModelMeshNV;
|
||||
#endif
|
||||
default:
|
||||
assert(0);
|
||||
return spv::ExecutionModelFragment;
|
||||
|
@ -321,6 +334,11 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useSto
|
|||
case glslang::EvqBuffer: return useStorageBuffer ? spv::DecorationBlock : spv::DecorationBufferBlock;
|
||||
case glslang::EvqVaryingIn: return spv::DecorationBlock;
|
||||
case glslang::EvqVaryingOut: return spv::DecorationBlock;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case glslang::EvqPayloadNV: return spv::DecorationBlock;
|
||||
case glslang::EvqPayloadInNV: return spv::DecorationBlock;
|
||||
case glslang::EvqHitAttrNV: return spv::DecorationBlock;
|
||||
#endif
|
||||
default:
|
||||
assert(0);
|
||||
break;
|
||||
|
@ -379,8 +397,22 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T
|
|||
}
|
||||
case glslang::EvqVaryingIn:
|
||||
case glslang::EvqVaryingOut:
|
||||
assert(type.getQualifier().layoutPacking == glslang::ElpNone);
|
||||
if (type.getQualifier().isTaskMemory()) {
|
||||
switch (type.getQualifier().layoutPacking) {
|
||||
case glslang::ElpShared: return spv::DecorationGLSLShared;
|
||||
case glslang::ElpPacked: return spv::DecorationGLSLPacked;
|
||||
default: break;
|
||||
}
|
||||
} else {
|
||||
assert(type.getQualifier().layoutPacking == glslang::ElpNone);
|
||||
}
|
||||
return spv::DecorationMax;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case glslang::EvqPayloadNV:
|
||||
case glslang::EvqPayloadInNV:
|
||||
case glslang::EvqHitAttrNV:
|
||||
return spv::DecorationMax;
|
||||
#endif
|
||||
default:
|
||||
assert(0);
|
||||
return spv::DecorationMax;
|
||||
|
@ -619,6 +651,11 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
|||
return spv::BuiltInSampleMask;
|
||||
|
||||
case glslang::EbvLayer:
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (glslangIntermediate->getStage() == EShLangMeshNV) {
|
||||
return spv::BuiltInLayer;
|
||||
}
|
||||
#endif
|
||||
builder.addCapability(spv::CapabilityGeometry);
|
||||
if (glslangIntermediate->getStage() == EShLangVertex ||
|
||||
glslangIntermediate->getStage() == EShLangTessControl ||
|
||||
|
@ -827,6 +864,66 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
|||
builder.addExtension(spv::E_SPV_EXT_fragment_fully_covered);
|
||||
builder.addCapability(spv::CapabilityFragmentFullyCoveredEXT);
|
||||
return spv::BuiltInFullyCoveredEXT;
|
||||
case glslang::EbvFragmentSizeNV:
|
||||
builder.addExtension(spv::E_SPV_NV_shading_rate);
|
||||
builder.addCapability(spv::CapabilityShadingRateNV);
|
||||
return spv::BuiltInFragmentSizeNV;
|
||||
case glslang::EbvInvocationsPerPixelNV:
|
||||
builder.addExtension(spv::E_SPV_NV_shading_rate);
|
||||
builder.addCapability(spv::CapabilityShadingRateNV);
|
||||
return spv::BuiltInInvocationsPerPixelNV;
|
||||
|
||||
// raytracing
|
||||
case glslang::EbvLaunchIdNV:
|
||||
return spv::BuiltInLaunchIdNVX;
|
||||
case glslang::EbvLaunchSizeNV:
|
||||
return spv::BuiltInLaunchSizeNVX;
|
||||
case glslang::EbvWorldRayOriginNV:
|
||||
return spv::BuiltInWorldRayOriginNVX;
|
||||
case glslang::EbvWorldRayDirectionNV:
|
||||
return spv::BuiltInWorldRayDirectionNVX;
|
||||
case glslang::EbvObjectRayOriginNV:
|
||||
return spv::BuiltInObjectRayOriginNVX;
|
||||
case glslang::EbvObjectRayDirectionNV:
|
||||
return spv::BuiltInObjectRayDirectionNVX;
|
||||
case glslang::EbvRayTminNV:
|
||||
return spv::BuiltInRayTminNVX;
|
||||
case glslang::EbvRayTmaxNV:
|
||||
return spv::BuiltInRayTmaxNVX;
|
||||
case glslang::EbvInstanceCustomIndexNV:
|
||||
return spv::BuiltInInstanceCustomIndexNVX;
|
||||
case glslang::EbvHitTNV:
|
||||
return spv::BuiltInHitTNVX;
|
||||
case glslang::EbvHitKindNV:
|
||||
return spv::BuiltInHitKindNVX;
|
||||
case glslang::EbvObjectToWorldNV:
|
||||
return spv::BuiltInObjectToWorldNVX;
|
||||
case glslang::EbvWorldToObjectNV:
|
||||
return spv::BuiltInWorldToObjectNVX;
|
||||
case glslang::EbvBaryCoordNV:
|
||||
builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric);
|
||||
builder.addCapability(spv::CapabilityFragmentBarycentricNV);
|
||||
return spv::BuiltInBaryCoordNV;
|
||||
case glslang::EbvBaryCoordNoPerspNV:
|
||||
builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric);
|
||||
builder.addCapability(spv::CapabilityFragmentBarycentricNV);
|
||||
return spv::BuiltInBaryCoordNoPerspNV;
|
||||
case glslang::EbvTaskCountNV:
|
||||
return spv::BuiltInTaskCountNV;
|
||||
case glslang::EbvPrimitiveCountNV:
|
||||
return spv::BuiltInPrimitiveCountNV;
|
||||
case glslang::EbvPrimitiveIndicesNV:
|
||||
return spv::BuiltInPrimitiveIndicesNV;
|
||||
case glslang::EbvClipDistancePerViewNV:
|
||||
return spv::BuiltInClipDistancePerViewNV;
|
||||
case glslang::EbvCullDistancePerViewNV:
|
||||
return spv::BuiltInCullDistancePerViewNV;
|
||||
case glslang::EbvLayerPerViewNV:
|
||||
return spv::BuiltInLayerPerViewNV;
|
||||
case glslang::EbvMeshViewCountNV:
|
||||
return spv::BuiltInMeshViewCountNV;
|
||||
case glslang::EbvMeshViewIndicesNV:
|
||||
return spv::BuiltInMeshViewIndicesNV;
|
||||
#endif
|
||||
default:
|
||||
return spv::BuiltInMax;
|
||||
|
@ -983,6 +1080,10 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
|||
if (type.getQualifier().isUniformOrBuffer()) {
|
||||
if (type.getQualifier().layoutPushConstant)
|
||||
return spv::StorageClassPushConstant;
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (type.getQualifier().layoutShaderRecordNV)
|
||||
return spv::StorageClassShaderRecordBufferNVX;
|
||||
#endif
|
||||
if (type.getBasicType() == glslang::EbtBlock)
|
||||
return spv::StorageClassUniform;
|
||||
return spv::StorageClassUniformConstant;
|
||||
|
@ -993,6 +1094,11 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
|||
case glslang::EvqGlobal: return spv::StorageClassPrivate;
|
||||
case glslang::EvqConstReadOnly: return spv::StorageClassFunction;
|
||||
case glslang::EvqTemporary: return spv::StorageClassFunction;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case glslang::EvqPayloadNV: return spv::StorageClassRayPayloadNVX;
|
||||
case glslang::EvqPayloadInNV: return spv::StorageClassIncomingRayPayloadNVX;
|
||||
case glslang::EvqHitAttrNV: return spv::StorageClassHitAttributeNVX;
|
||||
#endif
|
||||
default:
|
||||
assert(0);
|
||||
break;
|
||||
|
@ -1048,7 +1154,11 @@ bool IsDescriptorResource(const glslang::TType& type)
|
|||
{
|
||||
// uniform and buffer blocks are included, unless it is a push_constant
|
||||
if (type.getBasicType() == glslang::EbtBlock)
|
||||
return type.getQualifier().isUniformOrBuffer() && ! type.getQualifier().layoutPushConstant;
|
||||
return type.getQualifier().isUniformOrBuffer() &&
|
||||
#ifdef NV_EXTENSIONS
|
||||
! type.getQualifier().layoutShaderRecordNV &&
|
||||
#endif
|
||||
! type.getQualifier().layoutPushConstant;
|
||||
|
||||
// non block...
|
||||
// basically samplerXXX/subpass/sampler/texture are all included
|
||||
|
@ -1102,6 +1212,14 @@ void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& pa
|
|||
child.readonly = true;
|
||||
if (parent.writeonly)
|
||||
child.writeonly = true;
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (parent.perPrimitiveNV)
|
||||
child.perPrimitiveNV = true;
|
||||
if (parent.perViewNV)
|
||||
child.perViewNV = true;
|
||||
if (parent.perTaskNV)
|
||||
child.perTaskNV = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool HasNonLayoutQualifiers(const glslang::TType& type, const glslang::TQualifier& qualifier)
|
||||
|
@ -1292,8 +1410,52 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
|
|||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0),
|
||||
glslangIntermediate->getLocalSize(1),
|
||||
glslangIntermediate->getLocalSize(2));
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (glslangIntermediate->getLayoutDerivativeModeNone() == glslang::LayoutDerivativeGroupQuads) {
|
||||
builder.addCapability(spv::CapabilityComputeDerivativeGroupQuadsNV);
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeDerivativeGroupQuadsNV);
|
||||
builder.addExtension(spv::E_SPV_NV_compute_shader_derivatives);
|
||||
} else if (glslangIntermediate->getLayoutDerivativeModeNone() == glslang::LayoutDerivativeGroupLinear) {
|
||||
builder.addCapability(spv::CapabilityComputeDerivativeGroupLinearNV);
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeDerivativeGroupLinearNV);
|
||||
builder.addExtension(spv::E_SPV_NV_compute_shader_derivatives);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EShLangRayGenNV:
|
||||
case EShLangIntersectNV:
|
||||
case EShLangAnyHitNV:
|
||||
case EShLangClosestHitNV:
|
||||
case EShLangMissNV:
|
||||
case EShLangCallableNV:
|
||||
builder.addCapability(spv::CapabilityRaytracingNVX);
|
||||
builder.addExtension("SPV_NVX_raytracing");
|
||||
break;
|
||||
case EShLangTaskNV:
|
||||
case EShLangMeshNV:
|
||||
builder.addCapability(spv::CapabilityMeshShadingNV);
|
||||
builder.addExtension(spv::E_SPV_NV_mesh_shader);
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0),
|
||||
glslangIntermediate->getLocalSize(1),
|
||||
glslangIntermediate->getLocalSize(2));
|
||||
if (glslangIntermediate->getStage() == EShLangMeshNV) {
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices());
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputPrimitivesNV, glslangIntermediate->getPrimitives());
|
||||
|
||||
switch (glslangIntermediate->getOutputPrimitive()) {
|
||||
case glslang::ElgPoints: mode = spv::ExecutionModeOutputPoints; break;
|
||||
case glslang::ElgLines: mode = spv::ExecutionModeOutputLinesNV; break;
|
||||
case glslang::ElgTriangles: mode = spv::ExecutionModeOutputTrianglesNV; break;
|
||||
default: mode = spv::ExecutionModeMax; break;
|
||||
}
|
||||
if (mode != spv::ExecutionModeMax)
|
||||
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2101,6 +2263,15 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||
atomic = true;
|
||||
break;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case glslang::EOpIgnoreIntersectionNV:
|
||||
case glslang::EOpTerminateRayNV:
|
||||
case glslang::EOpTraceNV:
|
||||
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
||||
noReturnValue = true;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2767,6 +2938,11 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
|||
builder.addCapability(spv::CapabilityAtomicStorage);
|
||||
spvType = builder.makeUintType(32);
|
||||
break;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case glslang::EbtAccStructNV:
|
||||
spvType = builder.makeAccelerationStructureNVType();
|
||||
break;
|
||||
#endif
|
||||
case glslang::EbtSampler:
|
||||
{
|
||||
const glslang::TSampler& sampler = type.getSampler();
|
||||
|
@ -2873,23 +3049,28 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
|||
//
|
||||
bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member)
|
||||
{
|
||||
#ifdef NV_EXTENSIONS
|
||||
auto& extensions = glslangIntermediate->getRequestedExtensions();
|
||||
|
||||
if (member.getFieldName() == "gl_ViewportMask" &&
|
||||
extensions.find("GL_NV_viewport_array2") == extensions.end())
|
||||
return true;
|
||||
if (member.getFieldName() == "gl_SecondaryViewportMaskNV" &&
|
||||
extensions.find("GL_NV_stereo_view_rendering") == extensions.end())
|
||||
return true;
|
||||
if (member.getFieldName() == "gl_SecondaryPositionNV" &&
|
||||
extensions.find("GL_NV_stereo_view_rendering") == extensions.end())
|
||||
return true;
|
||||
if (member.getFieldName() == "gl_PositionPerViewNV" &&
|
||||
extensions.find("GL_NVX_multiview_per_view_attributes") == extensions.end())
|
||||
return true;
|
||||
if (member.getFieldName() == "gl_ViewportMaskPerViewNV" &&
|
||||
extensions.find("GL_NVX_multiview_per_view_attributes") == extensions.end())
|
||||
return true;
|
||||
|
||||
if (glslangIntermediate->getStage() != EShLangMeshNV) {
|
||||
if (member.getFieldName() == "gl_ViewportMask" &&
|
||||
extensions.find("GL_NV_viewport_array2") == extensions.end())
|
||||
return true;
|
||||
if (member.getFieldName() == "gl_PositionPerViewNV" &&
|
||||
extensions.find("GL_NVX_multiview_per_view_attributes") == extensions.end())
|
||||
return true;
|
||||
if (member.getFieldName() == "gl_ViewportMaskPerViewNV" &&
|
||||
extensions.find("GL_NVX_multiview_per_view_attributes") == extensions.end())
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
};
|
||||
|
@ -2982,6 +3163,9 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
|||
glslangIntermediate->getSource() == glslang::EShSourceHlsl) {
|
||||
builder.addMemberDecoration(spvType, member, TranslateInterpolationDecoration(memberQualifier));
|
||||
builder.addMemberDecoration(spvType, member, TranslateAuxiliaryStorageDecoration(memberQualifier));
|
||||
#ifdef NV_EXTENSIONS
|
||||
addMeshNVDecoration(spvType, member, memberQualifier);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
builder.addMemberDecoration(spvType, member, TranslateInvariantDecoration(memberQualifier));
|
||||
|
@ -3253,9 +3437,10 @@ glslang::TLayoutPacking TGlslangToSpvTraverser::getExplicitLayout(const glslang:
|
|||
if (type.getBasicType() != glslang::EbtBlock)
|
||||
return glslang::ElpNone;
|
||||
|
||||
// has to be a uniform or buffer block
|
||||
// has to be a uniform or buffer block or task in/out blocks
|
||||
if (type.getQualifier().storage != glslang::EvqUniform &&
|
||||
type.getQualifier().storage != glslang::EvqBuffer)
|
||||
type.getQualifier().storage != glslang::EvqBuffer &&
|
||||
!type.getQualifier().isTaskMemory())
|
||||
return glslang::ElpNone;
|
||||
|
||||
// return the layout to use
|
||||
|
@ -3369,6 +3554,14 @@ void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList&
|
|||
case glslang::EbvSecondaryViewportMaskNV:
|
||||
case glslang::EbvPositionPerViewNV:
|
||||
case glslang::EbvViewportMaskPerViewNV:
|
||||
case glslang::EbvTaskCountNV:
|
||||
case glslang::EbvPrimitiveCountNV:
|
||||
case glslang::EbvPrimitiveIndicesNV:
|
||||
case glslang::EbvClipDistancePerViewNV:
|
||||
case glslang::EbvCullDistancePerViewNV:
|
||||
case glslang::EbvLayerPerViewNV:
|
||||
case glslang::EbvMeshViewCountNV:
|
||||
case glslang::EbvMeshViewIndicesNV:
|
||||
#endif
|
||||
// Generate the associated capability. Delegate to TranslateBuiltInDecoration.
|
||||
// Alternately, we could just call this for any glslang built-in, since the
|
||||
|
@ -3648,6 +3841,25 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
|
|||
if (i == 3)
|
||||
lvalue = true;
|
||||
break;
|
||||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
case glslang::EOpImageSampleFootprintNV:
|
||||
if (i == 4)
|
||||
lvalue = true;
|
||||
break;
|
||||
case glslang::EOpImageSampleFootprintClampNV:
|
||||
case glslang::EOpImageSampleFootprintLodNV:
|
||||
if (i == 5)
|
||||
lvalue = true;
|
||||
break;
|
||||
case glslang::EOpImageSampleFootprintGradNV:
|
||||
if (i == 6)
|
||||
lvalue = true;
|
||||
break;
|
||||
case glslang::EOpImageSampleFootprintGradClampNV:
|
||||
if (i == 7)
|
||||
lvalue = true;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
|
@ -4001,6 +4213,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
|||
|
||||
// Check for texture functions other than queries
|
||||
bool sparse = node->isSparseTexture();
|
||||
#ifdef NV_EXTENSIONS
|
||||
bool imageFootprint = node->isImageFootprint();
|
||||
#endif
|
||||
|
||||
bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow;
|
||||
|
||||
// check for bias argument
|
||||
|
@ -4030,7 +4246,12 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
|||
++nonBiasArgCount;
|
||||
if (sparse)
|
||||
++nonBiasArgCount;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (imageFootprint)
|
||||
//Following three extra arguments
|
||||
// int granularity, bool coarse, out gl_TextureFootprint2DNV footprint
|
||||
nonBiasArgCount += 3;
|
||||
#endif
|
||||
if ((int)arguments.size() > nonBiasArgCount)
|
||||
bias = true;
|
||||
}
|
||||
|
@ -4085,7 +4306,13 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
|||
if (cracked.lod) {
|
||||
params.lod = arguments[2 + extraArgs];
|
||||
++extraArgs;
|
||||
} else if (glslangIntermediate->getStage() != EShLangFragment) {
|
||||
} else if (glslangIntermediate->getStage() != EShLangFragment
|
||||
#ifdef NV_EXTENSIONS
|
||||
// NV_compute_shader_derivatives layout qualifiers allow for implicit LODs
|
||||
&& !(glslangIntermediate->getStage() == EShLangCompute &&
|
||||
(glslangIntermediate->getLayoutDerivativeModeNone() != glslang::LayoutDerivativeNone))
|
||||
#endif
|
||||
) {
|
||||
// we need to invent the default lod for an explicit lod instruction for a non-fragment stage
|
||||
noImplicitLod = true;
|
||||
}
|
||||
|
@ -4117,7 +4344,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
|||
params.lodClamp = arguments[2 + extraArgs];
|
||||
++extraArgs;
|
||||
}
|
||||
|
||||
// sparse
|
||||
if (sparse) {
|
||||
params.texelOut = arguments[2 + extraArgs];
|
||||
|
@ -4133,13 +4359,81 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
|||
} else
|
||||
params.component = builder.makeIntConstant(0);
|
||||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
spv::Id resultStruct = spv::NoResult;
|
||||
if (imageFootprint) {
|
||||
//Following three extra arguments
|
||||
// int granularity, bool coarse, out gl_TextureFootprint2DNV footprint
|
||||
params.granularity = arguments[2 + extraArgs];
|
||||
params.coarse = arguments[3 + extraArgs];
|
||||
resultStruct = arguments[4 + extraArgs];
|
||||
extraArgs += 3;
|
||||
}
|
||||
#endif
|
||||
// bias
|
||||
if (bias) {
|
||||
params.bias = arguments[2 + extraArgs];
|
||||
++extraArgs;
|
||||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (imageFootprint) {
|
||||
builder.addExtension(spv::E_SPV_NV_shader_image_footprint);
|
||||
builder.addCapability(spv::CapabilityImageFootprintNV);
|
||||
|
||||
|
||||
//resultStructType(OpenGL type) contains 5 elements:
|
||||
//struct gl_TextureFootprint2DNV {
|
||||
// uvec2 anchor;
|
||||
// uvec2 offset;
|
||||
// uvec2 mask;
|
||||
// uint lod;
|
||||
// uint granularity;
|
||||
//};
|
||||
//or
|
||||
//struct gl_TextureFootprint3DNV {
|
||||
// uvec3 anchor;
|
||||
// uvec3 offset;
|
||||
// uvec2 mask;
|
||||
// uint lod;
|
||||
// uint granularity;
|
||||
//};
|
||||
spv::Id resultStructType = builder.getContainedTypeId(builder.getTypeId(resultStruct));
|
||||
assert(builder.isStructType(resultStructType));
|
||||
|
||||
//resType (SPIR-V type) contains 6 elements:
|
||||
//Member 0 must be a Boolean type scalar(LOD),
|
||||
//Member 1 must be a vector of integer type, whose Signedness operand is 0(anchor),
|
||||
//Member 2 must be a vector of integer type, whose Signedness operand is 0(offset),
|
||||
//Member 3 must be a vector of integer type, whose Signedness operand is 0(mask),
|
||||
//Member 4 must be a scalar of integer type, whose Signedness operand is 0(lod),
|
||||
//Member 5 must be a scalar of integer type, whose Signedness operand is 0(granularity).
|
||||
std::vector<spv::Id> members;
|
||||
members.push_back(resultType());
|
||||
for (int i = 0; i < 5; i++) {
|
||||
members.push_back(builder.getContainedTypeId(resultStructType, i));
|
||||
}
|
||||
spv::Id resType = builder.makeStructType(members, "ResType");
|
||||
|
||||
//call ImageFootprintNV
|
||||
spv::Id res = builder.createTextureCall(precision, resType, sparse, cracked.fetch, cracked.proj, cracked.gather, noImplicitLod, params);
|
||||
|
||||
//copy resType (SPIR-V type) to resultStructType(OpenGL type)
|
||||
for (int i = 0; i < 5; i++) {
|
||||
builder.clearAccessChain();
|
||||
builder.setAccessChainLValue(resultStruct);
|
||||
|
||||
//Accessing to a struct we created, no coherent flag is set
|
||||
spv::Builder::AccessChain::CoherentFlags flags;
|
||||
flags.clear();
|
||||
|
||||
builder.accessChainPush(builder.makeIntConstant(i), flags);
|
||||
builder.accessChainStore(builder.createCompositeExtract(res, builder.getContainedTypeId(resType, i+1), i+1));
|
||||
}
|
||||
return builder.createCompositeExtract(res, resultType(), 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
// projective component (might not to move)
|
||||
// GLSL: "The texture coordinates consumed from P, not including the last component of P,
|
||||
// are divided by the last component of P."
|
||||
|
@ -5706,7 +6000,7 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
|
|||
spv::IdImmediate scope = { true, builder.makeUintConstant(spv::ScopeSubgroup) };
|
||||
spvGroupOperands.push_back(scope);
|
||||
if (groupOperation != spv::GroupOperationMax) {
|
||||
spv::IdImmediate groupOp = { false, groupOperation };
|
||||
spv::IdImmediate groupOp = { false, (unsigned)groupOperation };
|
||||
spvGroupOperands.push_back(groupOp);
|
||||
}
|
||||
#endif
|
||||
|
@ -5903,7 +6197,7 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv
|
|||
} else {
|
||||
spv::IdImmediate scope = { true, builder.makeUintConstant(spv::ScopeSubgroup) };
|
||||
spvGroupOperands.push_back(scope);
|
||||
spv::IdImmediate groupOp = { false, groupOperation };
|
||||
spv::IdImmediate groupOp = { false, (unsigned)groupOperation };
|
||||
spvGroupOperands.push_back(groupOp);
|
||||
spvGroupOperands.push_back(scalar);
|
||||
}
|
||||
|
@ -6249,7 +6543,7 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
|
|||
|
||||
// Next, for all operations that use a Group Operation, push that as an operand.
|
||||
if (groupOperation != spv::GroupOperationMax) {
|
||||
spv::IdImmediate groupOperand = { false, groupOperation };
|
||||
spv::IdImmediate groupOperand = { false, (unsigned)groupOperation };
|
||||
spvGroupOperands.push_back(groupOperand);
|
||||
}
|
||||
|
||||
|
@ -6571,6 +6865,24 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
|||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case glslang::EOpReportIntersectionNV:
|
||||
{
|
||||
typeId = builder.makeBoolType();
|
||||
opCode = spv::OpReportIntersectionNVX;
|
||||
}
|
||||
break;
|
||||
case glslang::EOpTraceNV:
|
||||
{
|
||||
builder.createNoResultOp(spv::OpTraceNVX, operands);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
||||
builder.createNoResultOp(spv::OpWritePackedPrimitiveIndices4x8NV, operands);
|
||||
return 0;
|
||||
#endif
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -6744,6 +7056,14 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
|
|||
spv::Id id = builder.createBuiltinCall(typeId, getExtBuiltins(spv::E_SPV_AMD_gcn_shader), spv::TimeAMD, args);
|
||||
return builder.setPrecision(id, precision);
|
||||
}
|
||||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
case glslang::EOpIgnoreIntersectionNV:
|
||||
builder.createNoResultOp(spv::OpIgnoreIntersectionNVX);
|
||||
return 0;
|
||||
case glslang::EOpTerminateRayNV:
|
||||
builder.createNoResultOp(spv::OpTerminateRayNVX);
|
||||
return 0;
|
||||
#endif
|
||||
default:
|
||||
logger->missingFunctionality("unknown operation with no arguments");
|
||||
|
@ -6768,6 +7088,9 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||
builder.addDecoration(id, TranslatePrecisionDecoration(symbol->getType()));
|
||||
builder.addDecoration(id, TranslateInterpolationDecoration(symbol->getType().getQualifier()));
|
||||
builder.addDecoration(id, TranslateAuxiliaryStorageDecoration(symbol->getType().getQualifier()));
|
||||
#ifdef NV_EXTENSIONS
|
||||
addMeshNVDecoration(id, /*member*/ -1, symbol->getType().getQualifier());
|
||||
#endif
|
||||
if (symbol->getType().getQualifier().hasSpecConstantId())
|
||||
builder.addDecoration(id, spv::DecorationSpecId, symbol->getType().getQualifier().layoutSpecConstantId);
|
||||
if (symbol->getQualifier().hasIndex())
|
||||
|
@ -6858,6 +7181,11 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||
builder.addCapability(spv::CapabilityGeometryShaderPassthroughNV);
|
||||
builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough);
|
||||
}
|
||||
if (symbol->getQualifier().pervertexNV) {
|
||||
builder.addDecoration(id, spv::DecorationPerVertexNV);
|
||||
builder.addCapability(spv::CapabilityFragmentBarycentricNV);
|
||||
builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (glslangIntermediate->getHlslFunctionality1() && symbol->getType().getQualifier().semanticName != nullptr) {
|
||||
|
@ -6869,6 +7197,28 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||
return id;
|
||||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
// add per-primitive, per-view. per-task decorations to a struct member (member >= 0) or an object
|
||||
void TGlslangToSpvTraverser::addMeshNVDecoration(spv::Id id, int member, const glslang::TQualifier& qualifier)
|
||||
{
|
||||
if (member >= 0) {
|
||||
if (qualifier.perPrimitiveNV)
|
||||
builder.addMemberDecoration(id, (unsigned)member, spv::DecorationPerPrimitiveNV);
|
||||
if (qualifier.perViewNV)
|
||||
builder.addMemberDecoration(id, (unsigned)member, spv::DecorationPerViewNV);
|
||||
if (qualifier.perTaskNV)
|
||||
builder.addMemberDecoration(id, (unsigned)member, spv::DecorationPerTaskNV);
|
||||
} else {
|
||||
if (qualifier.perPrimitiveNV)
|
||||
builder.addDecoration(id, spv::DecorationPerPrimitiveNV);
|
||||
if (qualifier.perViewNV)
|
||||
builder.addDecoration(id, spv::DecorationPerViewNV);
|
||||
if (qualifier.perTaskNV)
|
||||
builder.addDecoration(id, spv::DecorationPerTaskNV);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Make a full tree of instructions to build a SPIR-V specialization constant,
|
||||
// or regular constant if possible.
|
||||
//
|
||||
|
|
|
@ -503,6 +503,21 @@ Id Builder::makeSampledImageType(Id imageType)
|
|||
return type->getResultId();
|
||||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
Id Builder::makeAccelerationStructureNVType()
|
||||
{
|
||||
Instruction *type;
|
||||
if (groupedTypes[OpTypeAccelerationStructureNVX].size() == 0) {
|
||||
type = new Instruction(getUniqueId(), NoType, OpTypeAccelerationStructureNVX);
|
||||
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||
module.mapInstruction(type);
|
||||
} else {
|
||||
type = groupedTypes[OpTypeAccelerationStructureNVX].back();
|
||||
}
|
||||
|
||||
return type->getResultId();
|
||||
}
|
||||
#endif
|
||||
Id Builder::getDerefTypeId(Id resultId) const
|
||||
{
|
||||
Id typeId = getTypeId(resultId);
|
||||
|
@ -1377,7 +1392,7 @@ void Builder::createNoResultOp(Op opCode, Id operand)
|
|||
buildPoint->addInstruction(std::unique_ptr<Instruction>(op));
|
||||
}
|
||||
|
||||
// An opcode that has multiple operands, no result id, and no type
|
||||
// An opcode that has one or more operands, no result id, and no type
|
||||
void Builder::createNoResultOp(Op opCode, const std::vector<Id>& operands)
|
||||
{
|
||||
Instruction* op = new Instruction(opCode);
|
||||
|
@ -1654,6 +1669,13 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
|
|||
if (parameters.component != NoResult)
|
||||
texArgs[numArgs++] = parameters.component;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (parameters.granularity != NoResult)
|
||||
texArgs[numArgs++] = parameters.granularity;
|
||||
if (parameters.coarse != NoResult)
|
||||
texArgs[numArgs++] = parameters.coarse;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Set up the optional arguments
|
||||
//
|
||||
|
@ -1725,6 +1747,10 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
|
|||
opCode = OpImageSparseFetch;
|
||||
else
|
||||
opCode = OpImageFetch;
|
||||
#ifdef NV_EXTENSIONS
|
||||
} else if (parameters.granularity && parameters.coarse) {
|
||||
opCode = OpImageSampleFootprintNV;
|
||||
#endif
|
||||
} else if (gather) {
|
||||
if (parameters.Dref)
|
||||
if (sparse)
|
||||
|
|
|
@ -131,6 +131,11 @@ public:
|
|||
Id makeSamplerType();
|
||||
Id makeSampledImageType(Id imageType);
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
// accelerationStructureNV type
|
||||
Id makeAccelerationStructureNVType();
|
||||
#endif
|
||||
|
||||
// For querying about types.
|
||||
Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
|
||||
Id getDerefTypeId(Id resultId) const;
|
||||
|
@ -366,6 +371,10 @@ public:
|
|||
Id component;
|
||||
Id texelOut;
|
||||
Id lodClamp;
|
||||
#ifdef NV_EXTENSIONS
|
||||
Id granularity;
|
||||
Id coarse;
|
||||
#endif
|
||||
bool nonprivate;
|
||||
bool volatil;
|
||||
};
|
||||
|
|
|
@ -510,7 +510,9 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
|
|||
}else if (strcmp(spv::E_SPV_NV_sample_mask_override_coverage, name) == 0 ||
|
||||
strcmp(spv::E_SPV_NV_geometry_shader_passthrough, name) == 0 ||
|
||||
strcmp(spv::E_SPV_NV_viewport_array2, name) == 0 ||
|
||||
strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0) {
|
||||
strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0 ||
|
||||
strcmp(spv::E_SPV_NV_fragment_shader_barycentric, name) == 0 ||
|
||||
strcmp(spv::E_SPV_NV_mesh_shader, name) == 0) {
|
||||
extInstSet = GLSLextNVInst;
|
||||
#endif
|
||||
}
|
||||
|
@ -691,21 +693,45 @@ static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint)
|
|||
strcmp(name, spv::E_SPV_NV_geometry_shader_passthrough) == 0 ||
|
||||
strcmp(name, spv::E_ARB_shader_viewport_layer_array) == 0 ||
|
||||
strcmp(name, spv::E_SPV_NV_viewport_array2) == 0 ||
|
||||
strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0) {
|
||||
strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0 ||
|
||||
strcmp(spv::E_SPV_NV_fragment_shader_barycentric, name) == 0 ||
|
||||
strcmp(name, spv::E_SPV_NV_mesh_shader) == 0) {
|
||||
switch (entrypoint) {
|
||||
case DecorationOverrideCoverageNV: return "OverrideCoverageNV";
|
||||
case DecorationPassthroughNV: return "PassthroughNV";
|
||||
case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV";
|
||||
case DecorationViewportRelativeNV: return "ViewportRelativeNV";
|
||||
// NV builtins
|
||||
case BuiltInViewportMaskNV: return "ViewportMaskNV";
|
||||
case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV";
|
||||
case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV";
|
||||
case BuiltInSecondaryPositionNV: return "SecondaryPositionNV";
|
||||
case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV";
|
||||
case CapabilityShaderStereoViewNV: return "ShaderStereoViewNV";
|
||||
case BuiltInPositionPerViewNV: return "PositionPerViewNV";
|
||||
case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV";
|
||||
case BuiltInBaryCoordNV: return "BaryCoordNV";
|
||||
case BuiltInBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
|
||||
case BuiltInTaskCountNV: return "TaskCountNV";
|
||||
case BuiltInPrimitiveCountNV: return "PrimitiveCountNV";
|
||||
case BuiltInPrimitiveIndicesNV: return "PrimitiveIndicesNV";
|
||||
case BuiltInClipDistancePerViewNV: return "ClipDistancePerViewNV";
|
||||
case BuiltInCullDistancePerViewNV: return "CullDistancePerViewNV";
|
||||
case BuiltInLayerPerViewNV: return "LayerPerViewNV";
|
||||
case BuiltInMeshViewCountNV: return "MeshViewCountNV";
|
||||
case BuiltInMeshViewIndicesNV: return "MeshViewIndicesNV";
|
||||
|
||||
// NV Capabilities
|
||||
case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV";
|
||||
case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV";
|
||||
case CapabilityShaderStereoViewNV: return "ShaderStereoViewNV";
|
||||
case CapabilityPerViewAttributesNV: return "PerViewAttributesNV";
|
||||
case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
|
||||
case CapabilityMeshShadingNV: return "MeshShadingNV";
|
||||
|
||||
// NV Decorations
|
||||
case DecorationOverrideCoverageNV: return "OverrideCoverageNV";
|
||||
case DecorationPassthroughNV: return "PassthroughNV";
|
||||
case DecorationViewportRelativeNV: return "ViewportRelativeNV";
|
||||
case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV";
|
||||
case DecorationPerVertexNV: return "PerVertexNV";
|
||||
case DecorationPerPrimitiveNV: return "PerPrimitiveNV";
|
||||
case DecorationPerViewNV: return "PerViewNV";
|
||||
case DecorationPerTaskNV: return "PerTaskNV";
|
||||
|
||||
default: return "Bad";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,8 +98,22 @@ const char* ExecutionModelString(int model)
|
|||
case 4: return "Fragment";
|
||||
case 5: return "GLCompute";
|
||||
case 6: return "Kernel";
|
||||
#ifdef NV_EXTENSIONS
|
||||
case ExecutionModelTaskNV: return "TaskNV";
|
||||
case ExecutionModelMeshNV: return "MeshNV";
|
||||
#endif
|
||||
|
||||
default: return "Bad";
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case ExecutionModelRayGenerationNVX: return "RayGenerationNVX";
|
||||
case ExecutionModelIntersectionNVX: return "IntersectionNVX";
|
||||
case ExecutionModelAnyHitNVX: return "AnyHitNVX";
|
||||
case ExecutionModelClosestHitNVX: return "ClosestHitNVX";
|
||||
case ExecutionModelMissNVX: return "MissNVX";
|
||||
case ExecutionModelCallableNVX: return "CallableNVX";
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,6 +180,15 @@ const char* ExecutionModeString(int mode)
|
|||
case 32: return "Bad";
|
||||
|
||||
case 4446: return "PostDepthCoverage";
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case ExecutionModeOutputLinesNV: return "OutputLinesNV";
|
||||
case ExecutionModeOutputPrimitivesNV: return "OutputPrimitivesNV";
|
||||
case ExecutionModeOutputTrianglesNV: return "OutputTrianglesNV";
|
||||
case ExecutionModeDerivativeGroupQuadsNV: return "DerivativeGroupQuadsNV";
|
||||
case ExecutionModeDerivativeGroupLinearNV: return "DerivativeGroupLinearNV";
|
||||
#endif
|
||||
|
||||
case ExecutionModeCeiling:
|
||||
default: return "Bad";
|
||||
}
|
||||
|
@ -188,6 +211,13 @@ const char* StorageClassString(int StorageClass)
|
|||
case 11: return "Image";
|
||||
case 12: return "StorageBuffer";
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case StorageClassRayPayloadNVX: return "RayPayloadNVX";
|
||||
case StorageClassHitAttributeNVX: return "HitAttributeNVX";
|
||||
case StorageClassIncomingRayPayloadNVX: return "IncomingRayPayloadNVX";
|
||||
case StorageClassShaderRecordBufferNVX: return "ShaderRecordBufferNVX";
|
||||
#endif
|
||||
|
||||
default: return "Bad";
|
||||
}
|
||||
}
|
||||
|
@ -254,6 +284,10 @@ const char* DecorationString(int decoration)
|
|||
case DecorationPassthroughNV: return "PassthroughNV";
|
||||
case DecorationViewportRelativeNV: return "ViewportRelativeNV";
|
||||
case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV";
|
||||
case DecorationPerPrimitiveNV: return "PerPrimitiveNV";
|
||||
case DecorationPerViewNV: return "PerViewNV";
|
||||
case DecorationPerTaskNV: return "PerTaskNV";
|
||||
case DecorationPerVertexNV: return "PerVertexNV";
|
||||
#endif
|
||||
|
||||
case DecorationNonUniformEXT: return "DecorationNonUniformEXT";
|
||||
|
@ -333,15 +367,44 @@ const char* BuiltInString(int builtIn)
|
|||
#endif
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case 5253: return "ViewportMaskNV";
|
||||
case 5257: return "SecondaryPositionNV";
|
||||
case 5258: return "SecondaryViewportMaskNV";
|
||||
case 5261: return "PositionPerViewNV";
|
||||
case 5262: return "ViewportMaskPerViewNV";
|
||||
case BuiltInLaunchIdNVX: return "LaunchIdNVX";
|
||||
case BuiltInLaunchSizeNVX: return "LaunchSizeNVX";
|
||||
case BuiltInWorldRayOriginNVX: return "WorldRayOriginNVX";
|
||||
case BuiltInWorldRayDirectionNVX: return "WorldRayDirectionNVX";
|
||||
case BuiltInObjectRayOriginNVX: return "ObjectRayOriginNVX";
|
||||
case BuiltInObjectRayDirectionNVX: return "ObjectRayDirectionNVX";
|
||||
case BuiltInRayTminNVX: return "RayTminNVX";
|
||||
case BuiltInRayTmaxNVX: return "RayTmaxNVX";
|
||||
case BuiltInInstanceCustomIndexNVX: return "InstanceCustomIndexNVX";
|
||||
case BuiltInObjectToWorldNVX: return "ObjectToWorldNVX";
|
||||
case BuiltInWorldToObjectNVX: return "WorldToObjectNVX";
|
||||
case BuiltInHitTNVX: return "HitTNVX";
|
||||
case BuiltInHitKindNVX: return "HitKindNVX";
|
||||
case BuiltInViewportMaskNV: return "ViewportMaskNV";
|
||||
case BuiltInSecondaryPositionNV: return "SecondaryPositionNV";
|
||||
case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV";
|
||||
case BuiltInPositionPerViewNV: return "PositionPerViewNV";
|
||||
case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV";
|
||||
case BuiltInFragmentSizeNV: return "FragmentSizeNV";
|
||||
case BuiltInInvocationsPerPixelNV: return "InvocationsPerPixelNV";
|
||||
case BuiltInBaryCoordNV: return "BaryCoordNV";
|
||||
case BuiltInBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
|
||||
#endif
|
||||
|
||||
case 5264: return "FullyCoveredEXT";
|
||||
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case BuiltInTaskCountNV: return "TaskCountNV";
|
||||
case BuiltInPrimitiveCountNV: return "PrimitiveCountNV";
|
||||
case BuiltInPrimitiveIndicesNV: return "PrimitiveIndicesNV";
|
||||
case BuiltInClipDistancePerViewNV: return "ClipDistancePerViewNV";
|
||||
case BuiltInCullDistancePerViewNV: return "CullDistancePerViewNV";
|
||||
case BuiltInLayerPerViewNV: return "LayerPerViewNV";
|
||||
case BuiltInMeshViewCountNV: return "MeshViewCountNV";
|
||||
case BuiltInMeshViewIndicesNV: return "MeshViewIndicesNV";
|
||||
#endif
|
||||
|
||||
default: return "Bad";
|
||||
}
|
||||
}
|
||||
|
@ -820,12 +883,18 @@ const char* CapabilityString(int info)
|
|||
|
||||
case CapabilitySampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage";
|
||||
#ifdef NV_EXTENSIONS
|
||||
case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV";
|
||||
case CapabilityShaderViewportIndexLayerNV: return "ShaderViewportIndexLayerNV";
|
||||
case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV";
|
||||
case CapabilityShaderStereoViewNV: return "ShaderStereoViewNV";
|
||||
case CapabilityPerViewAttributesNV: return "PerViewAttributesNV";
|
||||
case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV";
|
||||
case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV";
|
||||
case CapabilityShaderViewportIndexLayerNV: return "ShaderViewportIndexLayerNV";
|
||||
case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV";
|
||||
case CapabilityShaderStereoViewNV: return "ShaderStereoViewNV";
|
||||
case CapabilityPerViewAttributesNV: return "PerViewAttributesNV";
|
||||
case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV";
|
||||
case CapabilityRaytracingNVX: return "RaytracingNVX";
|
||||
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
|
||||
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
|
||||
case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
|
||||
case CapabilityMeshShadingNV: return "MeshShadingNV";
|
||||
case CapabilityShadingRateNV: return "ShadingRateNV";
|
||||
#endif
|
||||
|
||||
case CapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT";
|
||||
|
@ -1238,8 +1307,16 @@ const char* OpcodeString(int op)
|
|||
case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE";
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV";
|
||||
case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV";
|
||||
case OpReportIntersectionNVX: return "OpReportIntersectionNVX";
|
||||
case OpIgnoreIntersectionNVX: return "OpIgnoreIntersectionNVX";
|
||||
case OpTerminateRayNVX: return "OpTerminateRayNVX";
|
||||
case OpTraceNVX: return "OpTraceNVX";
|
||||
case OpTypeAccelerationStructureNVX: return "OpTypeAccelerationStructureNVX";
|
||||
case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV";
|
||||
case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
|
||||
#endif
|
||||
|
||||
default:
|
||||
return "Bad";
|
||||
}
|
||||
|
@ -2584,6 +2661,38 @@ void Parameterize()
|
|||
|
||||
#ifdef NV_EXTENSIONS
|
||||
InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X");
|
||||
|
||||
InstructionDesc[OpTypeAccelerationStructureNVX].setResultAndType(true, false);
|
||||
|
||||
InstructionDesc[OpTraceNVX].operands.push(OperandId, "'NV Acceleration Structure'");
|
||||
InstructionDesc[OpTraceNVX].operands.push(OperandId, "'Ray Flags'");
|
||||
InstructionDesc[OpTraceNVX].operands.push(OperandId, "'Cull Mask'");
|
||||
InstructionDesc[OpTraceNVX].operands.push(OperandId, "'SBT Record Offset'");
|
||||
InstructionDesc[OpTraceNVX].operands.push(OperandId, "'SBT Record Stride'");
|
||||
InstructionDesc[OpTraceNVX].operands.push(OperandId, "'Miss Index'");
|
||||
InstructionDesc[OpTraceNVX].operands.push(OperandId, "'Ray Origin'");
|
||||
InstructionDesc[OpTraceNVX].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpTraceNVX].operands.push(OperandId, "'Ray Direction'");
|
||||
InstructionDesc[OpTraceNVX].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpTraceNVX].operands.push(OperandId, "'Payload'");
|
||||
InstructionDesc[OpTraceNVX].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpReportIntersectionNVX].operands.push(OperandId, "'Hit Parameter'");
|
||||
InstructionDesc[OpReportIntersectionNVX].operands.push(OperandId, "'Hit Kind'");
|
||||
|
||||
InstructionDesc[OpIgnoreIntersectionNVX].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpTerminateRayNVX].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'");
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'");
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coarse'");
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandImageOperands, "", true);
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandVariableIds, "", true);
|
||||
|
||||
InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Index Offset'");
|
||||
InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Packed Indices'");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -73,6 +73,14 @@ enum ExecutionModel {
|
|||
ExecutionModelFragment = 4,
|
||||
ExecutionModelGLCompute = 5,
|
||||
ExecutionModelKernel = 6,
|
||||
ExecutionModelTaskNV = 5267,
|
||||
ExecutionModelMeshNV = 5268,
|
||||
ExecutionModelRayGenerationNVX = 5313,
|
||||
ExecutionModelIntersectionNVX = 5314,
|
||||
ExecutionModelAnyHitNVX = 5315,
|
||||
ExecutionModelClosestHitNVX = 5316,
|
||||
ExecutionModelMissNVX = 5317,
|
||||
ExecutionModelCallableNVX = 5318,
|
||||
ExecutionModelMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -132,6 +140,11 @@ enum ExecutionMode {
|
|||
ExecutionModeLocalSizeHintId = 39,
|
||||
ExecutionModePostDepthCoverage = 4446,
|
||||
ExecutionModeStencilRefReplacingEXT = 5027,
|
||||
ExecutionModeOutputLinesNV = 5269,
|
||||
ExecutionModeOutputPrimitivesNV = 5270,
|
||||
ExecutionModeDerivativeGroupQuadsNV = 5289,
|
||||
ExecutionModeDerivativeGroupLinearNV = 5290,
|
||||
ExecutionModeOutputTrianglesNV = 5298,
|
||||
ExecutionModeMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -149,6 +162,10 @@ enum StorageClass {
|
|||
StorageClassAtomicCounter = 10,
|
||||
StorageClassImage = 11,
|
||||
StorageClassStorageBuffer = 12,
|
||||
StorageClassRayPayloadNVX = 5338,
|
||||
StorageClassHitAttributeNVX = 5339,
|
||||
StorageClassIncomingRayPayloadNVX = 5342,
|
||||
StorageClassShaderRecordBufferNVX = 5343,
|
||||
StorageClassMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -402,6 +419,10 @@ enum Decoration {
|
|||
DecorationPassthroughNV = 5250,
|
||||
DecorationViewportRelativeNV = 5252,
|
||||
DecorationSecondaryViewportRelativeNV = 5256,
|
||||
DecorationPerPrimitiveNV = 5271,
|
||||
DecorationPerViewNV = 5272,
|
||||
DecorationPerTaskNV = 5273,
|
||||
DecorationPerVertexNV = 5285,
|
||||
DecorationNonUniformEXT = 5300,
|
||||
DecorationHlslCounterBufferGOOGLE = 5634,
|
||||
DecorationHlslSemanticGOOGLE = 5635,
|
||||
|
@ -479,6 +500,31 @@ enum BuiltIn {
|
|||
BuiltInPositionPerViewNV = 5261,
|
||||
BuiltInViewportMaskPerViewNV = 5262,
|
||||
BuiltInFullyCoveredEXT = 5264,
|
||||
BuiltInTaskCountNV = 5274,
|
||||
BuiltInPrimitiveCountNV = 5275,
|
||||
BuiltInPrimitiveIndicesNV = 5276,
|
||||
BuiltInClipDistancePerViewNV = 5277,
|
||||
BuiltInCullDistancePerViewNV = 5278,
|
||||
BuiltInLayerPerViewNV = 5279,
|
||||
BuiltInMeshViewCountNV = 5280,
|
||||
BuiltInMeshViewIndicesNV = 5281,
|
||||
BuiltInBaryCoordNV = 5286,
|
||||
BuiltInBaryCoordNoPerspNV = 5287,
|
||||
BuiltInFragmentSizeNV = 5292,
|
||||
BuiltInInvocationsPerPixelNV = 5293,
|
||||
BuiltInLaunchIdNVX = 5319,
|
||||
BuiltInLaunchSizeNVX = 5320,
|
||||
BuiltInWorldRayOriginNVX = 5321,
|
||||
BuiltInWorldRayDirectionNVX = 5322,
|
||||
BuiltInObjectRayOriginNVX = 5323,
|
||||
BuiltInObjectRayDirectionNVX = 5324,
|
||||
BuiltInRayTminNVX = 5325,
|
||||
BuiltInRayTmaxNVX = 5326,
|
||||
BuiltInInstanceCustomIndexNVX = 5327,
|
||||
BuiltInObjectToWorldNVX = 5330,
|
||||
BuiltInWorldToObjectNVX = 5331,
|
||||
BuiltInHitTNVX = 5332,
|
||||
BuiltInHitKindNVX = 5333,
|
||||
BuiltInMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -717,6 +763,11 @@ enum Capability {
|
|||
CapabilityShaderStereoViewNV = 5259,
|
||||
CapabilityPerViewAttributesNV = 5260,
|
||||
CapabilityFragmentFullyCoveredEXT = 5265,
|
||||
CapabilityMeshShadingNV = 5266,
|
||||
CapabilityImageFootprintNV = 5282,
|
||||
CapabilityFragmentBarycentricNV = 5284,
|
||||
CapabilityComputeDerivativeGroupQuadsNV = 5288,
|
||||
CapabilityShadingRateNV = 5291,
|
||||
CapabilityGroupNonUniformPartitionedNV = 5297,
|
||||
CapabilityShaderNonUniformEXT = 5301,
|
||||
CapabilityRuntimeDescriptorArrayEXT = 5302,
|
||||
|
@ -730,8 +781,10 @@ enum Capability {
|
|||
CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310,
|
||||
CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
|
||||
CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
|
||||
CapabilityRaytracingNVX = 5340,
|
||||
CapabilityVulkanMemoryModelKHR = 5345,
|
||||
CapabilityVulkanMemoryModelDeviceScopeKHR = 5346,
|
||||
CapabilityComputeDerivativeGroupLinearNV = 5350,
|
||||
CapabilitySubgroupShuffleINTEL = 5568,
|
||||
CapabilitySubgroupBufferBlockIOINTEL = 5569,
|
||||
CapabilitySubgroupImageBlockIOINTEL = 5570,
|
||||
|
@ -1095,7 +1148,14 @@ enum Op {
|
|||
OpGroupSMaxNonUniformAMD = 5007,
|
||||
OpFragmentMaskFetchAMD = 5011,
|
||||
OpFragmentFetchAMD = 5012,
|
||||
OpImageSampleFootprintNV = 5283,
|
||||
OpGroupNonUniformPartitionNV = 5296,
|
||||
OpWritePackedPrimitiveIndices4x8NV = 5299,
|
||||
OpReportIntersectionNVX = 5334,
|
||||
OpIgnoreIntersectionNVX = 5335,
|
||||
OpTerminateRayNVX = 5336,
|
||||
OpTraceNVX = 5337,
|
||||
OpTypeAccelerationStructureNVX = 5341,
|
||||
OpSubgroupShuffleINTEL = 5571,
|
||||
OpSubgroupShuffleDownINTEL = 5572,
|
||||
OpSubgroupShuffleUpINTEL = 5573,
|
||||
|
|
|
@ -125,6 +125,18 @@ const TBuiltInResource DefaultTBuiltInResource = {
|
|||
/* .MaxCullDistances = */ 8,
|
||||
/* .MaxCombinedClipAndCullDistances = */ 8,
|
||||
/* .MaxSamples = */ 4,
|
||||
#ifdef NV_EXTENSIONS
|
||||
/* .maxMeshOutputVerticesNV = */ 256,
|
||||
/* .maxMeshOutputPrimitivesNV = */ 512,
|
||||
/* .maxMeshWorkGroupSizeX_NV = */ 32,
|
||||
/* .maxMeshWorkGroupSizeY_NV = */ 1,
|
||||
/* .maxMeshWorkGroupSizeZ_NV = */ 1,
|
||||
/* .maxTaskWorkGroupSizeX_NV = */ 32,
|
||||
/* .maxTaskWorkGroupSizeY_NV = */ 1,
|
||||
/* .maxTaskWorkGroupSizeZ_NV = */ 1,
|
||||
/* .maxMeshViewCountNV = */ 4,
|
||||
#endif
|
||||
|
||||
/* .limits = */ {
|
||||
/* .nonInductiveForLoops = */ 1,
|
||||
/* .whileLoops = */ 1,
|
||||
|
@ -224,7 +236,17 @@ std::string GetDefaultTBuiltInResourceString()
|
|||
<< "MaxCullDistances " << DefaultTBuiltInResource.maxCullDistances << "\n"
|
||||
<< "MaxCombinedClipAndCullDistances " << DefaultTBuiltInResource.maxCombinedClipAndCullDistances << "\n"
|
||||
<< "MaxSamples " << DefaultTBuiltInResource.maxSamples << "\n"
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
<< "MaxMeshOutputVerticesNV " << DefaultTBuiltInResource.maxMeshOutputVerticesNV << "\n"
|
||||
<< "MaxMeshOutputPrimitivesNV " << DefaultTBuiltInResource.maxMeshOutputPrimitivesNV << "\n"
|
||||
<< "MaxMeshWorkGroupSizeX_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeX_NV << "\n"
|
||||
<< "MaxMeshWorkGroupSizeY_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeY_NV << "\n"
|
||||
<< "MaxMeshWorkGroupSizeZ_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeZ_NV << "\n"
|
||||
<< "MaxTaskWorkGroupSizeX_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeX_NV << "\n"
|
||||
<< "MaxTaskWorkGroupSizeY_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_NV << "\n"
|
||||
<< "MaxTaskWorkGroupSizeZ_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_NV << "\n"
|
||||
<< "MaxMeshViewCountNV " << DefaultTBuiltInResource.maxMeshViewCountNV << "\n"
|
||||
#endif
|
||||
<< "nonInductiveForLoops " << DefaultTBuiltInResource.limits.nonInductiveForLoops << "\n"
|
||||
<< "whileLoops " << DefaultTBuiltInResource.limits.whileLoops << "\n"
|
||||
<< "doWhileLoops " << DefaultTBuiltInResource.limits.doWhileLoops << "\n"
|
||||
|
@ -431,6 +453,26 @@ void DecodeResourceLimits(TBuiltInResource* resources, char* config)
|
|||
resources->maxCombinedClipAndCullDistances = value;
|
||||
else if (tokenStr == "MaxSamples")
|
||||
resources->maxSamples = value;
|
||||
#ifdef NV_EXTENSIONS
|
||||
else if (tokenStr == "MaxMeshOutputVerticesNV")
|
||||
resources->maxMeshOutputVerticesNV = value;
|
||||
else if (tokenStr == "MaxMeshOutputPrimitivesNV")
|
||||
resources->maxMeshOutputPrimitivesNV = value;
|
||||
else if (tokenStr == "MaxMeshWorkGroupSizeX_NV")
|
||||
resources->maxMeshWorkGroupSizeX_NV = value;
|
||||
else if (tokenStr == "MaxMeshWorkGroupSizeY_NV")
|
||||
resources->maxMeshWorkGroupSizeY_NV = value;
|
||||
else if (tokenStr == "MaxMeshWorkGroupSizeZ_NV")
|
||||
resources->maxMeshWorkGroupSizeZ_NV = value;
|
||||
else if (tokenStr == "MaxTaskWorkGroupSizeX_NV")
|
||||
resources->maxTaskWorkGroupSizeX_NV = value;
|
||||
else if (tokenStr == "MaxTaskWorkGroupSizeY_NV")
|
||||
resources->maxTaskWorkGroupSizeY_NV = value;
|
||||
else if (tokenStr == "MaxTaskWorkGroupSizeZ_NV")
|
||||
resources->maxTaskWorkGroupSizeZ_NV = value;
|
||||
else if (tokenStr == "MaxMeshViewCountNV")
|
||||
resources->maxMeshViewCountNV = value;
|
||||
#endif
|
||||
else if (tokenStr == "nonInductiveForLoops")
|
||||
resources->limits.nonInductiveForLoops = (value != 0);
|
||||
else if (tokenStr == "whileLoops")
|
||||
|
|
|
@ -244,6 +244,16 @@ const char* GetBinaryName(EShLanguage stage)
|
|||
case EShLangGeometry: name = "geom.spv"; break;
|
||||
case EShLangFragment: name = "frag.spv"; break;
|
||||
case EShLangCompute: name = "comp.spv"; break;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EShLangRayGenNV: name = "rgen.spv"; break;
|
||||
case EShLangIntersectNV: name = "rint.spv"; break;
|
||||
case EShLangAnyHitNV: name = "rahit.spv"; break;
|
||||
case EShLangClosestHitNV: name = "rchit.spv"; break;
|
||||
case EShLangMissNV: name = "rmiss.spv"; break;
|
||||
case EShLangCallableNV: name = "rcall.spv"; break;
|
||||
case EShLangMeshNV: name = "mesh.spv"; break;
|
||||
case EShLangTaskNV: name = "task.spv"; break;
|
||||
#endif
|
||||
default: name = "unknown"; break;
|
||||
}
|
||||
} else
|
||||
|
@ -1206,7 +1216,12 @@ int C_DECL main(int argc, char* argv[])
|
|||
// .geom = geometry
|
||||
// .frag = fragment
|
||||
// .comp = compute
|
||||
//
|
||||
// .rgen = ray generation
|
||||
// .rint = ray intersection
|
||||
// .rahit = ray any hit
|
||||
// .rchit = ray closest hit
|
||||
// .rmiss = ray miss
|
||||
// .rcall = ray callable
|
||||
// Additionally, the file names may end in .<stage>.glsl and .<stage>.hlsl
|
||||
// where <stage> is one of the stages listed above.
|
||||
//
|
||||
|
@ -1250,6 +1265,24 @@ EShLanguage FindLanguage(const std::string& name, bool parseStageName)
|
|||
return EShLangFragment;
|
||||
else if (stageName == "comp")
|
||||
return EShLangCompute;
|
||||
#ifdef NV_EXTENSIONS
|
||||
else if (stageName == "rgen")
|
||||
return EShLangRayGenNV;
|
||||
else if (stageName == "rint")
|
||||
return EShLangIntersectNV;
|
||||
else if (stageName == "rahit")
|
||||
return EShLangAnyHitNV;
|
||||
else if (stageName == "rchit")
|
||||
return EShLangClosestHitNV;
|
||||
else if (stageName == "rmiss")
|
||||
return EShLangMissNV;
|
||||
else if (stageName == "rcall")
|
||||
return EShLangCallableNV;
|
||||
else if (stageName == "mesh")
|
||||
return EShLangMeshNV;
|
||||
else if (stageName == "task")
|
||||
return EShLangTaskNV;
|
||||
#endif
|
||||
|
||||
usage();
|
||||
return EShLangVertex;
|
||||
|
@ -1319,6 +1352,16 @@ void usage()
|
|||
" .geom for a geometry shader\n"
|
||||
" .frag for a fragment shader\n"
|
||||
" .comp for a compute shader\n"
|
||||
#ifdef NV_EXTENSIONS
|
||||
" .mesh for a mesh shader\n"
|
||||
" .task for a task shader\n"
|
||||
" .rgen for a ray generation shader\n"
|
||||
" .rint for a ray intersection shader\n"
|
||||
" .rahit for a ray any hit shader\n"
|
||||
" .rchit for a ray closest hit shader\n"
|
||||
" .rmiss for a ray miss shader\n"
|
||||
" .rcall for a ray callable shader"
|
||||
#endif
|
||||
" .glsl for .vert.glsl, .tesc.glsl, ..., .comp.glsl compound suffixes\n"
|
||||
" .hlsl for .vert.hlsl, .tesc.hlsl, ..., .comp.hlsl compound suffixes\n"
|
||||
"\n"
|
||||
|
|
|
@ -398,6 +398,10 @@ gl_FragCoord origin is upper left
|
|||
0:? 'ci' ( const int)
|
||||
0:? 0 (const int)
|
||||
|
||||
error: SPIRV-Tools Validation Errors
|
||||
error: If OpTypeBool is stored in conjunction with OpVariable, it can only be used with non-externally visible shader Storage Classes: Workgroup, CrossWorkgroup, Private, and Function
|
||||
%_entryPointOutput_c = OpVariable %_ptr_Output_bool Output
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 104
|
||||
|
|
|
@ -211,6 +211,10 @@ gl_FragCoord origin is upper left
|
|||
0:? 's.ff3' (layout( location=6) flat in bool)
|
||||
0:? 's.ff4' (layout( location=7) in 4-component vector of float)
|
||||
|
||||
error: SPIRV-Tools Validation Errors
|
||||
error: If OpTypeBool is stored in conjunction with OpVariable, it can only be used with non-externally visible shader Storage Classes: Workgroup, CrossWorkgroup, Private, and Function
|
||||
%s_b = OpVariable %_ptr_Input_bool Input
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 102
|
||||
|
|
|
@ -0,0 +1,163 @@
|
|||
spv.AnyHitShader.rahit
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 81
|
||||
|
||||
Capability RaytracingNVX
|
||||
Extension "SPV_NVX_raytracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint AnyHitNVX 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NVX_raytracing"
|
||||
Name 4 "main"
|
||||
Name 9 "v0"
|
||||
Name 11 "gl_LaunchIDNVX"
|
||||
Name 13 "v1"
|
||||
Name 14 "gl_LaunchSizeNVX"
|
||||
Name 18 "v2"
|
||||
Name 20 "gl_PrimitiveID"
|
||||
Name 22 "v3"
|
||||
Name 23 "gl_InstanceID"
|
||||
Name 25 "v4"
|
||||
Name 26 "gl_InstanceCustomIndexNVX"
|
||||
Name 31 "v5"
|
||||
Name 33 "gl_WorldRayOriginNVX"
|
||||
Name 35 "v6"
|
||||
Name 36 "gl_WorldRayDirectionNVX"
|
||||
Name 38 "v7"
|
||||
Name 39 "gl_ObjectRayOriginNVX"
|
||||
Name 41 "v8"
|
||||
Name 42 "gl_ObjectRayDirectionNVX"
|
||||
Name 45 "v9"
|
||||
Name 47 "gl_RayTminNVX"
|
||||
Name 49 "v10"
|
||||
Name 50 "gl_RayTmaxNVX"
|
||||
Name 52 "v11"
|
||||
Name 53 "gl_HitTNVX"
|
||||
Name 56 "v12"
|
||||
Name 58 "gl_HitKindNVX"
|
||||
Name 62 "v13"
|
||||
Name 64 "gl_ObjectToWorldNVX"
|
||||
Name 66 "v14"
|
||||
Name 67 "gl_WorldToObjectNVX"
|
||||
Name 71 "incomingPayload"
|
||||
Decorate 11(gl_LaunchIDNVX) BuiltIn LaunchIdNVX
|
||||
Decorate 14(gl_LaunchSizeNVX) BuiltIn LaunchSizeNVX
|
||||
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||
Decorate 23(gl_InstanceID) BuiltIn InstanceId
|
||||
Decorate 26(gl_InstanceCustomIndexNVX) BuiltIn InstanceCustomIndexNVX
|
||||
Decorate 33(gl_WorldRayOriginNVX) BuiltIn WorldRayOriginNVX
|
||||
Decorate 36(gl_WorldRayDirectionNVX) BuiltIn WorldRayDirectionNVX
|
||||
Decorate 39(gl_ObjectRayOriginNVX) BuiltIn ObjectRayOriginNVX
|
||||
Decorate 42(gl_ObjectRayDirectionNVX) BuiltIn ObjectRayDirectionNVX
|
||||
Decorate 47(gl_RayTminNVX) BuiltIn RayTminNVX
|
||||
Decorate 50(gl_RayTmaxNVX) BuiltIn RayTmaxNVX
|
||||
Decorate 53(gl_HitTNVX) BuiltIn HitTNVX
|
||||
Decorate 58(gl_HitKindNVX) BuiltIn HitKindNVX
|
||||
Decorate 64(gl_ObjectToWorldNVX) BuiltIn ObjectToWorldNVX
|
||||
Decorate 67(gl_WorldToObjectNVX) BuiltIn WorldToObjectNVX
|
||||
Decorate 71(incomingPayload) Location 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 2
|
||||
8: TypePointer Function 7(ivec2)
|
||||
10: TypePointer Input 7(ivec2)
|
||||
11(gl_LaunchIDNVX): 10(ptr) Variable Input
|
||||
14(gl_LaunchSizeNVX): 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_InstanceCustomIndexNVX): 19(ptr) Variable Input
|
||||
28: TypeFloat 32
|
||||
29: TypeVector 28(float) 3
|
||||
30: TypePointer Function 29(fvec3)
|
||||
32: TypePointer Input 29(fvec3)
|
||||
33(gl_WorldRayOriginNVX): 32(ptr) Variable Input
|
||||
36(gl_WorldRayDirectionNVX): 32(ptr) Variable Input
|
||||
39(gl_ObjectRayOriginNVX): 32(ptr) Variable Input
|
||||
42(gl_ObjectRayDirectionNVX): 32(ptr) Variable Input
|
||||
44: TypePointer Function 28(float)
|
||||
46: TypePointer Input 28(float)
|
||||
47(gl_RayTminNVX): 46(ptr) Variable Input
|
||||
50(gl_RayTmaxNVX): 46(ptr) Variable Input
|
||||
53(gl_HitTNVX): 46(ptr) Variable Input
|
||||
55: TypePointer Function 6(int)
|
||||
57: TypePointer Input 6(int)
|
||||
58(gl_HitKindNVX): 57(ptr) Variable Input
|
||||
60: TypeMatrix 29(fvec3) 4
|
||||
61: TypePointer Function 60
|
||||
63: TypePointer Input 60
|
||||
64(gl_ObjectToWorldNVX): 63(ptr) Variable Input
|
||||
67(gl_WorldToObjectNVX): 63(ptr) Variable Input
|
||||
69: TypeVector 28(float) 4
|
||||
70: TypePointer IncomingRayPayloadNVX 69(fvec4)
|
||||
71(incomingPayload): 70(ptr) Variable IncomingRayPayloadNVX
|
||||
72: 28(float) Constant 1056964608
|
||||
73: 69(fvec4) ConstantComposite 72 72 72 72
|
||||
75: 16(int) Constant 1
|
||||
76: 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
|
||||
12: 7(ivec2) Load 11(gl_LaunchIDNVX)
|
||||
Store 9(v0) 12
|
||||
15: 7(ivec2) Load 14(gl_LaunchSizeNVX)
|
||||
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_InstanceCustomIndexNVX)
|
||||
Store 25(v4) 27
|
||||
34: 29(fvec3) Load 33(gl_WorldRayOriginNVX)
|
||||
Store 31(v5) 34
|
||||
37: 29(fvec3) Load 36(gl_WorldRayDirectionNVX)
|
||||
Store 35(v6) 37
|
||||
40: 29(fvec3) Load 39(gl_ObjectRayOriginNVX)
|
||||
Store 38(v7) 40
|
||||
43: 29(fvec3) Load 42(gl_ObjectRayDirectionNVX)
|
||||
Store 41(v8) 43
|
||||
48: 28(float) Load 47(gl_RayTminNVX)
|
||||
Store 45(v9) 48
|
||||
51: 28(float) Load 50(gl_RayTmaxNVX)
|
||||
Store 49(v10) 51
|
||||
54: 28(float) Load 53(gl_HitTNVX)
|
||||
Store 52(v11) 54
|
||||
59: 6(int) Load 58(gl_HitKindNVX)
|
||||
Store 56(v12) 59
|
||||
65: 60 Load 64(gl_ObjectToWorldNVX)
|
||||
Store 62(v13) 65
|
||||
68: 60 Load 67(gl_WorldToObjectNVX)
|
||||
Store 66(v14) 68
|
||||
Store 71(incomingPayload) 73
|
||||
74: 16(int) Load 18(v2)
|
||||
77: 76(bool) IEqual 74 75
|
||||
SelectionMerge 79 None
|
||||
BranchConditional 77 78 80
|
||||
78: Label
|
||||
IgnoreIntersectionNVX
|
||||
Branch 79
|
||||
80: Label
|
||||
TerminateRayNVX
|
||||
Branch 79
|
||||
79: Label
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,8 @@
|
|||
spv.AnyHitShader_Errors.rahit
|
||||
ERROR: 0:8: 'assign' : l-value required "payload" (cannot modify hitAttributeNVX in this stage)
|
||||
ERROR: 0:9: 'reportIntersectionNVX' : no matching overloaded function found
|
||||
ERROR: 0:10: 'traceNVX' : no matching overloaded function found
|
||||
ERROR: 3 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
|
@ -0,0 +1,169 @@
|
|||
spv.ClosestHitShader.rchit
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 88
|
||||
|
||||
Capability RaytracingNVX
|
||||
Extension "SPV_NVX_raytracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint ClosestHitNVX 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NVX_raytracing"
|
||||
Name 4 "main"
|
||||
Name 9 "v0"
|
||||
Name 11 "gl_LaunchIDNVX"
|
||||
Name 13 "v1"
|
||||
Name 14 "gl_LaunchSizeNVX"
|
||||
Name 18 "v2"
|
||||
Name 20 "gl_PrimitiveID"
|
||||
Name 22 "v3"
|
||||
Name 23 "gl_InstanceID"
|
||||
Name 25 "v4"
|
||||
Name 26 "gl_InstanceCustomIndexNVX"
|
||||
Name 31 "v5"
|
||||
Name 33 "gl_WorldRayOriginNVX"
|
||||
Name 35 "v6"
|
||||
Name 36 "gl_WorldRayDirectionNVX"
|
||||
Name 38 "v7"
|
||||
Name 39 "gl_ObjectRayOriginNVX"
|
||||
Name 41 "v8"
|
||||
Name 42 "gl_ObjectRayDirectionNVX"
|
||||
Name 45 "v9"
|
||||
Name 47 "gl_RayTminNVX"
|
||||
Name 49 "v10"
|
||||
Name 50 "gl_RayTmaxNVX"
|
||||
Name 52 "v11"
|
||||
Name 53 "gl_HitTNVX"
|
||||
Name 56 "v12"
|
||||
Name 58 "gl_HitKindNVX"
|
||||
Name 62 "v13"
|
||||
Name 64 "gl_ObjectToWorldNVX"
|
||||
Name 66 "v14"
|
||||
Name 67 "gl_WorldToObjectNVX"
|
||||
Name 71 "accNV"
|
||||
Name 85 "localPayload"
|
||||
Name 87 "incomingPayload"
|
||||
Decorate 11(gl_LaunchIDNVX) BuiltIn LaunchIdNVX
|
||||
Decorate 14(gl_LaunchSizeNVX) BuiltIn LaunchSizeNVX
|
||||
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||
Decorate 23(gl_InstanceID) BuiltIn InstanceId
|
||||
Decorate 26(gl_InstanceCustomIndexNVX) BuiltIn InstanceCustomIndexNVX
|
||||
Decorate 33(gl_WorldRayOriginNVX) BuiltIn WorldRayOriginNVX
|
||||
Decorate 36(gl_WorldRayDirectionNVX) BuiltIn WorldRayDirectionNVX
|
||||
Decorate 39(gl_ObjectRayOriginNVX) BuiltIn ObjectRayOriginNVX
|
||||
Decorate 42(gl_ObjectRayDirectionNVX) BuiltIn ObjectRayDirectionNVX
|
||||
Decorate 47(gl_RayTminNVX) BuiltIn RayTminNVX
|
||||
Decorate 50(gl_RayTmaxNVX) BuiltIn RayTmaxNVX
|
||||
Decorate 53(gl_HitTNVX) BuiltIn HitTNVX
|
||||
Decorate 58(gl_HitKindNVX) BuiltIn HitKindNVX
|
||||
Decorate 64(gl_ObjectToWorldNVX) BuiltIn ObjectToWorldNVX
|
||||
Decorate 67(gl_WorldToObjectNVX) BuiltIn WorldToObjectNVX
|
||||
Decorate 71(accNV) DescriptorSet 0
|
||||
Decorate 71(accNV) Binding 0
|
||||
Decorate 85(localPayload) Location 0
|
||||
Decorate 87(incomingPayload) Location 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 2
|
||||
8: TypePointer Function 7(ivec2)
|
||||
10: TypePointer Input 7(ivec2)
|
||||
11(gl_LaunchIDNVX): 10(ptr) Variable Input
|
||||
14(gl_LaunchSizeNVX): 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_InstanceCustomIndexNVX): 19(ptr) Variable Input
|
||||
28: TypeFloat 32
|
||||
29: TypeVector 28(float) 3
|
||||
30: TypePointer Function 29(fvec3)
|
||||
32: TypePointer Input 29(fvec3)
|
||||
33(gl_WorldRayOriginNVX): 32(ptr) Variable Input
|
||||
36(gl_WorldRayDirectionNVX): 32(ptr) Variable Input
|
||||
39(gl_ObjectRayOriginNVX): 32(ptr) Variable Input
|
||||
42(gl_ObjectRayDirectionNVX): 32(ptr) Variable Input
|
||||
44: TypePointer Function 28(float)
|
||||
46: TypePointer Input 28(float)
|
||||
47(gl_RayTminNVX): 46(ptr) Variable Input
|
||||
50(gl_RayTmaxNVX): 46(ptr) Variable Input
|
||||
53(gl_HitTNVX): 46(ptr) Variable Input
|
||||
55: TypePointer Function 6(int)
|
||||
57: TypePointer Input 6(int)
|
||||
58(gl_HitKindNVX): 57(ptr) Variable Input
|
||||
60: TypeMatrix 29(fvec3) 4
|
||||
61: TypePointer Function 60
|
||||
63: TypePointer Input 60
|
||||
64(gl_ObjectToWorldNVX): 63(ptr) Variable Input
|
||||
67(gl_WorldToObjectNVX): 63(ptr) Variable Input
|
||||
69: TypeAccelerationStructureNVX
|
||||
70: TypePointer UniformConstant 69
|
||||
71(accNV): 70(ptr) Variable UniformConstant
|
||||
73: 6(int) Constant 0
|
||||
74: 6(int) Constant 1
|
||||
75: 6(int) Constant 2
|
||||
76: 6(int) Constant 3
|
||||
77: 28(float) Constant 1056964608
|
||||
78: 29(fvec3) ConstantComposite 77 77 77
|
||||
79: 28(float) Constant 1065353216
|
||||
80: 29(fvec3) ConstantComposite 79 79 79
|
||||
81: 28(float) Constant 1061158912
|
||||
82: 16(int) Constant 1
|
||||
83: TypeVector 28(float) 4
|
||||
84: TypePointer RayPayloadNVX 83(fvec4)
|
||||
85(localPayload): 84(ptr) Variable RayPayloadNVX
|
||||
86: TypePointer IncomingRayPayloadNVX 83(fvec4)
|
||||
87(incomingPayload): 86(ptr) Variable IncomingRayPayloadNVX
|
||||
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
|
||||
12: 7(ivec2) Load 11(gl_LaunchIDNVX)
|
||||
Store 9(v0) 12
|
||||
15: 7(ivec2) Load 14(gl_LaunchSizeNVX)
|
||||
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_InstanceCustomIndexNVX)
|
||||
Store 25(v4) 27
|
||||
34: 29(fvec3) Load 33(gl_WorldRayOriginNVX)
|
||||
Store 31(v5) 34
|
||||
37: 29(fvec3) Load 36(gl_WorldRayDirectionNVX)
|
||||
Store 35(v6) 37
|
||||
40: 29(fvec3) Load 39(gl_ObjectRayOriginNVX)
|
||||
Store 38(v7) 40
|
||||
43: 29(fvec3) Load 42(gl_ObjectRayDirectionNVX)
|
||||
Store 41(v8) 43
|
||||
48: 28(float) Load 47(gl_RayTminNVX)
|
||||
Store 45(v9) 48
|
||||
51: 28(float) Load 50(gl_RayTmaxNVX)
|
||||
Store 49(v10) 51
|
||||
54: 28(float) Load 53(gl_HitTNVX)
|
||||
Store 52(v11) 54
|
||||
59: 6(int) Load 58(gl_HitKindNVX)
|
||||
Store 56(v12) 59
|
||||
65: 60 Load 64(gl_ObjectToWorldNVX)
|
||||
Store 62(v13) 65
|
||||
68: 60 Load 67(gl_WorldToObjectNVX)
|
||||
Store 66(v14) 68
|
||||
72: 69 Load 71(accNV)
|
||||
TraceNVX 72 73 74 75 76 73 78 77 80 81 82
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,9 @@
|
|||
spv.ClosestHitShader_Errors.rchit
|
||||
ERROR: 0:8: 'assign' : l-value required "payload" (cannot modify hitAttributeNVX in this stage)
|
||||
ERROR: 0:9: 'reportIntersectionNVX' : no matching overloaded function found
|
||||
ERROR: 0:10: 'terminateRayNVX' : no matching overloaded function found
|
||||
ERROR: 0:11: 'ignoreIntersectionNVX' : no matching overloaded function found
|
||||
ERROR: 4 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
|
@ -0,0 +1,138 @@
|
|||
spv.IntersectShader.rint
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 71
|
||||
|
||||
Capability RaytracingNVX
|
||||
Extension "SPV_NVX_raytracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint IntersectionNVX 4 "main" 11 14 20 23 26 33 36 39 42 47 50 56 59
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NVX_raytracing"
|
||||
Name 4 "main"
|
||||
Name 9 "v0"
|
||||
Name 11 "gl_LaunchIDNVX"
|
||||
Name 13 "v1"
|
||||
Name 14 "gl_LaunchSizeNVX"
|
||||
Name 18 "v2"
|
||||
Name 20 "gl_PrimitiveID"
|
||||
Name 22 "v3"
|
||||
Name 23 "gl_InstanceID"
|
||||
Name 25 "v4"
|
||||
Name 26 "gl_InstanceCustomIndexNVX"
|
||||
Name 31 "v5"
|
||||
Name 33 "gl_WorldRayOriginNVX"
|
||||
Name 35 "v6"
|
||||
Name 36 "gl_WorldRayDirectionNVX"
|
||||
Name 38 "v7"
|
||||
Name 39 "gl_ObjectRayOriginNVX"
|
||||
Name 41 "v8"
|
||||
Name 42 "gl_ObjectRayDirectionNVX"
|
||||
Name 45 "v9"
|
||||
Name 47 "gl_RayTminNVX"
|
||||
Name 49 "v10"
|
||||
Name 50 "gl_RayTmaxNVX"
|
||||
Name 54 "v11"
|
||||
Name 56 "gl_ObjectToWorldNVX"
|
||||
Name 58 "v12"
|
||||
Name 59 "gl_WorldToObjectNVX"
|
||||
Name 63 "iAttr"
|
||||
Decorate 11(gl_LaunchIDNVX) BuiltIn LaunchIdNVX
|
||||
Decorate 14(gl_LaunchSizeNVX) BuiltIn LaunchSizeNVX
|
||||
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||
Decorate 23(gl_InstanceID) BuiltIn InstanceId
|
||||
Decorate 26(gl_InstanceCustomIndexNVX) BuiltIn InstanceCustomIndexNVX
|
||||
Decorate 33(gl_WorldRayOriginNVX) BuiltIn WorldRayOriginNVX
|
||||
Decorate 36(gl_WorldRayDirectionNVX) BuiltIn WorldRayDirectionNVX
|
||||
Decorate 39(gl_ObjectRayOriginNVX) BuiltIn ObjectRayOriginNVX
|
||||
Decorate 42(gl_ObjectRayDirectionNVX) BuiltIn ObjectRayDirectionNVX
|
||||
Decorate 47(gl_RayTminNVX) BuiltIn RayTminNVX
|
||||
Decorate 50(gl_RayTmaxNVX) BuiltIn RayTmaxNVX
|
||||
Decorate 56(gl_ObjectToWorldNVX) BuiltIn ObjectToWorldNVX
|
||||
Decorate 59(gl_WorldToObjectNVX) BuiltIn WorldToObjectNVX
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 2
|
||||
8: TypePointer Function 7(ivec2)
|
||||
10: TypePointer Input 7(ivec2)
|
||||
11(gl_LaunchIDNVX): 10(ptr) Variable Input
|
||||
14(gl_LaunchSizeNVX): 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_InstanceCustomIndexNVX): 19(ptr) Variable Input
|
||||
28: TypeFloat 32
|
||||
29: TypeVector 28(float) 3
|
||||
30: TypePointer Function 29(fvec3)
|
||||
32: TypePointer Input 29(fvec3)
|
||||
33(gl_WorldRayOriginNVX): 32(ptr) Variable Input
|
||||
36(gl_WorldRayDirectionNVX): 32(ptr) Variable Input
|
||||
39(gl_ObjectRayOriginNVX): 32(ptr) Variable Input
|
||||
42(gl_ObjectRayDirectionNVX): 32(ptr) Variable Input
|
||||
44: TypePointer Function 28(float)
|
||||
46: TypePointer Input 28(float)
|
||||
47(gl_RayTminNVX): 46(ptr) Variable Input
|
||||
50(gl_RayTmaxNVX): 46(ptr) Variable Input
|
||||
52: TypeMatrix 29(fvec3) 4
|
||||
53: TypePointer Function 52
|
||||
55: TypePointer Input 52
|
||||
56(gl_ObjectToWorldNVX): 55(ptr) Variable Input
|
||||
59(gl_WorldToObjectNVX): 55(ptr) Variable Input
|
||||
61: TypeVector 28(float) 4
|
||||
62: TypePointer HitAttributeNVX 61(fvec4)
|
||||
63(iAttr): 62(ptr) Variable HitAttributeNVX
|
||||
64: 28(float) Constant 1056964608
|
||||
65: 28(float) Constant 0
|
||||
66: 28(float) Constant 1065353216
|
||||
67: 61(fvec4) ConstantComposite 64 64 65 66
|
||||
68: 6(int) Constant 1
|
||||
69: 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
|
||||
12: 7(ivec2) Load 11(gl_LaunchIDNVX)
|
||||
Store 9(v0) 12
|
||||
15: 7(ivec2) Load 14(gl_LaunchSizeNVX)
|
||||
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_InstanceCustomIndexNVX)
|
||||
Store 25(v4) 27
|
||||
34: 29(fvec3) Load 33(gl_WorldRayOriginNVX)
|
||||
Store 31(v5) 34
|
||||
37: 29(fvec3) Load 36(gl_WorldRayDirectionNVX)
|
||||
Store 35(v6) 37
|
||||
40: 29(fvec3) Load 39(gl_ObjectRayOriginNVX)
|
||||
Store 38(v7) 40
|
||||
43: 29(fvec3) Load 42(gl_ObjectRayDirectionNVX)
|
||||
Store 41(v8) 43
|
||||
48: 28(float) Load 47(gl_RayTminNVX)
|
||||
Store 45(v9) 48
|
||||
51: 28(float) Load 50(gl_RayTmaxNVX)
|
||||
Store 49(v10) 51
|
||||
57: 52 Load 56(gl_ObjectToWorldNVX)
|
||||
Store 54(v11) 57
|
||||
60: 52 Load 59(gl_WorldToObjectNVX)
|
||||
Store 58(v12) 60
|
||||
Store 63(iAttr) 67
|
||||
70: 69(bool) ReportIntersectionNVX 64 68
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,10 @@
|
|||
spv.IntersectShader_Errors.rint
|
||||
ERROR: 0:3: 'rayPayloadInNVX' : not supported in this stage: intersection
|
||||
ERROR: 0:4: 'rayPayloadNVX' : not supported in this stage: intersection
|
||||
ERROR: 0:8: 'gl_HitTNVX' : undeclared identifier
|
||||
ERROR: 0:9: 'gl_HitKindNVX' : undeclared identifier
|
||||
ERROR: 0:10: 'traceNVX' : no matching overloaded function found
|
||||
ERROR: 5 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
|
@ -0,0 +1,113 @@
|
|||
spv.MissShader.rmiss
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 60
|
||||
|
||||
Capability RaytracingNVX
|
||||
Extension "SPV_NVX_raytracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MissNVX 4 "main" 11 14 21 24 27 30 35 38
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NVX_raytracing"
|
||||
Name 4 "main"
|
||||
Name 9 "v0"
|
||||
Name 11 "gl_LaunchIDNVX"
|
||||
Name 13 "v1"
|
||||
Name 14 "gl_LaunchSizeNVX"
|
||||
Name 19 "v2"
|
||||
Name 21 "gl_WorldRayOriginNVX"
|
||||
Name 23 "v3"
|
||||
Name 24 "gl_WorldRayDirectionNVX"
|
||||
Name 26 "v4"
|
||||
Name 27 "gl_ObjectRayOriginNVX"
|
||||
Name 29 "v5"
|
||||
Name 30 "gl_ObjectRayDirectionNVX"
|
||||
Name 33 "v6"
|
||||
Name 35 "gl_RayTminNVX"
|
||||
Name 37 "v7"
|
||||
Name 38 "gl_RayTmaxNVX"
|
||||
Name 42 "accNV"
|
||||
Name 57 "localPayload"
|
||||
Name 59 "incomingPayload"
|
||||
Decorate 11(gl_LaunchIDNVX) BuiltIn LaunchIdNVX
|
||||
Decorate 14(gl_LaunchSizeNVX) BuiltIn LaunchSizeNVX
|
||||
Decorate 21(gl_WorldRayOriginNVX) BuiltIn WorldRayOriginNVX
|
||||
Decorate 24(gl_WorldRayDirectionNVX) BuiltIn WorldRayDirectionNVX
|
||||
Decorate 27(gl_ObjectRayOriginNVX) BuiltIn ObjectRayOriginNVX
|
||||
Decorate 30(gl_ObjectRayDirectionNVX) BuiltIn ObjectRayDirectionNVX
|
||||
Decorate 35(gl_RayTminNVX) BuiltIn RayTminNVX
|
||||
Decorate 38(gl_RayTmaxNVX) BuiltIn RayTmaxNVX
|
||||
Decorate 42(accNV) DescriptorSet 0
|
||||
Decorate 42(accNV) Binding 0
|
||||
Decorate 57(localPayload) Location 0
|
||||
Decorate 59(incomingPayload) Location 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 2
|
||||
8: TypePointer Function 7(ivec2)
|
||||
10: TypePointer Input 7(ivec2)
|
||||
11(gl_LaunchIDNVX): 10(ptr) Variable Input
|
||||
14(gl_LaunchSizeNVX): 10(ptr) Variable Input
|
||||
16: TypeFloat 32
|
||||
17: TypeVector 16(float) 3
|
||||
18: TypePointer Function 17(fvec3)
|
||||
20: TypePointer Input 17(fvec3)
|
||||
21(gl_WorldRayOriginNVX): 20(ptr) Variable Input
|
||||
24(gl_WorldRayDirectionNVX): 20(ptr) Variable Input
|
||||
27(gl_ObjectRayOriginNVX): 20(ptr) Variable Input
|
||||
30(gl_ObjectRayDirectionNVX): 20(ptr) Variable Input
|
||||
32: TypePointer Function 16(float)
|
||||
34: TypePointer Input 16(float)
|
||||
35(gl_RayTminNVX): 34(ptr) Variable Input
|
||||
38(gl_RayTmaxNVX): 34(ptr) Variable Input
|
||||
40: TypeAccelerationStructureNVX
|
||||
41: TypePointer UniformConstant 40
|
||||
42(accNV): 41(ptr) Variable UniformConstant
|
||||
44: 6(int) Constant 0
|
||||
45: 6(int) Constant 1
|
||||
46: 6(int) Constant 2
|
||||
47: 6(int) Constant 3
|
||||
48: 16(float) Constant 1056964608
|
||||
49: 17(fvec3) ConstantComposite 48 48 48
|
||||
50: 16(float) Constant 1065353216
|
||||
51: 17(fvec3) ConstantComposite 50 50 50
|
||||
52: 16(float) Constant 1061158912
|
||||
53: TypeInt 32 1
|
||||
54: 53(int) Constant 1
|
||||
55: TypeVector 16(float) 4
|
||||
56: TypePointer RayPayloadNVX 55(fvec4)
|
||||
57(localPayload): 56(ptr) Variable RayPayloadNVX
|
||||
58: TypePointer IncomingRayPayloadNVX 55(fvec4)
|
||||
59(incomingPayload): 58(ptr) Variable IncomingRayPayloadNVX
|
||||
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
|
||||
26(v4): 18(ptr) Variable Function
|
||||
29(v5): 18(ptr) Variable Function
|
||||
33(v6): 32(ptr) Variable Function
|
||||
37(v7): 32(ptr) Variable Function
|
||||
12: 7(ivec2) Load 11(gl_LaunchIDNVX)
|
||||
Store 9(v0) 12
|
||||
15: 7(ivec2) Load 14(gl_LaunchSizeNVX)
|
||||
Store 13(v1) 15
|
||||
22: 17(fvec3) Load 21(gl_WorldRayOriginNVX)
|
||||
Store 19(v2) 22
|
||||
25: 17(fvec3) Load 24(gl_WorldRayDirectionNVX)
|
||||
Store 23(v3) 25
|
||||
28: 17(fvec3) Load 27(gl_ObjectRayOriginNVX)
|
||||
Store 26(v4) 28
|
||||
31: 17(fvec3) Load 30(gl_ObjectRayDirectionNVX)
|
||||
Store 29(v5) 31
|
||||
36: 16(float) Load 35(gl_RayTminNVX)
|
||||
Store 33(v6) 36
|
||||
39: 16(float) Load 38(gl_RayTmaxNVX)
|
||||
Store 37(v7) 39
|
||||
43: 40 Load 42(accNV)
|
||||
TraceNVX 43 44 45 46 47 44 49 48 51 52 54
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
spv.MissShader_Errors.rmiss
|
||||
ERROR: 0:3: 'hitAttributeNVX' : 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_InstanceCustomIndexNVX' : undeclared identifier
|
||||
ERROR: 0:8: '=' : cannot convert from ' temp float' to ' temp highp int'
|
||||
ERROR: 0:9: 'gl_ObjectToWorldNVX' : undeclared identifier
|
||||
ERROR: 0:9: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
|
||||
ERROR: 0:10: 'gl_WorldToObjectNVX' : undeclared identifier
|
||||
ERROR: 0:10: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
|
||||
ERROR: 0:11: 'gl_HitTNVX' : undeclared identifier
|
||||
ERROR: 0:12: 'gl_HitKindNVX' : undeclared identifier
|
||||
ERROR: 0:13: 'reportIntersectionNVX' : no matching overloaded function found
|
||||
ERROR: 0:14: 'ignoreIntersectionNVX' : no matching overloaded function found
|
||||
ERROR: 0:15: 'terminateRayNVX' : no matching overloaded function found
|
||||
ERROR: 16 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
|
@ -0,0 +1,46 @@
|
|||
spv.RayConstants.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 27
|
||||
|
||||
Capability RaytracingNVX
|
||||
Extension "SPV_NVX_raytracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationNVX 4 "main"
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NVX_raytracing"
|
||||
Name 4 "main"
|
||||
Name 8 "accNV"
|
||||
Name 26 "payload"
|
||||
Decorate 8(accNV) DescriptorSet 0
|
||||
Decorate 8(accNV) Binding 0
|
||||
Decorate 26(payload) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeAccelerationStructureNVX
|
||||
7: TypePointer UniformConstant 6
|
||||
8(accNV): 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 RayPayloadNVX 24(fvec4)
|
||||
26(payload): 25(ptr) Variable RayPayloadNVX
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9: 6 Load 8(accNV)
|
||||
TraceNVX 9 11 12 13 13 12 17 18 20 21 23
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,101 @@
|
|||
spv.RayGenShader.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 60
|
||||
|
||||
Capability RaytracingNVX
|
||||
Extension "SPV_NVX_raytracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationNVX 4 "main" 11 21
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NVX_raytracing"
|
||||
Name 4 "main"
|
||||
Name 8 "lx"
|
||||
Name 11 "gl_LaunchIDNVX"
|
||||
Name 16 "ly"
|
||||
Name 20 "sx"
|
||||
Name 21 "gl_LaunchSizeNVX"
|
||||
Name 24 "sy"
|
||||
Name 29 "accNV"
|
||||
Name 48 "block"
|
||||
MemberName 48(block) 0 "arr"
|
||||
MemberName 48(block) 1 "pad"
|
||||
Name 50 ""
|
||||
Name 56 "payload"
|
||||
Decorate 11(gl_LaunchIDNVX) BuiltIn LaunchIdNVX
|
||||
Decorate 21(gl_LaunchSizeNVX) BuiltIn LaunchSizeNVX
|
||||
Decorate 29(accNV) DescriptorSet 0
|
||||
Decorate 29(accNV) Binding 0
|
||||
Decorate 46 ArrayStride 4
|
||||
MemberDecorate 48(block) 0 Offset 0
|
||||
MemberDecorate 48(block) 1 Offset 16
|
||||
Decorate 48(block) BufferBlock
|
||||
Decorate 56(payload) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypePointer Function 6(int)
|
||||
9: TypeVector 6(int) 2
|
||||
10: TypePointer Input 9(ivec2)
|
||||
11(gl_LaunchIDNVX): 10(ptr) Variable Input
|
||||
12: 6(int) Constant 0
|
||||
13: TypePointer Input 6(int)
|
||||
17: 6(int) Constant 1
|
||||
21(gl_LaunchSizeNVX): 10(ptr) Variable Input
|
||||
27: TypeAccelerationStructureNVX
|
||||
28: TypePointer UniformConstant 27
|
||||
29(accNV): 28(ptr) Variable UniformConstant
|
||||
35: TypeFloat 32
|
||||
36: TypeVector 35(float) 3
|
||||
37: 35(float) Constant 0
|
||||
38: 36(fvec3) ConstantComposite 37 37 37
|
||||
39: 35(float) Constant 1056964608
|
||||
40: 35(float) Constant 1065353216
|
||||
41: 36(fvec3) ConstantComposite 40 40 40
|
||||
42: 35(float) Constant 1061158912
|
||||
43: TypeInt 32 1
|
||||
44: 43(int) Constant 1
|
||||
45: 6(int) Constant 4
|
||||
46: TypeArray 35(float) 45
|
||||
47: TypeVector 35(float) 4
|
||||
48(block): TypeStruct 46 47(fvec4)
|
||||
49: TypePointer ShaderRecordBufferNVX 48(block)
|
||||
50: 49(ptr) Variable ShaderRecordBufferNVX
|
||||
51: 43(int) Constant 0
|
||||
52: 43(int) Constant 3
|
||||
53: TypePointer ShaderRecordBufferNVX 35(float)
|
||||
55: TypePointer RayPayloadNVX 47(fvec4)
|
||||
56(payload): 55(ptr) Variable RayPayloadNVX
|
||||
58: TypePointer ShaderRecordBufferNVX 47(fvec4)
|
||||
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_LaunchIDNVX) 12
|
||||
15: 6(int) Load 14
|
||||
Store 8(lx) 15
|
||||
18: 13(ptr) AccessChain 11(gl_LaunchIDNVX) 17
|
||||
19: 6(int) Load 18
|
||||
Store 16(ly) 19
|
||||
22: 13(ptr) AccessChain 21(gl_LaunchSizeNVX) 12
|
||||
23: 6(int) Load 22
|
||||
Store 20(sx) 23
|
||||
25: 13(ptr) AccessChain 21(gl_LaunchSizeNVX) 17
|
||||
26: 6(int) Load 25
|
||||
Store 24(sy) 26
|
||||
30: 27 Load 29(accNV)
|
||||
31: 6(int) Load 8(lx)
|
||||
32: 6(int) Load 16(ly)
|
||||
33: 6(int) Load 20(sx)
|
||||
34: 6(int) Load 24(sy)
|
||||
TraceNVX 30 31 32 33 34 12 38 39 41 42 44
|
||||
54: 53(ptr) AccessChain 50 51 52
|
||||
Store 54 40
|
||||
57: 47(fvec4) Load 56(payload)
|
||||
59: 58(ptr) AccessChain 50 44
|
||||
Store 59 57
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,39 @@
|
|||
spv.RayGenShader_Errors.rgen
|
||||
ERROR: 0:3: 'hitAttributeNVX' : not supported in this stage: ray-generation
|
||||
ERROR: 0:4: 'rayPayloadInNVX' : not supported in this stage: ray-generation
|
||||
ERROR: 0:5: 'shaderRecordNVX' : can only be used with a buffer
|
||||
ERROR: 0:9: 'binding' : cannot be used with shaderRecordNVX
|
||||
ERROR: 0:12: 'set' : cannot be used with shaderRecordNVX
|
||||
ERROR: 0:23: 'accelerationStructureNVX' : accelerationStructureNVX can only be used in uniform variables or function parameters: a
|
||||
ERROR: 0:23: '=' : cannot convert from ' const int' to ' temp accelerationStructureNVX'
|
||||
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_InstanceCustomIndexNVX' : undeclared identifier
|
||||
ERROR: 0:26: '=' : cannot convert from ' temp float' to ' temp highp int'
|
||||
ERROR: 0:27: 'gl_WorldRayOriginNVX' : undeclared identifier
|
||||
ERROR: 0:27: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
|
||||
ERROR: 0:28: 'gl_WorldRayDirectionNVX' : undeclared identifier
|
||||
ERROR: 0:28: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
|
||||
ERROR: 0:29: 'gl_ObjectRayOriginNVX' : undeclared identifier
|
||||
ERROR: 0:29: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
|
||||
ERROR: 0:30: 'gl_ObjectRayDirectionNVX' : undeclared identifier
|
||||
ERROR: 0:30: '=' : cannot convert from ' temp float' to ' temp highp 3-component vector of float'
|
||||
ERROR: 0:31: 'gl_RayTminNVX' : undeclared identifier
|
||||
ERROR: 0:32: 'gl_RayTmaxNVX' : undeclared identifier
|
||||
ERROR: 0:33: 'gl_ObjectToWorldNVX' : undeclared identifier
|
||||
ERROR: 0:33: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
|
||||
ERROR: 0:34: 'gl_WorldToObjectNVX' : undeclared identifier
|
||||
ERROR: 0:34: '=' : cannot convert from ' temp float' to ' temp highp 4X3 matrix of float'
|
||||
ERROR: 0:35: 'gl_HitTNVX' : undeclared identifier
|
||||
ERROR: 0:36: 'gl_HitKindNVX' : undeclared identifier
|
||||
ERROR: 0:37: 'reportIntersectionNVX' : no matching overloaded function found
|
||||
ERROR: 0:38: 'ignoreIntersectionNVX' : no matching overloaded function found
|
||||
ERROR: 0:39: 'terminateRayNVX' : no matching overloaded function found
|
||||
ERROR: 32 compilation errors. No code generated.
|
||||
|
||||
|
||||
ERROR: Linking ray-generation stage: Only one shaderRecordNVX buffer block is allowed per stage
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
|
@ -1,8 +1,4 @@
|
|||
spv.atomicInt64.comp
|
||||
error: SPIRV-Tools Validation Errors
|
||||
error: Capability Int64Atomics is not allowed by Vulkan 1.0 specification (or requires extension)
|
||||
OpCapability Int64Atomics
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 149
|
||||
|
|
|
@ -0,0 +1,358 @@
|
|||
spv.computeShaderDerivatives.comp
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 212
|
||||
|
||||
Capability Shader
|
||||
Capability DerivativeControl
|
||||
Capability ComputeDerivativeGroupQuadsNV
|
||||
Extension "SPV_NV_compute_shader_derivatives"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint GLCompute 4 "main"
|
||||
ExecutionMode 4 LocalSize 2 4 1
|
||||
ExecutionMode 4 DerivativeGroupQuadsNV
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_NV_compute_shader_derivatives"
|
||||
Name 4 "main"
|
||||
Name 10 "block"
|
||||
MemberName 10(block) 0 "fDerivativeX"
|
||||
MemberName 10(block) 1 "fDerivativeY"
|
||||
MemberName 10(block) 2 "fDerivativeWidth"
|
||||
MemberName 10(block) 3 "fCoarseDerivativeX"
|
||||
MemberName 10(block) 4 "fCoarseDerivativeY"
|
||||
MemberName 10(block) 5 "fCoarseDerivativeWidth"
|
||||
MemberName 10(block) 6 "fFineDerivativeX"
|
||||
MemberName 10(block) 7 "fFineDerivativeY"
|
||||
MemberName 10(block) 8 "fFineDerivativeWidth"
|
||||
MemberName 10(block) 9 "fX"
|
||||
MemberName 10(block) 10 "fY"
|
||||
MemberName 10(block) 11 "v2DerivativeX"
|
||||
MemberName 10(block) 12 "v2DerivativeY"
|
||||
MemberName 10(block) 13 "v2DerivativeWidth"
|
||||
MemberName 10(block) 14 "v2CoarseDerivativeX"
|
||||
MemberName 10(block) 15 "v2CoarseDerivativeY"
|
||||
MemberName 10(block) 16 "v2CoarseDerivativeWidth"
|
||||
MemberName 10(block) 17 "v2FineDerivativeX"
|
||||
MemberName 10(block) 18 "v2FineDerivativeY"
|
||||
MemberName 10(block) 19 "v2FineDerivativeWidth"
|
||||
MemberName 10(block) 20 "v2X"
|
||||
MemberName 10(block) 21 "v2Y"
|
||||
MemberName 10(block) 22 "v3DerivativeX"
|
||||
MemberName 10(block) 23 "v3DerivativeY"
|
||||
MemberName 10(block) 24 "v3DerivativeWidth"
|
||||
MemberName 10(block) 25 "v3CoarseDerivativeX"
|
||||
MemberName 10(block) 26 "v3CoarseDerivativeY"
|
||||
MemberName 10(block) 27 "v3CoarseDerivativeWidth"
|
||||
MemberName 10(block) 28 "v3FineDerivativeX"
|
||||
MemberName 10(block) 29 "v3FineDerivativeY"
|
||||
MemberName 10(block) 30 "v3FineDerivativeWidth"
|
||||
MemberName 10(block) 31 "v3X"
|
||||
MemberName 10(block) 32 "v3Y"
|
||||
MemberName 10(block) 33 "v4DerivativeX"
|
||||
MemberName 10(block) 34 "v4DerivativeY"
|
||||
MemberName 10(block) 35 "v4DerivativeWidth"
|
||||
MemberName 10(block) 36 "v4CoarseDerivativeX"
|
||||
MemberName 10(block) 37 "v4CoarseDerivativeY"
|
||||
MemberName 10(block) 38 "v4CoarseDerivativeWidth"
|
||||
MemberName 10(block) 39 "v4FineDerivativeX"
|
||||
MemberName 10(block) 40 "v4FineDerivativeY"
|
||||
MemberName 10(block) 41 "v4FineDerivativeWidth"
|
||||
MemberName 10(block) 42 "v4X"
|
||||
MemberName 10(block) 43 "v4Y"
|
||||
Name 12 ""
|
||||
MemberDecorate 10(block) 0 Offset 0
|
||||
MemberDecorate 10(block) 1 Offset 4
|
||||
MemberDecorate 10(block) 2 Offset 8
|
||||
MemberDecorate 10(block) 3 Offset 12
|
||||
MemberDecorate 10(block) 4 Offset 16
|
||||
MemberDecorate 10(block) 5 Offset 20
|
||||
MemberDecorate 10(block) 6 Offset 24
|
||||
MemberDecorate 10(block) 7 Offset 28
|
||||
MemberDecorate 10(block) 8 Offset 32
|
||||
MemberDecorate 10(block) 9 Offset 36
|
||||
MemberDecorate 10(block) 10 Offset 40
|
||||
MemberDecorate 10(block) 11 Offset 48
|
||||
MemberDecorate 10(block) 12 Offset 56
|
||||
MemberDecorate 10(block) 13 Offset 64
|
||||
MemberDecorate 10(block) 14 Offset 72
|
||||
MemberDecorate 10(block) 15 Offset 80
|
||||
MemberDecorate 10(block) 16 Offset 88
|
||||
MemberDecorate 10(block) 17 Offset 96
|
||||
MemberDecorate 10(block) 18 Offset 104
|
||||
MemberDecorate 10(block) 19 Offset 112
|
||||
MemberDecorate 10(block) 20 Offset 120
|
||||
MemberDecorate 10(block) 21 Offset 128
|
||||
MemberDecorate 10(block) 22 Offset 144
|
||||
MemberDecorate 10(block) 23 Offset 160
|
||||
MemberDecorate 10(block) 24 Offset 176
|
||||
MemberDecorate 10(block) 25 Offset 192
|
||||
MemberDecorate 10(block) 26 Offset 208
|
||||
MemberDecorate 10(block) 27 Offset 224
|
||||
MemberDecorate 10(block) 28 Offset 240
|
||||
MemberDecorate 10(block) 29 Offset 256
|
||||
MemberDecorate 10(block) 30 Offset 272
|
||||
MemberDecorate 10(block) 31 Offset 288
|
||||
MemberDecorate 10(block) 32 Offset 304
|
||||
MemberDecorate 10(block) 33 Offset 320
|
||||
MemberDecorate 10(block) 34 Offset 336
|
||||
MemberDecorate 10(block) 35 Offset 352
|
||||
MemberDecorate 10(block) 36 Offset 368
|
||||
MemberDecorate 10(block) 37 Offset 384
|
||||
MemberDecorate 10(block) 38 Offset 400
|
||||
MemberDecorate 10(block) 39 Offset 416
|
||||
MemberDecorate 10(block) 40 Offset 432
|
||||
MemberDecorate 10(block) 41 Offset 448
|
||||
MemberDecorate 10(block) 42 Offset 464
|
||||
MemberDecorate 10(block) 43 Offset 480
|
||||
Decorate 10(block) BufferBlock
|
||||
Decorate 12 DescriptorSet 0
|
||||
Decorate 211 BuiltIn WorkgroupSize
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 2
|
||||
8: TypeVector 6(float) 3
|
||||
9: TypeVector 6(float) 4
|
||||
10(block): TypeStruct 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4)
|
||||
11: TypePointer Uniform 10(block)
|
||||
12: 11(ptr) Variable Uniform
|
||||
13: TypeInt 32 1
|
||||
14: 13(int) Constant 0
|
||||
15: 13(int) Constant 9
|
||||
16: TypePointer Uniform 6(float)
|
||||
21: 13(int) Constant 1
|
||||
22: 13(int) Constant 10
|
||||
27: 13(int) Constant 2
|
||||
32: 13(int) Constant 3
|
||||
37: 13(int) Constant 4
|
||||
42: 13(int) Constant 5
|
||||
47: 13(int) Constant 6
|
||||
52: 13(int) Constant 7
|
||||
57: 13(int) Constant 8
|
||||
62: 13(int) Constant 11
|
||||
63: 13(int) Constant 20
|
||||
64: TypePointer Uniform 7(fvec2)
|
||||
69: 13(int) Constant 12
|
||||
70: 13(int) Constant 21
|
||||
75: 13(int) Constant 13
|
||||
80: 13(int) Constant 14
|
||||
85: 13(int) Constant 15
|
||||
90: 13(int) Constant 16
|
||||
95: 13(int) Constant 17
|
||||
100: 13(int) Constant 18
|
||||
105: 13(int) Constant 19
|
||||
110: 13(int) Constant 22
|
||||
111: 13(int) Constant 31
|
||||
112: TypePointer Uniform 8(fvec3)
|
||||
117: 13(int) Constant 23
|
||||
118: 13(int) Constant 32
|
||||
123: 13(int) Constant 24
|
||||
128: 13(int) Constant 25
|
||||
133: 13(int) Constant 26
|
||||
138: 13(int) Constant 27
|
||||
143: 13(int) Constant 28
|
||||
148: 13(int) Constant 29
|
||||
153: 13(int) Constant 30
|
||||
158: 13(int) Constant 33
|
||||
159: 13(int) Constant 42
|
||||
160: TypePointer Uniform 9(fvec4)
|
||||
165: 13(int) Constant 34
|
||||
166: 13(int) Constant 43
|
||||
171: 13(int) Constant 35
|
||||
176: 13(int) Constant 36
|
||||
181: 13(int) Constant 37
|
||||
186: 13(int) Constant 38
|
||||
191: 13(int) Constant 39
|
||||
196: 13(int) Constant 40
|
||||
201: 13(int) Constant 41
|
||||
206: TypeInt 32 0
|
||||
207: TypeVector 206(int) 3
|
||||
208: 206(int) Constant 2
|
||||
209: 206(int) Constant 4
|
||||
210: 206(int) Constant 1
|
||||
211: 207(ivec3) ConstantComposite 208 209 210
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
17: 16(ptr) AccessChain 12 15
|
||||
18: 6(float) Load 17
|
||||
19: 6(float) DPdx 18
|
||||
20: 16(ptr) AccessChain 12 14
|
||||
Store 20 19
|
||||
23: 16(ptr) AccessChain 12 22
|
||||
24: 6(float) Load 23
|
||||
25: 6(float) DPdy 24
|
||||
26: 16(ptr) AccessChain 12 21
|
||||
Store 26 25
|
||||
28: 16(ptr) AccessChain 12 15
|
||||
29: 6(float) Load 28
|
||||
30: 6(float) Fwidth 29
|
||||
31: 16(ptr) AccessChain 12 27
|
||||
Store 31 30
|
||||
33: 16(ptr) AccessChain 12 15
|
||||
34: 6(float) Load 33
|
||||
35: 6(float) DPdxCoarse 34
|
||||
36: 16(ptr) AccessChain 12 32
|
||||
Store 36 35
|
||||
38: 16(ptr) AccessChain 12 22
|
||||
39: 6(float) Load 38
|
||||
40: 6(float) DPdyCoarse 39
|
||||
41: 16(ptr) AccessChain 12 37
|
||||
Store 41 40
|
||||
43: 16(ptr) AccessChain 12 15
|
||||
44: 6(float) Load 43
|
||||
45: 6(float) FwidthCoarse 44
|
||||
46: 16(ptr) AccessChain 12 42
|
||||
Store 46 45
|
||||
48: 16(ptr) AccessChain 12 15
|
||||
49: 6(float) Load 48
|
||||
50: 6(float) DPdxFine 49
|
||||
51: 16(ptr) AccessChain 12 47
|
||||
Store 51 50
|
||||
53: 16(ptr) AccessChain 12 22
|
||||
54: 6(float) Load 53
|
||||
55: 6(float) DPdyFine 54
|
||||
56: 16(ptr) AccessChain 12 52
|
||||
Store 56 55
|
||||
58: 16(ptr) AccessChain 12 15
|
||||
59: 6(float) Load 58
|
||||
60: 6(float) FwidthFine 59
|
||||
61: 16(ptr) AccessChain 12 57
|
||||
Store 61 60
|
||||
65: 64(ptr) AccessChain 12 63
|
||||
66: 7(fvec2) Load 65
|
||||
67: 7(fvec2) DPdx 66
|
||||
68: 64(ptr) AccessChain 12 62
|
||||
Store 68 67
|
||||
71: 64(ptr) AccessChain 12 70
|
||||
72: 7(fvec2) Load 71
|
||||
73: 7(fvec2) DPdy 72
|
||||
74: 64(ptr) AccessChain 12 69
|
||||
Store 74 73
|
||||
76: 64(ptr) AccessChain 12 63
|
||||
77: 7(fvec2) Load 76
|
||||
78: 7(fvec2) Fwidth 77
|
||||
79: 64(ptr) AccessChain 12 75
|
||||
Store 79 78
|
||||
81: 64(ptr) AccessChain 12 63
|
||||
82: 7(fvec2) Load 81
|
||||
83: 7(fvec2) DPdxCoarse 82
|
||||
84: 64(ptr) AccessChain 12 80
|
||||
Store 84 83
|
||||
86: 64(ptr) AccessChain 12 70
|
||||
87: 7(fvec2) Load 86
|
||||
88: 7(fvec2) DPdyCoarse 87
|
||||
89: 64(ptr) AccessChain 12 85
|
||||
Store 89 88
|
||||
91: 64(ptr) AccessChain 12 63
|
||||
92: 7(fvec2) Load 91
|
||||
93: 7(fvec2) FwidthCoarse 92
|
||||
94: 64(ptr) AccessChain 12 90
|
||||
Store 94 93
|
||||
96: 64(ptr) AccessChain 12 63
|
||||
97: 7(fvec2) Load 96
|
||||
98: 7(fvec2) DPdxFine 97
|
||||
99: 64(ptr) AccessChain 12 95
|
||||
Store 99 98
|
||||
101: 64(ptr) AccessChain 12 70
|
||||
102: 7(fvec2) Load 101
|
||||
103: 7(fvec2) DPdyFine 102
|
||||
104: 64(ptr) AccessChain 12 100
|
||||
Store 104 103
|
||||
106: 64(ptr) AccessChain 12 63
|
||||
107: 7(fvec2) Load 106
|
||||
108: 7(fvec2) FwidthFine 107
|
||||
109: 64(ptr) AccessChain 12 105
|
||||
Store 109 108
|
||||
113: 112(ptr) AccessChain 12 111
|
||||
114: 8(fvec3) Load 113
|
||||
115: 8(fvec3) DPdx 114
|
||||
116: 112(ptr) AccessChain 12 110
|
||||
Store 116 115
|
||||
119: 112(ptr) AccessChain 12 118
|
||||
120: 8(fvec3) Load 119
|
||||
121: 8(fvec3) DPdy 120
|
||||
122: 112(ptr) AccessChain 12 117
|
||||
Store 122 121
|
||||
124: 112(ptr) AccessChain 12 111
|
||||
125: 8(fvec3) Load 124
|
||||
126: 8(fvec3) Fwidth 125
|
||||
127: 112(ptr) AccessChain 12 123
|
||||
Store 127 126
|
||||
129: 112(ptr) AccessChain 12 111
|
||||
130: 8(fvec3) Load 129
|
||||
131: 8(fvec3) DPdxCoarse 130
|
||||
132: 112(ptr) AccessChain 12 128
|
||||
Store 132 131
|
||||
134: 112(ptr) AccessChain 12 118
|
||||
135: 8(fvec3) Load 134
|
||||
136: 8(fvec3) DPdyCoarse 135
|
||||
137: 112(ptr) AccessChain 12 133
|
||||
Store 137 136
|
||||
139: 112(ptr) AccessChain 12 111
|
||||
140: 8(fvec3) Load 139
|
||||
141: 8(fvec3) FwidthCoarse 140
|
||||
142: 112(ptr) AccessChain 12 138
|
||||
Store 142 141
|
||||
144: 112(ptr) AccessChain 12 111
|
||||
145: 8(fvec3) Load 144
|
||||
146: 8(fvec3) DPdxFine 145
|
||||
147: 112(ptr) AccessChain 12 143
|
||||
Store 147 146
|
||||
149: 112(ptr) AccessChain 12 118
|
||||
150: 8(fvec3) Load 149
|
||||
151: 8(fvec3) DPdyFine 150
|
||||
152: 112(ptr) AccessChain 12 148
|
||||
Store 152 151
|
||||
154: 112(ptr) AccessChain 12 111
|
||||
155: 8(fvec3) Load 154
|
||||
156: 8(fvec3) FwidthFine 155
|
||||
157: 112(ptr) AccessChain 12 153
|
||||
Store 157 156
|
||||
161: 160(ptr) AccessChain 12 159
|
||||
162: 9(fvec4) Load 161
|
||||
163: 9(fvec4) DPdx 162
|
||||
164: 160(ptr) AccessChain 12 158
|
||||
Store 164 163
|
||||
167: 160(ptr) AccessChain 12 166
|
||||
168: 9(fvec4) Load 167
|
||||
169: 9(fvec4) DPdy 168
|
||||
170: 160(ptr) AccessChain 12 165
|
||||
Store 170 169
|
||||
172: 160(ptr) AccessChain 12 159
|
||||
173: 9(fvec4) Load 172
|
||||
174: 9(fvec4) Fwidth 173
|
||||
175: 160(ptr) AccessChain 12 171
|
||||
Store 175 174
|
||||
177: 160(ptr) AccessChain 12 159
|
||||
178: 9(fvec4) Load 177
|
||||
179: 9(fvec4) DPdxCoarse 178
|
||||
180: 160(ptr) AccessChain 12 176
|
||||
Store 180 179
|
||||
182: 160(ptr) AccessChain 12 166
|
||||
183: 9(fvec4) Load 182
|
||||
184: 9(fvec4) DPdyCoarse 183
|
||||
185: 160(ptr) AccessChain 12 181
|
||||
Store 185 184
|
||||
187: 160(ptr) AccessChain 12 159
|
||||
188: 9(fvec4) Load 187
|
||||
189: 9(fvec4) FwidthCoarse 188
|
||||
190: 160(ptr) AccessChain 12 186
|
||||
Store 190 189
|
||||
192: 160(ptr) AccessChain 12 159
|
||||
193: 9(fvec4) Load 192
|
||||
194: 9(fvec4) DPdxFine 193
|
||||
195: 160(ptr) AccessChain 12 191
|
||||
Store 195 194
|
||||
197: 160(ptr) AccessChain 12 166
|
||||
198: 9(fvec4) Load 197
|
||||
199: 9(fvec4) DPdyFine 198
|
||||
200: 160(ptr) AccessChain 12 196
|
||||
Store 200 199
|
||||
202: 160(ptr) AccessChain 12 159
|
||||
203: 9(fvec4) Load 202
|
||||
204: 9(fvec4) FwidthFine 203
|
||||
205: 160(ptr) AccessChain 12 201
|
||||
Store 205 204
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,358 @@
|
|||
spv.computeShaderDerivatives2.comp
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 212
|
||||
|
||||
Capability Shader
|
||||
Capability DerivativeControl
|
||||
Capability ComputeDerivativeGroupLinearNV
|
||||
Extension "SPV_NV_compute_shader_derivatives"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint GLCompute 4 "main"
|
||||
ExecutionMode 4 LocalSize 2 4 1
|
||||
ExecutionMode 4 DerivativeGroupLinearNV
|
||||
Source ESSL 320
|
||||
SourceExtension "GL_NV_compute_shader_derivatives"
|
||||
Name 4 "main"
|
||||
Name 10 "block"
|
||||
MemberName 10(block) 0 "fDerivativeX"
|
||||
MemberName 10(block) 1 "fDerivativeY"
|
||||
MemberName 10(block) 2 "fDerivativeWidth"
|
||||
MemberName 10(block) 3 "fCoarseDerivativeX"
|
||||
MemberName 10(block) 4 "fCoarseDerivativeY"
|
||||
MemberName 10(block) 5 "fCoarseDerivativeWidth"
|
||||
MemberName 10(block) 6 "fFineDerivativeX"
|
||||
MemberName 10(block) 7 "fFineDerivativeY"
|
||||
MemberName 10(block) 8 "fFineDerivativeWidth"
|
||||
MemberName 10(block) 9 "fX"
|
||||
MemberName 10(block) 10 "fY"
|
||||
MemberName 10(block) 11 "v2DerivativeX"
|
||||
MemberName 10(block) 12 "v2DerivativeY"
|
||||
MemberName 10(block) 13 "v2DerivativeWidth"
|
||||
MemberName 10(block) 14 "v2CoarseDerivativeX"
|
||||
MemberName 10(block) 15 "v2CoarseDerivativeY"
|
||||
MemberName 10(block) 16 "v2CoarseDerivativeWidth"
|
||||
MemberName 10(block) 17 "v2FineDerivativeX"
|
||||
MemberName 10(block) 18 "v2FineDerivativeY"
|
||||
MemberName 10(block) 19 "v2FineDerivativeWidth"
|
||||
MemberName 10(block) 20 "v2X"
|
||||
MemberName 10(block) 21 "v2Y"
|
||||
MemberName 10(block) 22 "v3DerivativeX"
|
||||
MemberName 10(block) 23 "v3DerivativeY"
|
||||
MemberName 10(block) 24 "v3DerivativeWidth"
|
||||
MemberName 10(block) 25 "v3CoarseDerivativeX"
|
||||
MemberName 10(block) 26 "v3CoarseDerivativeY"
|
||||
MemberName 10(block) 27 "v3CoarseDerivativeWidth"
|
||||
MemberName 10(block) 28 "v3FineDerivativeX"
|
||||
MemberName 10(block) 29 "v3FineDerivativeY"
|
||||
MemberName 10(block) 30 "v3FineDerivativeWidth"
|
||||
MemberName 10(block) 31 "v3X"
|
||||
MemberName 10(block) 32 "v3Y"
|
||||
MemberName 10(block) 33 "v4DerivativeX"
|
||||
MemberName 10(block) 34 "v4DerivativeY"
|
||||
MemberName 10(block) 35 "v4DerivativeWidth"
|
||||
MemberName 10(block) 36 "v4CoarseDerivativeX"
|
||||
MemberName 10(block) 37 "v4CoarseDerivativeY"
|
||||
MemberName 10(block) 38 "v4CoarseDerivativeWidth"
|
||||
MemberName 10(block) 39 "v4FineDerivativeX"
|
||||
MemberName 10(block) 40 "v4FineDerivativeY"
|
||||
MemberName 10(block) 41 "v4FineDerivativeWidth"
|
||||
MemberName 10(block) 42 "v4X"
|
||||
MemberName 10(block) 43 "v4Y"
|
||||
Name 12 ""
|
||||
MemberDecorate 10(block) 0 Offset 0
|
||||
MemberDecorate 10(block) 1 Offset 4
|
||||
MemberDecorate 10(block) 2 Offset 8
|
||||
MemberDecorate 10(block) 3 Offset 12
|
||||
MemberDecorate 10(block) 4 Offset 16
|
||||
MemberDecorate 10(block) 5 Offset 20
|
||||
MemberDecorate 10(block) 6 Offset 24
|
||||
MemberDecorate 10(block) 7 Offset 28
|
||||
MemberDecorate 10(block) 8 Offset 32
|
||||
MemberDecorate 10(block) 9 Offset 36
|
||||
MemberDecorate 10(block) 10 Offset 40
|
||||
MemberDecorate 10(block) 11 Offset 48
|
||||
MemberDecorate 10(block) 12 Offset 56
|
||||
MemberDecorate 10(block) 13 Offset 64
|
||||
MemberDecorate 10(block) 14 Offset 72
|
||||
MemberDecorate 10(block) 15 Offset 80
|
||||
MemberDecorate 10(block) 16 Offset 88
|
||||
MemberDecorate 10(block) 17 Offset 96
|
||||
MemberDecorate 10(block) 18 Offset 104
|
||||
MemberDecorate 10(block) 19 Offset 112
|
||||
MemberDecorate 10(block) 20 Offset 120
|
||||
MemberDecorate 10(block) 21 Offset 128
|
||||
MemberDecorate 10(block) 22 Offset 144
|
||||
MemberDecorate 10(block) 23 Offset 160
|
||||
MemberDecorate 10(block) 24 Offset 176
|
||||
MemberDecorate 10(block) 25 Offset 192
|
||||
MemberDecorate 10(block) 26 Offset 208
|
||||
MemberDecorate 10(block) 27 Offset 224
|
||||
MemberDecorate 10(block) 28 Offset 240
|
||||
MemberDecorate 10(block) 29 Offset 256
|
||||
MemberDecorate 10(block) 30 Offset 272
|
||||
MemberDecorate 10(block) 31 Offset 288
|
||||
MemberDecorate 10(block) 32 Offset 304
|
||||
MemberDecorate 10(block) 33 Offset 320
|
||||
MemberDecorate 10(block) 34 Offset 336
|
||||
MemberDecorate 10(block) 35 Offset 352
|
||||
MemberDecorate 10(block) 36 Offset 368
|
||||
MemberDecorate 10(block) 37 Offset 384
|
||||
MemberDecorate 10(block) 38 Offset 400
|
||||
MemberDecorate 10(block) 39 Offset 416
|
||||
MemberDecorate 10(block) 40 Offset 432
|
||||
MemberDecorate 10(block) 41 Offset 448
|
||||
MemberDecorate 10(block) 42 Offset 464
|
||||
MemberDecorate 10(block) 43 Offset 480
|
||||
Decorate 10(block) BufferBlock
|
||||
Decorate 12 DescriptorSet 0
|
||||
Decorate 211 BuiltIn WorkgroupSize
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 2
|
||||
8: TypeVector 6(float) 3
|
||||
9: TypeVector 6(float) 4
|
||||
10(block): TypeStruct 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 7(fvec2) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 8(fvec3) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4) 9(fvec4)
|
||||
11: TypePointer Uniform 10(block)
|
||||
12: 11(ptr) Variable Uniform
|
||||
13: TypeInt 32 1
|
||||
14: 13(int) Constant 0
|
||||
15: 13(int) Constant 9
|
||||
16: TypePointer Uniform 6(float)
|
||||
21: 13(int) Constant 1
|
||||
22: 13(int) Constant 10
|
||||
27: 13(int) Constant 2
|
||||
32: 13(int) Constant 3
|
||||
37: 13(int) Constant 4
|
||||
42: 13(int) Constant 5
|
||||
47: 13(int) Constant 6
|
||||
52: 13(int) Constant 7
|
||||
57: 13(int) Constant 8
|
||||
62: 13(int) Constant 11
|
||||
63: 13(int) Constant 20
|
||||
64: TypePointer Uniform 7(fvec2)
|
||||
69: 13(int) Constant 12
|
||||
70: 13(int) Constant 21
|
||||
75: 13(int) Constant 13
|
||||
80: 13(int) Constant 14
|
||||
85: 13(int) Constant 15
|
||||
90: 13(int) Constant 16
|
||||
95: 13(int) Constant 17
|
||||
100: 13(int) Constant 18
|
||||
105: 13(int) Constant 19
|
||||
110: 13(int) Constant 22
|
||||
111: 13(int) Constant 31
|
||||
112: TypePointer Uniform 8(fvec3)
|
||||
117: 13(int) Constant 23
|
||||
118: 13(int) Constant 32
|
||||
123: 13(int) Constant 24
|
||||
128: 13(int) Constant 25
|
||||
133: 13(int) Constant 26
|
||||
138: 13(int) Constant 27
|
||||
143: 13(int) Constant 28
|
||||
148: 13(int) Constant 29
|
||||
153: 13(int) Constant 30
|
||||
158: 13(int) Constant 33
|
||||
159: 13(int) Constant 42
|
||||
160: TypePointer Uniform 9(fvec4)
|
||||
165: 13(int) Constant 34
|
||||
166: 13(int) Constant 43
|
||||
171: 13(int) Constant 35
|
||||
176: 13(int) Constant 36
|
||||
181: 13(int) Constant 37
|
||||
186: 13(int) Constant 38
|
||||
191: 13(int) Constant 39
|
||||
196: 13(int) Constant 40
|
||||
201: 13(int) Constant 41
|
||||
206: TypeInt 32 0
|
||||
207: TypeVector 206(int) 3
|
||||
208: 206(int) Constant 2
|
||||
209: 206(int) Constant 4
|
||||
210: 206(int) Constant 1
|
||||
211: 207(ivec3) ConstantComposite 208 209 210
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
17: 16(ptr) AccessChain 12 15
|
||||
18: 6(float) Load 17
|
||||
19: 6(float) DPdx 18
|
||||
20: 16(ptr) AccessChain 12 14
|
||||
Store 20 19
|
||||
23: 16(ptr) AccessChain 12 22
|
||||
24: 6(float) Load 23
|
||||
25: 6(float) DPdy 24
|
||||
26: 16(ptr) AccessChain 12 21
|
||||
Store 26 25
|
||||
28: 16(ptr) AccessChain 12 15
|
||||
29: 6(float) Load 28
|
||||
30: 6(float) Fwidth 29
|
||||
31: 16(ptr) AccessChain 12 27
|
||||
Store 31 30
|
||||
33: 16(ptr) AccessChain 12 15
|
||||
34: 6(float) Load 33
|
||||
35: 6(float) DPdxCoarse 34
|
||||
36: 16(ptr) AccessChain 12 32
|
||||
Store 36 35
|
||||
38: 16(ptr) AccessChain 12 22
|
||||
39: 6(float) Load 38
|
||||
40: 6(float) DPdyCoarse 39
|
||||
41: 16(ptr) AccessChain 12 37
|
||||
Store 41 40
|
||||
43: 16(ptr) AccessChain 12 15
|
||||
44: 6(float) Load 43
|
||||
45: 6(float) FwidthCoarse 44
|
||||
46: 16(ptr) AccessChain 12 42
|
||||
Store 46 45
|
||||
48: 16(ptr) AccessChain 12 15
|
||||
49: 6(float) Load 48
|
||||
50: 6(float) DPdxFine 49
|
||||
51: 16(ptr) AccessChain 12 47
|
||||
Store 51 50
|
||||
53: 16(ptr) AccessChain 12 22
|
||||
54: 6(float) Load 53
|
||||
55: 6(float) DPdyFine 54
|
||||
56: 16(ptr) AccessChain 12 52
|
||||
Store 56 55
|
||||
58: 16(ptr) AccessChain 12 15
|
||||
59: 6(float) Load 58
|
||||
60: 6(float) FwidthFine 59
|
||||
61: 16(ptr) AccessChain 12 57
|
||||
Store 61 60
|
||||
65: 64(ptr) AccessChain 12 63
|
||||
66: 7(fvec2) Load 65
|
||||
67: 7(fvec2) DPdx 66
|
||||
68: 64(ptr) AccessChain 12 62
|
||||
Store 68 67
|
||||
71: 64(ptr) AccessChain 12 70
|
||||
72: 7(fvec2) Load 71
|
||||
73: 7(fvec2) DPdy 72
|
||||
74: 64(ptr) AccessChain 12 69
|
||||
Store 74 73
|
||||
76: 64(ptr) AccessChain 12 63
|
||||
77: 7(fvec2) Load 76
|
||||
78: 7(fvec2) Fwidth 77
|
||||
79: 64(ptr) AccessChain 12 75
|
||||
Store 79 78
|
||||
81: 64(ptr) AccessChain 12 63
|
||||
82: 7(fvec2) Load 81
|
||||
83: 7(fvec2) DPdxCoarse 82
|
||||
84: 64(ptr) AccessChain 12 80
|
||||
Store 84 83
|
||||
86: 64(ptr) AccessChain 12 70
|
||||
87: 7(fvec2) Load 86
|
||||
88: 7(fvec2) DPdyCoarse 87
|
||||
89: 64(ptr) AccessChain 12 85
|
||||
Store 89 88
|
||||
91: 64(ptr) AccessChain 12 63
|
||||
92: 7(fvec2) Load 91
|
||||
93: 7(fvec2) FwidthCoarse 92
|
||||
94: 64(ptr) AccessChain 12 90
|
||||
Store 94 93
|
||||
96: 64(ptr) AccessChain 12 63
|
||||
97: 7(fvec2) Load 96
|
||||
98: 7(fvec2) DPdxFine 97
|
||||
99: 64(ptr) AccessChain 12 95
|
||||
Store 99 98
|
||||
101: 64(ptr) AccessChain 12 70
|
||||
102: 7(fvec2) Load 101
|
||||
103: 7(fvec2) DPdyFine 102
|
||||
104: 64(ptr) AccessChain 12 100
|
||||
Store 104 103
|
||||
106: 64(ptr) AccessChain 12 63
|
||||
107: 7(fvec2) Load 106
|
||||
108: 7(fvec2) FwidthFine 107
|
||||
109: 64(ptr) AccessChain 12 105
|
||||
Store 109 108
|
||||
113: 112(ptr) AccessChain 12 111
|
||||
114: 8(fvec3) Load 113
|
||||
115: 8(fvec3) DPdx 114
|
||||
116: 112(ptr) AccessChain 12 110
|
||||
Store 116 115
|
||||
119: 112(ptr) AccessChain 12 118
|
||||
120: 8(fvec3) Load 119
|
||||
121: 8(fvec3) DPdy 120
|
||||
122: 112(ptr) AccessChain 12 117
|
||||
Store 122 121
|
||||
124: 112(ptr) AccessChain 12 111
|
||||
125: 8(fvec3) Load 124
|
||||
126: 8(fvec3) Fwidth 125
|
||||
127: 112(ptr) AccessChain 12 123
|
||||
Store 127 126
|
||||
129: 112(ptr) AccessChain 12 111
|
||||
130: 8(fvec3) Load 129
|
||||
131: 8(fvec3) DPdxCoarse 130
|
||||
132: 112(ptr) AccessChain 12 128
|
||||
Store 132 131
|
||||
134: 112(ptr) AccessChain 12 118
|
||||
135: 8(fvec3) Load 134
|
||||
136: 8(fvec3) DPdyCoarse 135
|
||||
137: 112(ptr) AccessChain 12 133
|
||||
Store 137 136
|
||||
139: 112(ptr) AccessChain 12 111
|
||||
140: 8(fvec3) Load 139
|
||||
141: 8(fvec3) FwidthCoarse 140
|
||||
142: 112(ptr) AccessChain 12 138
|
||||
Store 142 141
|
||||
144: 112(ptr) AccessChain 12 111
|
||||
145: 8(fvec3) Load 144
|
||||
146: 8(fvec3) DPdxFine 145
|
||||
147: 112(ptr) AccessChain 12 143
|
||||
Store 147 146
|
||||
149: 112(ptr) AccessChain 12 118
|
||||
150: 8(fvec3) Load 149
|
||||
151: 8(fvec3) DPdyFine 150
|
||||
152: 112(ptr) AccessChain 12 148
|
||||
Store 152 151
|
||||
154: 112(ptr) AccessChain 12 111
|
||||
155: 8(fvec3) Load 154
|
||||
156: 8(fvec3) FwidthFine 155
|
||||
157: 112(ptr) AccessChain 12 153
|
||||
Store 157 156
|
||||
161: 160(ptr) AccessChain 12 159
|
||||
162: 9(fvec4) Load 161
|
||||
163: 9(fvec4) DPdx 162
|
||||
164: 160(ptr) AccessChain 12 158
|
||||
Store 164 163
|
||||
167: 160(ptr) AccessChain 12 166
|
||||
168: 9(fvec4) Load 167
|
||||
169: 9(fvec4) DPdy 168
|
||||
170: 160(ptr) AccessChain 12 165
|
||||
Store 170 169
|
||||
172: 160(ptr) AccessChain 12 159
|
||||
173: 9(fvec4) Load 172
|
||||
174: 9(fvec4) Fwidth 173
|
||||
175: 160(ptr) AccessChain 12 171
|
||||
Store 175 174
|
||||
177: 160(ptr) AccessChain 12 159
|
||||
178: 9(fvec4) Load 177
|
||||
179: 9(fvec4) DPdxCoarse 178
|
||||
180: 160(ptr) AccessChain 12 176
|
||||
Store 180 179
|
||||
182: 160(ptr) AccessChain 12 166
|
||||
183: 9(fvec4) Load 182
|
||||
184: 9(fvec4) DPdyCoarse 183
|
||||
185: 160(ptr) AccessChain 12 181
|
||||
Store 185 184
|
||||
187: 160(ptr) AccessChain 12 159
|
||||
188: 9(fvec4) Load 187
|
||||
189: 9(fvec4) FwidthCoarse 188
|
||||
190: 160(ptr) AccessChain 12 186
|
||||
Store 190 189
|
||||
192: 160(ptr) AccessChain 12 159
|
||||
193: 9(fvec4) Load 192
|
||||
194: 9(fvec4) DPdxFine 193
|
||||
195: 160(ptr) AccessChain 12 191
|
||||
Store 195 194
|
||||
197: 160(ptr) AccessChain 12 166
|
||||
198: 9(fvec4) Load 197
|
||||
199: 9(fvec4) DPdyFine 198
|
||||
200: 160(ptr) AccessChain 12 196
|
||||
Store 200 199
|
||||
202: 160(ptr) AccessChain 12 159
|
||||
203: 9(fvec4) Load 202
|
||||
204: 9(fvec4) FwidthFine 203
|
||||
205: 160(ptr) AccessChain 12 201
|
||||
Store 205 204
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,69 @@
|
|||
spv.fragmentShaderBarycentric.frag
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 43
|
||||
|
||||
Capability Shader
|
||||
Capability FragmentBarycentricNV
|
||||
Extension "SPV_NV_fragment_shader_barycentric"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 8 11 21
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_NV_fragment_shader_barycentric"
|
||||
Name 4 "main"
|
||||
Name 8 "value"
|
||||
Name 11 "gl_BaryCoordNV"
|
||||
Name 17 "vertices"
|
||||
MemberName 17(vertices) 0 "attrib"
|
||||
Name 21 "v"
|
||||
Decorate 8(value) Location 1
|
||||
Decorate 11(gl_BaryCoordNV) BuiltIn BaryCoordNV
|
||||
Decorate 17(vertices) Block
|
||||
Decorate 21(v) Location 0
|
||||
Decorate 21(v) PerVertexNV
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypePointer Output 6(float)
|
||||
8(value): 7(ptr) Variable Output
|
||||
9: TypeVector 6(float) 3
|
||||
10: TypePointer Input 9(fvec3)
|
||||
11(gl_BaryCoordNV): 10(ptr) Variable Input
|
||||
12: TypeInt 32 0
|
||||
13: 12(int) Constant 0
|
||||
14: TypePointer Input 6(float)
|
||||
17(vertices): TypeStruct 6(float)
|
||||
18: 12(int) Constant 3
|
||||
19: TypeArray 17(vertices) 18
|
||||
20: TypePointer Input 19
|
||||
21(v): 20(ptr) Variable Input
|
||||
22: TypeInt 32 1
|
||||
23: 22(int) Constant 0
|
||||
27: 12(int) Constant 1
|
||||
30: 22(int) Constant 1
|
||||
35: 12(int) Constant 2
|
||||
38: 22(int) Constant 2
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
15: 14(ptr) AccessChain 11(gl_BaryCoordNV) 13
|
||||
16: 6(float) Load 15
|
||||
24: 14(ptr) AccessChain 21(v) 23 23
|
||||
25: 6(float) Load 24
|
||||
26: 6(float) FMul 16 25
|
||||
28: 14(ptr) AccessChain 11(gl_BaryCoordNV) 27
|
||||
29: 6(float) Load 28
|
||||
31: 14(ptr) AccessChain 21(v) 30 23
|
||||
32: 6(float) Load 31
|
||||
33: 6(float) FMul 29 32
|
||||
34: 6(float) FAdd 26 33
|
||||
36: 14(ptr) AccessChain 11(gl_BaryCoordNV) 35
|
||||
37: 6(float) Load 36
|
||||
39: 14(ptr) AccessChain 21(v) 38 23
|
||||
40: 6(float) Load 39
|
||||
41: 6(float) FMul 37 40
|
||||
42: 6(float) FAdd 34 41
|
||||
Store 8(value) 42
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,65 @@
|
|||
spv.fragmentShaderBarycentric2.frag
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 42
|
||||
|
||||
Capability Shader
|
||||
Capability FragmentBarycentricNV
|
||||
Extension "SPV_NV_fragment_shader_barycentric"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 8 11 20
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source ESSL 320
|
||||
SourceExtension "GL_NV_fragment_shader_barycentric"
|
||||
Name 4 "main"
|
||||
Name 8 "value"
|
||||
Name 11 "gl_BaryCoordNoPerspNV"
|
||||
Name 20 "vertexIDs"
|
||||
Decorate 8(value) Location 1
|
||||
Decorate 11(gl_BaryCoordNoPerspNV) BuiltIn BaryCoordNoPerspNV
|
||||
Decorate 20(vertexIDs) Location 0
|
||||
Decorate 20(vertexIDs) PerVertexNV
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypePointer Output 6(float)
|
||||
8(value): 7(ptr) Variable Output
|
||||
9: TypeVector 6(float) 3
|
||||
10: TypePointer Input 9(fvec3)
|
||||
11(gl_BaryCoordNoPerspNV): 10(ptr) Variable Input
|
||||
12: TypeInt 32 0
|
||||
13: 12(int) Constant 0
|
||||
14: TypePointer Input 6(float)
|
||||
17: 12(int) Constant 3
|
||||
18: TypeArray 6(float) 17
|
||||
19: TypePointer Input 18
|
||||
20(vertexIDs): 19(ptr) Variable Input
|
||||
21: TypeInt 32 1
|
||||
22: 21(int) Constant 0
|
||||
26: 12(int) Constant 1
|
||||
29: 21(int) Constant 1
|
||||
34: 12(int) Constant 2
|
||||
37: 21(int) Constant 2
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
15: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspNV) 13
|
||||
16: 6(float) Load 15
|
||||
23: 14(ptr) AccessChain 20(vertexIDs) 22
|
||||
24: 6(float) Load 23
|
||||
25: 6(float) FMul 16 24
|
||||
27: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspNV) 26
|
||||
28: 6(float) Load 27
|
||||
30: 14(ptr) AccessChain 20(vertexIDs) 29
|
||||
31: 6(float) Load 30
|
||||
32: 6(float) FMul 28 31
|
||||
33: 6(float) FAdd 25 32
|
||||
35: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspNV) 34
|
||||
36: 6(float) Load 35
|
||||
38: 14(ptr) AccessChain 20(vertexIDs) 37
|
||||
39: 6(float) Load 38
|
||||
40: 6(float) FMul 36 39
|
||||
41: 6(float) FAdd 33 40
|
||||
Store 8(value) 41
|
||||
Return
|
||||
FunctionEnd
|
|
@ -1,8 +1,4 @@
|
|||
spv.memoryScopeSemantics.comp
|
||||
error: SPIRV-Tools Validation Errors
|
||||
error: Capability Int64Atomics is not allowed by Vulkan 1.0 specification (or requires extension)
|
||||
OpCapability Int64Atomics
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 142
|
||||
|
|
|
@ -0,0 +1,259 @@
|
|||
spv.meshShaderBuiltins.mesh
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 147
|
||||
|
||||
Capability ClipDistance
|
||||
Capability CullDistance
|
||||
Capability MultiViewport
|
||||
Capability DrawParameters
|
||||
Capability ShaderViewportMaskNV
|
||||
Capability MeshShadingNV
|
||||
Extension "SPV_KHR_shader_draw_parameters"
|
||||
Extension "SPV_NV_mesh_shader"
|
||||
Extension "SPV_NV_viewport_array2"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MeshNV 4 "main" 11 17 34 89 129 140 144
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
ExecutionMode 4 OutputVertices 81
|
||||
ExecutionMode 4 OutputPrimitivesNV 32
|
||||
ExecutionMode 4 OutputTrianglesNV
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NV_mesh_shader"
|
||||
Name 4 "main"
|
||||
Name 8 "iid"
|
||||
Name 11 "gl_LocalInvocationID"
|
||||
Name 16 "gid"
|
||||
Name 17 "gl_WorkGroupID"
|
||||
Name 30 "gl_MeshPerVertexNV"
|
||||
MemberName 30(gl_MeshPerVertexNV) 0 "gl_Position"
|
||||
MemberName 30(gl_MeshPerVertexNV) 1 "gl_PointSize"
|
||||
MemberName 30(gl_MeshPerVertexNV) 2 "gl_ClipDistance"
|
||||
MemberName 30(gl_MeshPerVertexNV) 3 "gl_CullDistance"
|
||||
MemberName 30(gl_MeshPerVertexNV) 4 "gl_PositionPerViewNV"
|
||||
MemberName 30(gl_MeshPerVertexNV) 5 "gl_ClipDistancePerViewNV"
|
||||
MemberName 30(gl_MeshPerVertexNV) 6 "gl_CullDistancePerViewNV"
|
||||
Name 34 "gl_MeshVerticesNV"
|
||||
Name 85 "gl_MeshPerPrimitiveNV"
|
||||
MemberName 85(gl_MeshPerPrimitiveNV) 0 "gl_PrimitiveID"
|
||||
MemberName 85(gl_MeshPerPrimitiveNV) 1 "gl_Layer"
|
||||
MemberName 85(gl_MeshPerPrimitiveNV) 2 "gl_ViewportIndex"
|
||||
MemberName 85(gl_MeshPerPrimitiveNV) 3 "gl_ViewportMask"
|
||||
MemberName 85(gl_MeshPerPrimitiveNV) 4 "gl_LayerPerViewNV"
|
||||
MemberName 85(gl_MeshPerPrimitiveNV) 5 "gl_ViewportMaskPerViewNV"
|
||||
Name 89 "gl_MeshPrimitivesNV"
|
||||
Name 129 "gl_PrimitiveIndicesNV"
|
||||
Name 140 "gl_DrawID"
|
||||
Name 144 "gl_PrimitiveCountNV"
|
||||
Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||
Decorate 17(gl_WorkGroupID) BuiltIn WorkgroupId
|
||||
MemberDecorate 30(gl_MeshPerVertexNV) 0 BuiltIn Position
|
||||
MemberDecorate 30(gl_MeshPerVertexNV) 1 BuiltIn PointSize
|
||||
MemberDecorate 30(gl_MeshPerVertexNV) 2 BuiltIn ClipDistance
|
||||
MemberDecorate 30(gl_MeshPerVertexNV) 3 BuiltIn CullDistance
|
||||
MemberDecorate 30(gl_MeshPerVertexNV) 4 PerViewNV
|
||||
MemberDecorate 30(gl_MeshPerVertexNV) 4 BuiltIn PositionPerViewNV
|
||||
MemberDecorate 30(gl_MeshPerVertexNV) 5 PerViewNV
|
||||
MemberDecorate 30(gl_MeshPerVertexNV) 5 BuiltIn ClipDistancePerViewNV
|
||||
MemberDecorate 30(gl_MeshPerVertexNV) 6 PerViewNV
|
||||
MemberDecorate 30(gl_MeshPerVertexNV) 6 BuiltIn CullDistancePerViewNV
|
||||
Decorate 30(gl_MeshPerVertexNV) Block
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 0 PerPrimitiveNV
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 0 BuiltIn PrimitiveId
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 1 PerPrimitiveNV
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 1 BuiltIn Layer
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 2 PerPrimitiveNV
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 2 BuiltIn ViewportIndex
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 3 PerPrimitiveNV
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 3 BuiltIn ViewportMaskNV
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 4 PerPrimitiveNV
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 4 PerViewNV
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 4 BuiltIn LayerPerViewNV
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 5 PerPrimitiveNV
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 5 PerViewNV
|
||||
MemberDecorate 85(gl_MeshPerPrimitiveNV) 5 BuiltIn ViewportMaskPerViewNV
|
||||
Decorate 85(gl_MeshPerPrimitiveNV) Block
|
||||
Decorate 129(gl_PrimitiveIndicesNV) BuiltIn PrimitiveIndicesNV
|
||||
Decorate 140(gl_DrawID) BuiltIn DrawIndex
|
||||
Decorate 144(gl_PrimitiveCountNV) BuiltIn PrimitiveCountNV
|
||||
Decorate 146 BuiltIn WorkgroupSize
|
||||
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_LocalInvocationID): 10(ptr) Variable Input
|
||||
12: 6(int) Constant 0
|
||||
13: TypePointer Input 6(int)
|
||||
17(gl_WorkGroupID): 10(ptr) Variable Input
|
||||
20: TypeFloat 32
|
||||
21: TypeVector 20(float) 4
|
||||
22: 6(int) Constant 4
|
||||
23: TypeArray 20(float) 22
|
||||
24: 6(int) Constant 3
|
||||
25: TypeArray 20(float) 24
|
||||
26: TypeArray 21(fvec4) 22
|
||||
27: 6(int) Constant 8
|
||||
28: TypeArray 20(float) 27
|
||||
29: TypeArray 28 22
|
||||
30(gl_MeshPerVertexNV): TypeStruct 21(fvec4) 20(float) 23 25 26 29 29
|
||||
31: 6(int) Constant 81
|
||||
32: TypeArray 30(gl_MeshPerVertexNV) 31
|
||||
33: TypePointer Output 32
|
||||
34(gl_MeshVerticesNV): 33(ptr) Variable Output
|
||||
36: TypeInt 32 1
|
||||
37: 36(int) Constant 0
|
||||
38: 20(float) Constant 1065353216
|
||||
39: 21(fvec4) ConstantComposite 38 38 38 38
|
||||
40: TypePointer Output 21(fvec4)
|
||||
43: 36(int) Constant 1
|
||||
44: 20(float) Constant 1073741824
|
||||
45: TypePointer Output 20(float)
|
||||
48: 36(int) Constant 2
|
||||
49: 36(int) Constant 3
|
||||
50: 20(float) Constant 1077936128
|
||||
53: 20(float) Constant 1082130432
|
||||
55: 6(int) Constant 1
|
||||
56: 6(int) Constant 264
|
||||
57: 6(int) Constant 2
|
||||
82: TypeArray 36(int) 55
|
||||
83: TypeArray 36(int) 22
|
||||
84: TypeArray 82 22
|
||||
85(gl_MeshPerPrimitiveNV): TypeStruct 36(int) 36(int) 36(int) 82 83 84
|
||||
86: 6(int) Constant 32
|
||||
87: TypeArray 85(gl_MeshPerPrimitiveNV) 86
|
||||
88: TypePointer Output 87
|
||||
89(gl_MeshPrimitivesNV): 88(ptr) Variable Output
|
||||
91: 36(int) Constant 6
|
||||
92: TypePointer Output 36(int)
|
||||
95: 36(int) Constant 7
|
||||
98: 36(int) Constant 8
|
||||
101: 36(int) Constant 9
|
||||
127: TypeArray 6(int) 31
|
||||
128: TypePointer Output 127
|
||||
129(gl_PrimitiveIndicesNV): 128(ptr) Variable Output
|
||||
130: 6(int) Constant 257
|
||||
131: TypePointer Output 6(int)
|
||||
139: TypePointer Input 36(int)
|
||||
140(gl_DrawID): 139(ptr) Variable Input
|
||||
143: 6(int) Constant 16909060
|
||||
144(gl_PrimitiveCountNV): 131(ptr) Variable Output
|
||||
145: 6(int) Constant 96
|
||||
146: 9(ivec3) ConstantComposite 86 55 55
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(iid): 7(ptr) Variable Function
|
||||
16(gid): 7(ptr) Variable Function
|
||||
14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12
|
||||
15: 6(int) Load 14
|
||||
Store 8(iid) 15
|
||||
18: 13(ptr) AccessChain 17(gl_WorkGroupID) 12
|
||||
19: 6(int) Load 18
|
||||
Store 16(gid) 19
|
||||
35: 6(int) Load 8(iid)
|
||||
41: 40(ptr) AccessChain 34(gl_MeshVerticesNV) 35 37
|
||||
Store 41 39
|
||||
42: 6(int) Load 8(iid)
|
||||
46: 45(ptr) AccessChain 34(gl_MeshVerticesNV) 42 43
|
||||
Store 46 44
|
||||
47: 6(int) Load 8(iid)
|
||||
51: 45(ptr) AccessChain 34(gl_MeshVerticesNV) 47 48 49
|
||||
Store 51 50
|
||||
52: 6(int) Load 8(iid)
|
||||
54: 45(ptr) AccessChain 34(gl_MeshVerticesNV) 52 49 48
|
||||
Store 54 53
|
||||
MemoryBarrier 55 56
|
||||
ControlBarrier 57 57 56
|
||||
58: 6(int) Load 8(iid)
|
||||
59: 6(int) IAdd 58 55
|
||||
60: 6(int) Load 8(iid)
|
||||
61: 40(ptr) AccessChain 34(gl_MeshVerticesNV) 60 37
|
||||
62: 21(fvec4) Load 61
|
||||
63: 40(ptr) AccessChain 34(gl_MeshVerticesNV) 59 37
|
||||
Store 63 62
|
||||
64: 6(int) Load 8(iid)
|
||||
65: 6(int) IAdd 64 55
|
||||
66: 6(int) Load 8(iid)
|
||||
67: 45(ptr) AccessChain 34(gl_MeshVerticesNV) 66 43
|
||||
68: 20(float) Load 67
|
||||
69: 45(ptr) AccessChain 34(gl_MeshVerticesNV) 65 43
|
||||
Store 69 68
|
||||
70: 6(int) Load 8(iid)
|
||||
71: 6(int) IAdd 70 55
|
||||
72: 6(int) Load 8(iid)
|
||||
73: 45(ptr) AccessChain 34(gl_MeshVerticesNV) 72 48 49
|
||||
74: 20(float) Load 73
|
||||
75: 45(ptr) AccessChain 34(gl_MeshVerticesNV) 71 48 49
|
||||
Store 75 74
|
||||
76: 6(int) Load 8(iid)
|
||||
77: 6(int) IAdd 76 55
|
||||
78: 6(int) Load 8(iid)
|
||||
79: 45(ptr) AccessChain 34(gl_MeshVerticesNV) 78 49 48
|
||||
80: 20(float) Load 79
|
||||
81: 45(ptr) AccessChain 34(gl_MeshVerticesNV) 77 49 48
|
||||
Store 81 80
|
||||
MemoryBarrier 55 56
|
||||
ControlBarrier 57 57 56
|
||||
90: 6(int) Load 8(iid)
|
||||
93: 92(ptr) AccessChain 89(gl_MeshPrimitivesNV) 90 37
|
||||
Store 93 91
|
||||
94: 6(int) Load 8(iid)
|
||||
96: 92(ptr) AccessChain 89(gl_MeshPrimitivesNV) 94 43
|
||||
Store 96 95
|
||||
97: 6(int) Load 8(iid)
|
||||
99: 92(ptr) AccessChain 89(gl_MeshPrimitivesNV) 97 48
|
||||
Store 99 98
|
||||
100: 6(int) Load 8(iid)
|
||||
102: 92(ptr) AccessChain 89(gl_MeshPrimitivesNV) 100 49 37
|
||||
Store 102 101
|
||||
MemoryBarrier 55 56
|
||||
ControlBarrier 57 57 56
|
||||
103: 6(int) Load 8(iid)
|
||||
104: 6(int) IAdd 103 55
|
||||
105: 6(int) Load 8(iid)
|
||||
106: 92(ptr) AccessChain 89(gl_MeshPrimitivesNV) 105 37
|
||||
107: 36(int) Load 106
|
||||
108: 92(ptr) AccessChain 89(gl_MeshPrimitivesNV) 104 37
|
||||
Store 108 107
|
||||
109: 6(int) Load 8(iid)
|
||||
110: 6(int) IAdd 109 55
|
||||
111: 6(int) Load 8(iid)
|
||||
112: 92(ptr) AccessChain 89(gl_MeshPrimitivesNV) 111 43
|
||||
113: 36(int) Load 112
|
||||
114: 92(ptr) AccessChain 89(gl_MeshPrimitivesNV) 110 43
|
||||
Store 114 113
|
||||
115: 6(int) Load 8(iid)
|
||||
116: 6(int) IAdd 115 55
|
||||
117: 6(int) Load 8(iid)
|
||||
118: 92(ptr) AccessChain 89(gl_MeshPrimitivesNV) 117 48
|
||||
119: 36(int) Load 118
|
||||
120: 92(ptr) AccessChain 89(gl_MeshPrimitivesNV) 116 48
|
||||
Store 120 119
|
||||
121: 6(int) Load 8(iid)
|
||||
122: 6(int) IAdd 121 55
|
||||
123: 6(int) Load 8(iid)
|
||||
124: 92(ptr) AccessChain 89(gl_MeshPrimitivesNV) 123 49 37
|
||||
125: 36(int) Load 124
|
||||
126: 92(ptr) AccessChain 89(gl_MeshPrimitivesNV) 122 49 37
|
||||
Store 126 125
|
||||
MemoryBarrier 55 56
|
||||
ControlBarrier 57 57 56
|
||||
132: 131(ptr) AccessChain 129(gl_PrimitiveIndicesNV) 37
|
||||
Store 132 130
|
||||
133: 6(int) Load 16(gid)
|
||||
134: 6(int) Load 16(gid)
|
||||
135: 6(int) ISub 134 55
|
||||
136: 131(ptr) AccessChain 129(gl_PrimitiveIndicesNV) 135
|
||||
137: 6(int) Load 136
|
||||
138: 131(ptr) AccessChain 129(gl_PrimitiveIndicesNV) 133
|
||||
Store 138 137
|
||||
141: 36(int) Load 140(gl_DrawID)
|
||||
142: 6(int) Bitcast 141
|
||||
143: 142 WritePackedPrimitiveIndices4x8NV
|
||||
Store 144(gl_PrimitiveCountNV) 145
|
||||
MemoryBarrier 55 56
|
||||
ControlBarrier 57 57 56
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,212 @@
|
|||
spv.meshShaderPerViewBuiltins.mesh
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 124
|
||||
|
||||
Capability MultiViewport
|
||||
Capability PerViewAttributesNV
|
||||
Capability MeshShadingNV
|
||||
Extension "SPV_NVX_multiview_per_view_attributes"
|
||||
Extension "SPV_NV_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MeshNV 4 "main" 11 20 21 38 70
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
ExecutionMode 4 OutputVertices 81
|
||||
ExecutionMode 4 OutputPrimitivesNV 32
|
||||
ExecutionMode 4 OutputTrianglesNV
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_NV_mesh_shader"
|
||||
Name 4 "main"
|
||||
Name 8 "iid"
|
||||
Name 11 "gl_LocalInvocationID"
|
||||
Name 16 "viewID"
|
||||
Name 20 "gl_MeshViewIndicesNV"
|
||||
Name 21 "gl_MeshViewCountNV"
|
||||
Name 34 "gl_MeshPerVertexNV"
|
||||
MemberName 34(gl_MeshPerVertexNV) 0 "gl_Position"
|
||||
MemberName 34(gl_MeshPerVertexNV) 1 "gl_PointSize"
|
||||
MemberName 34(gl_MeshPerVertexNV) 2 "gl_ClipDistance"
|
||||
MemberName 34(gl_MeshPerVertexNV) 3 "gl_CullDistance"
|
||||
MemberName 34(gl_MeshPerVertexNV) 4 "gl_PositionPerViewNV"
|
||||
MemberName 34(gl_MeshPerVertexNV) 5 "gl_ClipDistancePerViewNV"
|
||||
MemberName 34(gl_MeshPerVertexNV) 6 "gl_CullDistancePerViewNV"
|
||||
Name 38 "gl_MeshVerticesNV"
|
||||
Name 66 "gl_MeshPerPrimitiveNV"
|
||||
MemberName 66(gl_MeshPerPrimitiveNV) 0 "gl_PrimitiveID"
|
||||
MemberName 66(gl_MeshPerPrimitiveNV) 1 "gl_Layer"
|
||||
MemberName 66(gl_MeshPerPrimitiveNV) 2 "gl_ViewportIndex"
|
||||
MemberName 66(gl_MeshPerPrimitiveNV) 3 "gl_ViewportMask"
|
||||
MemberName 66(gl_MeshPerPrimitiveNV) 4 "gl_LayerPerViewNV"
|
||||
MemberName 66(gl_MeshPerPrimitiveNV) 5 "gl_ViewportMaskPerViewNV"
|
||||
Name 70 "gl_MeshPrimitivesNV"
|
||||
Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||
Decorate 20(gl_MeshViewIndicesNV) BuiltIn MeshViewIndicesNV
|
||||
Decorate 21(gl_MeshViewCountNV) BuiltIn MeshViewCountNV
|
||||
MemberDecorate 34(gl_MeshPerVertexNV) 0 BuiltIn Position
|
||||
MemberDecorate 34(gl_MeshPerVertexNV) 1 BuiltIn PointSize
|
||||
MemberDecorate 34(gl_MeshPerVertexNV) 2 BuiltIn ClipDistance
|
||||
MemberDecorate 34(gl_MeshPerVertexNV) 3 BuiltIn CullDistance
|
||||
MemberDecorate 34(gl_MeshPerVertexNV) 4 PerViewNV
|
||||
MemberDecorate 34(gl_MeshPerVertexNV) 4 BuiltIn PositionPerViewNV
|
||||
MemberDecorate 34(gl_MeshPerVertexNV) 5 PerViewNV
|
||||
MemberDecorate 34(gl_MeshPerVertexNV) 5 BuiltIn ClipDistancePerViewNV
|
||||
MemberDecorate 34(gl_MeshPerVertexNV) 6 PerViewNV
|
||||
MemberDecorate 34(gl_MeshPerVertexNV) 6 BuiltIn CullDistancePerViewNV
|
||||
Decorate 34(gl_MeshPerVertexNV) Block
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 0 PerPrimitiveNV
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 0 BuiltIn PrimitiveId
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 1 PerPrimitiveNV
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 1 BuiltIn Layer
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 2 PerPrimitiveNV
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 2 BuiltIn ViewportIndex
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 3 PerPrimitiveNV
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 3 BuiltIn ViewportMaskNV
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 4 PerPrimitiveNV
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 4 PerViewNV
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 4 BuiltIn LayerPerViewNV
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 5 PerPrimitiveNV
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 5 PerViewNV
|
||||
MemberDecorate 66(gl_MeshPerPrimitiveNV) 5 BuiltIn ViewportMaskPerViewNV
|
||||
Decorate 66(gl_MeshPerPrimitiveNV) Block
|
||||
Decorate 123 BuiltIn WorkgroupSize
|
||||
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_LocalInvocationID): 10(ptr) Variable Input
|
||||
12: 6(int) Constant 0
|
||||
13: TypePointer Input 6(int)
|
||||
17: 6(int) Constant 4
|
||||
18: TypeArray 6(int) 17
|
||||
19: TypePointer Input 18
|
||||
20(gl_MeshViewIndicesNV): 19(ptr) Variable Input
|
||||
21(gl_MeshViewCountNV): 13(ptr) Variable Input
|
||||
26: TypeFloat 32
|
||||
27: TypeVector 26(float) 4
|
||||
28: 6(int) Constant 1
|
||||
29: TypeArray 26(float) 28
|
||||
30: TypeArray 27(fvec4) 17
|
||||
31: 6(int) Constant 8
|
||||
32: TypeArray 26(float) 31
|
||||
33: TypeArray 32 17
|
||||
34(gl_MeshPerVertexNV): TypeStruct 27(fvec4) 26(float) 29 29 30 33 33
|
||||
35: 6(int) Constant 81
|
||||
36: TypeArray 34(gl_MeshPerVertexNV) 35
|
||||
37: TypePointer Output 36
|
||||
38(gl_MeshVerticesNV): 37(ptr) Variable Output
|
||||
40: TypeInt 32 1
|
||||
41: 40(int) Constant 4
|
||||
43: 26(float) Constant 1065353216
|
||||
44: 26(float) Constant 1073741824
|
||||
45: 26(float) Constant 1077936128
|
||||
46: 26(float) Constant 1082130432
|
||||
47: 27(fvec4) ConstantComposite 43 44 45 46
|
||||
48: TypePointer Output 27(fvec4)
|
||||
51: 40(int) Constant 5
|
||||
53: 40(int) Constant 2
|
||||
54: 26(float) Constant 1084227584
|
||||
55: TypePointer Output 26(float)
|
||||
58: 40(int) Constant 6
|
||||
60: 40(int) Constant 3
|
||||
61: 26(float) Constant 1086324736
|
||||
63: TypeArray 40(int) 28
|
||||
64: TypeArray 40(int) 17
|
||||
65: TypeArray 63 17
|
||||
66(gl_MeshPerPrimitiveNV): TypeStruct 40(int) 40(int) 40(int) 63 64 65
|
||||
67: 6(int) Constant 32
|
||||
68: TypeArray 66(gl_MeshPerPrimitiveNV) 67
|
||||
69: TypePointer Output 68
|
||||
70(gl_MeshPrimitivesNV): 69(ptr) Variable Output
|
||||
73: 40(int) Constant 7
|
||||
74: TypePointer Output 40(int)
|
||||
78: 40(int) Constant 0
|
||||
79: 40(int) Constant 8
|
||||
81: 6(int) Constant 264
|
||||
82: 6(int) Constant 2
|
||||
123: 9(ivec3) ConstantComposite 67 28 28
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(iid): 7(ptr) Variable Function
|
||||
16(viewID): 7(ptr) Variable Function
|
||||
14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12
|
||||
15: 6(int) Load 14
|
||||
Store 8(iid) 15
|
||||
22: 6(int) Load 21(gl_MeshViewCountNV)
|
||||
23: 6(int) UMod 22 17
|
||||
24: 13(ptr) AccessChain 20(gl_MeshViewIndicesNV) 23
|
||||
25: 6(int) Load 24
|
||||
Store 16(viewID) 25
|
||||
39: 6(int) Load 8(iid)
|
||||
42: 6(int) Load 16(viewID)
|
||||
49: 48(ptr) AccessChain 38(gl_MeshVerticesNV) 39 41 42
|
||||
Store 49 47
|
||||
50: 6(int) Load 8(iid)
|
||||
52: 6(int) Load 16(viewID)
|
||||
56: 55(ptr) AccessChain 38(gl_MeshVerticesNV) 50 51 52 53
|
||||
Store 56 54
|
||||
57: 6(int) Load 8(iid)
|
||||
59: 6(int) Load 16(viewID)
|
||||
62: 55(ptr) AccessChain 38(gl_MeshVerticesNV) 57 58 59 60
|
||||
Store 62 61
|
||||
71: 6(int) Load 8(iid)
|
||||
72: 6(int) Load 16(viewID)
|
||||
75: 74(ptr) AccessChain 70(gl_MeshPrimitivesNV) 71 41 72
|
||||
Store 75 73
|
||||
76: 6(int) Load 8(iid)
|
||||
77: 6(int) Load 16(viewID)
|
||||
80: 74(ptr) AccessChain 70(gl_MeshPrimitivesNV) 76 51 77 78
|
||||
Store 80 79
|
||||
MemoryBarrier 28 81
|
||||
ControlBarrier 82 82 81
|
||||
83: 6(int) Load 8(iid)
|
||||
84: 6(int) IAdd 83 28
|
||||
85: 6(int) Load 16(viewID)
|
||||
86: 6(int) Load 8(iid)
|
||||
87: 6(int) Load 16(viewID)
|
||||
88: 48(ptr) AccessChain 38(gl_MeshVerticesNV) 86 41 87
|
||||
89: 27(fvec4) Load 88
|
||||
90: 48(ptr) AccessChain 38(gl_MeshVerticesNV) 84 41 85
|
||||
Store 90 89
|
||||
91: 6(int) Load 8(iid)
|
||||
92: 6(int) IAdd 91 28
|
||||
93: 6(int) Load 16(viewID)
|
||||
94: 6(int) Load 8(iid)
|
||||
95: 6(int) Load 16(viewID)
|
||||
96: 55(ptr) AccessChain 38(gl_MeshVerticesNV) 94 51 95 53
|
||||
97: 26(float) Load 96
|
||||
98: 55(ptr) AccessChain 38(gl_MeshVerticesNV) 92 51 93 53
|
||||
Store 98 97
|
||||
99: 6(int) Load 8(iid)
|
||||
100: 6(int) IAdd 99 28
|
||||
101: 6(int) Load 16(viewID)
|
||||
102: 6(int) Load 8(iid)
|
||||
103: 6(int) Load 16(viewID)
|
||||
104: 55(ptr) AccessChain 38(gl_MeshVerticesNV) 102 58 103 60
|
||||
105: 26(float) Load 104
|
||||
106: 55(ptr) AccessChain 38(gl_MeshVerticesNV) 100 58 101 60
|
||||
Store 106 105
|
||||
107: 6(int) Load 8(iid)
|
||||
108: 6(int) IAdd 107 28
|
||||
109: 6(int) Load 16(viewID)
|
||||
110: 6(int) Load 8(iid)
|
||||
111: 6(int) Load 16(viewID)
|
||||
112: 74(ptr) AccessChain 70(gl_MeshPrimitivesNV) 110 41 111
|
||||
113: 40(int) Load 112
|
||||
114: 74(ptr) AccessChain 70(gl_MeshPrimitivesNV) 108 41 109
|
||||
Store 114 113
|
||||
115: 6(int) Load 8(iid)
|
||||
116: 6(int) IAdd 115 28
|
||||
117: 6(int) Load 16(viewID)
|
||||
118: 6(int) Load 8(iid)
|
||||
119: 6(int) Load 16(viewID)
|
||||
120: 74(ptr) AccessChain 70(gl_MeshPrimitivesNV) 118 51 119 78
|
||||
121: 40(int) Load 120
|
||||
122: 74(ptr) AccessChain 70(gl_MeshPrimitivesNV) 116 51 117 78
|
||||
Store 122 121
|
||||
MemoryBarrier 28 81
|
||||
ControlBarrier 82 82 81
|
||||
Return
|
||||
FunctionEnd
|
156
3rdparty/glslang/Test/baseResults/spv.meshShaderPerViewUserDefined.mesh.out
vendored
Normal file
156
3rdparty/glslang/Test/baseResults/spv.meshShaderPerViewUserDefined.mesh.out
vendored
Normal file
|
@ -0,0 +1,156 @@
|
|||
spv.meshShaderPerViewUserDefined.mesh
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 90
|
||||
|
||||
Capability MeshShadingNV
|
||||
Extension "SPV_NV_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MeshNV 4 "main" 11 20 21 35 67
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
ExecutionMode 4 OutputVertices 81
|
||||
ExecutionMode 4 OutputPrimitivesNV 32
|
||||
ExecutionMode 4 OutputTrianglesNV
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_NV_mesh_shader"
|
||||
Name 4 "main"
|
||||
Name 8 "iid"
|
||||
Name 11 "gl_LocalInvocationID"
|
||||
Name 16 "viewID"
|
||||
Name 20 "gl_MeshViewIndicesNV"
|
||||
Name 21 "gl_MeshViewCountNV"
|
||||
Name 31 "block"
|
||||
MemberName 31(block) 0 "color1"
|
||||
MemberName 31(block) 1 "color2"
|
||||
MemberName 31(block) 2 "color3"
|
||||
MemberName 31(block) 3 "color4"
|
||||
Name 35 "b"
|
||||
Name 64 "perviewBlock"
|
||||
MemberName 64(perviewBlock) 0 "color5"
|
||||
MemberName 64(perviewBlock) 1 "color6"
|
||||
MemberName 64(perviewBlock) 2 "color7"
|
||||
MemberName 64(perviewBlock) 3 "color8"
|
||||
Name 67 "b2"
|
||||
Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||
Decorate 20(gl_MeshViewIndicesNV) BuiltIn MeshViewIndicesNV
|
||||
Decorate 21(gl_MeshViewCountNV) BuiltIn MeshViewCountNV
|
||||
MemberDecorate 31(block) 0 PerPrimitiveNV
|
||||
MemberDecorate 31(block) 0 PerViewNV
|
||||
MemberDecorate 31(block) 1 PerPrimitiveNV
|
||||
MemberDecorate 31(block) 2 PerViewNV
|
||||
Decorate 31(block) Block
|
||||
Decorate 35(b) Location 0
|
||||
MemberDecorate 64(perviewBlock) 0 PerPrimitiveNV
|
||||
MemberDecorate 64(perviewBlock) 0 PerViewNV
|
||||
MemberDecorate 64(perviewBlock) 1 PerPrimitiveNV
|
||||
MemberDecorate 64(perviewBlock) 1 PerViewNV
|
||||
MemberDecorate 64(perviewBlock) 2 PerViewNV
|
||||
MemberDecorate 64(perviewBlock) 3 PerViewNV
|
||||
Decorate 64(perviewBlock) Block
|
||||
Decorate 67(b2) Location 10
|
||||
Decorate 89 BuiltIn WorkgroupSize
|
||||
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_LocalInvocationID): 10(ptr) Variable Input
|
||||
12: 6(int) Constant 0
|
||||
13: TypePointer Input 6(int)
|
||||
17: 6(int) Constant 4
|
||||
18: TypeArray 6(int) 17
|
||||
19: TypePointer Input 18
|
||||
20(gl_MeshViewIndicesNV): 19(ptr) Variable Input
|
||||
21(gl_MeshViewCountNV): 13(ptr) Variable Input
|
||||
26: TypeFloat 32
|
||||
27: TypeVector 26(float) 4
|
||||
28: 6(int) Constant 3
|
||||
29: TypeArray 27(fvec4) 28
|
||||
30: TypeArray 29 17
|
||||
31(block): TypeStruct 30 29 30 27(fvec4)
|
||||
32: 6(int) Constant 81
|
||||
33: TypeArray 31(block) 32
|
||||
34: TypePointer Output 33
|
||||
35(b): 34(ptr) Variable Output
|
||||
37: TypeInt 32 1
|
||||
38: 37(int) Constant 0
|
||||
40: 37(int) Constant 2
|
||||
41: 26(float) Constant 1065353216
|
||||
42: 27(fvec4) ConstantComposite 41 41 41 41
|
||||
43: TypePointer Output 27(fvec4)
|
||||
46: 37(int) Constant 1
|
||||
47: 26(float) Constant 1073741824
|
||||
48: 27(fvec4) ConstantComposite 47 47 47 47
|
||||
52: 26(float) Constant 1077936128
|
||||
53: 27(fvec4) ConstantComposite 52 52 52 52
|
||||
56: 37(int) Constant 3
|
||||
57: 26(float) Constant 1082130432
|
||||
58: 27(fvec4) ConstantComposite 57 57 57 57
|
||||
60: 6(int) Constant 1
|
||||
61: 6(int) Constant 264
|
||||
62: 6(int) Constant 2
|
||||
63: TypeArray 27(fvec4) 17
|
||||
64(perviewBlock): TypeStruct 63 30 30 63
|
||||
65: TypeArray 64(perviewBlock) 32
|
||||
66: TypePointer Output 65
|
||||
67(b2): 66(ptr) Variable Output
|
||||
70: 26(float) Constant 1084227584
|
||||
71: 27(fvec4) ConstantComposite 70 70 70 70
|
||||
75: 26(float) Constant 1086324736
|
||||
76: 27(fvec4) ConstantComposite 75 75 75 75
|
||||
80: 26(float) Constant 1088421888
|
||||
81: 27(fvec4) ConstantComposite 80 80 80 80
|
||||
85: 26(float) Constant 1090519040
|
||||
86: 27(fvec4) ConstantComposite 85 85 85 85
|
||||
88: 6(int) Constant 32
|
||||
89: 9(ivec3) ConstantComposite 88 60 60
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(iid): 7(ptr) Variable Function
|
||||
16(viewID): 7(ptr) Variable Function
|
||||
14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12
|
||||
15: 6(int) Load 14
|
||||
Store 8(iid) 15
|
||||
22: 6(int) Load 21(gl_MeshViewCountNV)
|
||||
23: 6(int) UMod 22 17
|
||||
24: 13(ptr) AccessChain 20(gl_MeshViewIndicesNV) 23
|
||||
25: 6(int) Load 24
|
||||
Store 16(viewID) 25
|
||||
36: 6(int) Load 8(iid)
|
||||
39: 6(int) Load 16(viewID)
|
||||
44: 43(ptr) AccessChain 35(b) 36 38 39 40
|
||||
Store 44 42
|
||||
45: 6(int) Load 8(iid)
|
||||
49: 43(ptr) AccessChain 35(b) 45 46 46
|
||||
Store 49 48
|
||||
50: 6(int) Load 8(iid)
|
||||
51: 6(int) Load 16(viewID)
|
||||
54: 43(ptr) AccessChain 35(b) 50 40 51 40
|
||||
Store 54 53
|
||||
55: 6(int) Load 8(iid)
|
||||
59: 43(ptr) AccessChain 35(b) 55 56
|
||||
Store 59 58
|
||||
MemoryBarrier 60 61
|
||||
ControlBarrier 62 62 61
|
||||
68: 6(int) Load 8(iid)
|
||||
69: 6(int) Load 16(viewID)
|
||||
72: 43(ptr) AccessChain 67(b2) 68 38 69
|
||||
Store 72 71
|
||||
73: 6(int) Load 8(iid)
|
||||
74: 6(int) Load 16(viewID)
|
||||
77: 43(ptr) AccessChain 67(b2) 73 46 74 46
|
||||
Store 77 76
|
||||
78: 6(int) Load 8(iid)
|
||||
79: 6(int) Load 16(viewID)
|
||||
82: 43(ptr) AccessChain 67(b2) 78 40 79 40
|
||||
Store 82 81
|
||||
83: 6(int) Load 8(iid)
|
||||
84: 6(int) Load 16(viewID)
|
||||
87: 43(ptr) AccessChain 67(b2) 83 56 84
|
||||
Store 87 86
|
||||
MemoryBarrier 60 61
|
||||
ControlBarrier 62 62 61
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,128 @@
|
|||
spv.meshShaderSharedMem.mesh
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 77
|
||||
|
||||
Capability StorageImageWriteWithoutFormat
|
||||
Capability MeshShadingNV
|
||||
Extension "SPV_NV_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MeshNV 4 "main" 11 17
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
ExecutionMode 4 OutputVertices 81
|
||||
ExecutionMode 4 OutputPrimitivesNV 32
|
||||
ExecutionMode 4 OutputTrianglesNV
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_NV_mesh_shader"
|
||||
Name 4 "main"
|
||||
Name 8 "iid"
|
||||
Name 11 "gl_LocalInvocationID"
|
||||
Name 16 "gid"
|
||||
Name 17 "gl_WorkGroupID"
|
||||
Name 20 "i"
|
||||
Name 34 "mem"
|
||||
Name 37 "block0"
|
||||
MemberName 37(block0) 0 "uni_value"
|
||||
Name 39 ""
|
||||
Name 55 "uni_image"
|
||||
Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||
Decorate 17(gl_WorkGroupID) BuiltIn WorkgroupId
|
||||
MemberDecorate 37(block0) 0 Offset 0
|
||||
Decorate 37(block0) Block
|
||||
Decorate 39 DescriptorSet 0
|
||||
Decorate 55(uni_image) DescriptorSet 0
|
||||
Decorate 55(uni_image) NonReadable
|
||||
Decorate 76 BuiltIn WorkgroupSize
|
||||
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_LocalInvocationID): 10(ptr) Variable Input
|
||||
12: 6(int) Constant 0
|
||||
13: TypePointer Input 6(int)
|
||||
17(gl_WorkGroupID): 10(ptr) Variable Input
|
||||
27: 6(int) Constant 10
|
||||
28: TypeBool
|
||||
30: TypeFloat 32
|
||||
31: TypeVector 30(float) 4
|
||||
32: TypeArray 31(fvec4) 27
|
||||
33: TypePointer Workgroup 32
|
||||
34(mem): 33(ptr) Variable Workgroup
|
||||
37(block0): TypeStruct 6(int)
|
||||
38: TypePointer Uniform 37(block0)
|
||||
39: 38(ptr) Variable Uniform
|
||||
40: TypeInt 32 1
|
||||
41: 40(int) Constant 0
|
||||
42: TypePointer Uniform 6(int)
|
||||
48: TypePointer Workgroup 31(fvec4)
|
||||
51: 40(int) Constant 1
|
||||
53: TypeImage 30(float) 2D nonsampled format:Unknown
|
||||
54: TypePointer UniformConstant 53
|
||||
55(uni_image): 54(ptr) Variable UniformConstant
|
||||
59: TypeVector 40(int) 2
|
||||
69: 6(int) Constant 1
|
||||
73: 6(int) Constant 264
|
||||
74: 6(int) Constant 2
|
||||
75: 6(int) Constant 32
|
||||
76: 9(ivec3) ConstantComposite 75 69 69
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(iid): 7(ptr) Variable Function
|
||||
16(gid): 7(ptr) Variable Function
|
||||
20(i): 7(ptr) Variable Function
|
||||
14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12
|
||||
15: 6(int) Load 14
|
||||
Store 8(iid) 15
|
||||
18: 13(ptr) AccessChain 17(gl_WorkGroupID) 12
|
||||
19: 6(int) Load 18
|
||||
Store 16(gid) 19
|
||||
Store 20(i) 12
|
||||
Branch 21
|
||||
21: Label
|
||||
LoopMerge 23 24 None
|
||||
Branch 25
|
||||
25: Label
|
||||
26: 6(int) Load 20(i)
|
||||
29: 28(bool) ULessThan 26 27
|
||||
BranchConditional 29 22 23
|
||||
22: Label
|
||||
35: 6(int) Load 20(i)
|
||||
36: 6(int) Load 20(i)
|
||||
43: 42(ptr) AccessChain 39 41
|
||||
44: 6(int) Load 43
|
||||
45: 6(int) IAdd 36 44
|
||||
46: 30(float) ConvertUToF 45
|
||||
47: 31(fvec4) CompositeConstruct 46 46 46 46
|
||||
49: 48(ptr) AccessChain 34(mem) 35
|
||||
Store 49 47
|
||||
Branch 24
|
||||
24: Label
|
||||
50: 6(int) Load 20(i)
|
||||
52: 6(int) IAdd 50 51
|
||||
Store 20(i) 52
|
||||
Branch 21
|
||||
23: Label
|
||||
56: 53 Load 55(uni_image)
|
||||
57: 6(int) Load 8(iid)
|
||||
58: 40(int) Bitcast 57
|
||||
60: 59(ivec2) CompositeConstruct 58 58
|
||||
61: 6(int) Load 16(gid)
|
||||
62: 48(ptr) AccessChain 34(mem) 61
|
||||
63: 31(fvec4) Load 62
|
||||
ImageWrite 56 60 63
|
||||
64: 53 Load 55(uni_image)
|
||||
65: 6(int) Load 8(iid)
|
||||
66: 40(int) Bitcast 65
|
||||
67: 59(ivec2) CompositeConstruct 66 66
|
||||
68: 6(int) Load 16(gid)
|
||||
70: 6(int) IAdd 68 69
|
||||
71: 48(ptr) AccessChain 34(mem) 70
|
||||
72: 31(fvec4) Load 71
|
||||
ImageWrite 64 67 72
|
||||
MemoryBarrier 69 73
|
||||
ControlBarrier 74 74 73
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,107 @@
|
|||
spv.meshShaderTaskMem.mesh
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 58
|
||||
|
||||
Capability MeshShadingNV
|
||||
Extension "SPV_NV_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MeshNV 4 "main" 11 22 30
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
ExecutionMode 4 OutputVertices 81
|
||||
ExecutionMode 4 OutputPrimitivesNV 32
|
||||
ExecutionMode 4 OutputTrianglesNV
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_NV_mesh_shader"
|
||||
Name 4 "main"
|
||||
Name 8 "iid"
|
||||
Name 11 "gl_LocalInvocationID"
|
||||
Name 18 "outBlock"
|
||||
MemberName 18(outBlock) 0 "gid5"
|
||||
MemberName 18(outBlock) 1 "gid6"
|
||||
Name 22 "myblk"
|
||||
Name 28 "taskBlock"
|
||||
MemberName 28(taskBlock) 0 "gid1"
|
||||
MemberName 28(taskBlock) 1 "gid2"
|
||||
Name 30 "mytask"
|
||||
Name 36 "bufferBlock"
|
||||
MemberName 36(bufferBlock) 0 "gid3"
|
||||
MemberName 36(bufferBlock) 1 "gid4"
|
||||
Name 38 "mybuf"
|
||||
Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||
Decorate 18(outBlock) Block
|
||||
Decorate 22(myblk) Location 0
|
||||
Decorate 27 ArrayStride 4
|
||||
MemberDecorate 28(taskBlock) 0 PerTaskNV
|
||||
MemberDecorate 28(taskBlock) 0 Offset 0
|
||||
MemberDecorate 28(taskBlock) 1 PerTaskNV
|
||||
MemberDecorate 28(taskBlock) 1 Offset 16
|
||||
Decorate 28(taskBlock) Block
|
||||
Decorate 35 ArrayStride 4
|
||||
MemberDecorate 36(bufferBlock) 0 Offset 0
|
||||
MemberDecorate 36(bufferBlock) 1 Offset 16
|
||||
Decorate 36(bufferBlock) BufferBlock
|
||||
Decorate 38(mybuf) DescriptorSet 0
|
||||
Decorate 57 BuiltIn WorkgroupSize
|
||||
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_LocalInvocationID): 10(ptr) Variable Input
|
||||
12: 6(int) Constant 0
|
||||
13: TypePointer Input 6(int)
|
||||
16: TypeFloat 32
|
||||
17: TypeVector 16(float) 4
|
||||
18(outBlock): TypeStruct 16(float) 17(fvec4)
|
||||
19: 6(int) Constant 81
|
||||
20: TypeArray 18(outBlock) 19
|
||||
21: TypePointer Output 20
|
||||
22(myblk): 21(ptr) Variable Output
|
||||
24: TypeInt 32 1
|
||||
25: 24(int) Constant 0
|
||||
26: 6(int) Constant 2
|
||||
27: TypeArray 16(float) 26
|
||||
28(taskBlock): TypeStruct 27 17(fvec4)
|
||||
29: TypePointer Input 28(taskBlock)
|
||||
30(mytask): 29(ptr) Variable Input
|
||||
31: 24(int) Constant 1
|
||||
32: TypePointer Input 16(float)
|
||||
35: TypeArray 16(float) 26
|
||||
36(bufferBlock): TypeStruct 35 17(fvec4)
|
||||
37: TypePointer Uniform 36(bufferBlock)
|
||||
38(mybuf): 37(ptr) Variable Uniform
|
||||
39: TypePointer Uniform 16(float)
|
||||
43: TypePointer Output 16(float)
|
||||
46: TypePointer Input 17(fvec4)
|
||||
49: TypePointer Uniform 17(fvec4)
|
||||
53: TypePointer Output 17(fvec4)
|
||||
55: 6(int) Constant 32
|
||||
56: 6(int) Constant 1
|
||||
57: 9(ivec3) ConstantComposite 55 56 56
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(iid): 7(ptr) Variable Function
|
||||
14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12
|
||||
15: 6(int) Load 14
|
||||
Store 8(iid) 15
|
||||
23: 6(int) Load 8(iid)
|
||||
33: 32(ptr) AccessChain 30(mytask) 25 31
|
||||
34: 16(float) Load 33
|
||||
40: 39(ptr) AccessChain 38(mybuf) 25 31
|
||||
41: 16(float) Load 40
|
||||
42: 16(float) FAdd 34 41
|
||||
44: 43(ptr) AccessChain 22(myblk) 23 25
|
||||
Store 44 42
|
||||
45: 6(int) Load 8(iid)
|
||||
47: 46(ptr) AccessChain 30(mytask) 31
|
||||
48: 17(fvec4) Load 47
|
||||
50: 49(ptr) AccessChain 38(mybuf) 31
|
||||
51: 17(fvec4) Load 50
|
||||
52: 17(fvec4) FAdd 48 51
|
||||
54: 53(ptr) AccessChain 22(myblk) 45 31
|
||||
Store 54 52
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,203 @@
|
|||
spv.meshShaderUserDefined.mesh
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 138
|
||||
|
||||
Capability MeshShadingNV
|
||||
Extension "SPV_NV_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MeshNV 4 "main" 11 17 34 101
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
ExecutionMode 4 OutputVertices 81
|
||||
ExecutionMode 4 OutputPrimitivesNV 32
|
||||
ExecutionMode 4 OutputTrianglesNV
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_NV_mesh_shader"
|
||||
Name 4 "main"
|
||||
Name 8 "iid"
|
||||
Name 11 "gl_LocalInvocationID"
|
||||
Name 16 "gid"
|
||||
Name 17 "gl_WorkGroupID"
|
||||
Name 30 "myblock"
|
||||
MemberName 30(myblock) 0 "f"
|
||||
MemberName 30(myblock) 1 "fArr"
|
||||
MemberName 30(myblock) 2 "pos"
|
||||
MemberName 30(myblock) 3 "posArr"
|
||||
MemberName 30(myblock) 4 "m"
|
||||
MemberName 30(myblock) 5 "mArr"
|
||||
Name 34 "blk"
|
||||
Name 97 "myblock2"
|
||||
MemberName 97(myblock2) 0 "f"
|
||||
MemberName 97(myblock2) 1 "pos"
|
||||
MemberName 97(myblock2) 2 "m"
|
||||
Name 101 "blk2"
|
||||
Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||
Decorate 17(gl_WorkGroupID) BuiltIn WorkgroupId
|
||||
MemberDecorate 30(myblock) 0 PerPrimitiveNV
|
||||
MemberDecorate 30(myblock) 1 PerPrimitiveNV
|
||||
MemberDecorate 30(myblock) 2 PerPrimitiveNV
|
||||
MemberDecorate 30(myblock) 3 PerPrimitiveNV
|
||||
MemberDecorate 30(myblock) 4 PerPrimitiveNV
|
||||
MemberDecorate 30(myblock) 5 PerPrimitiveNV
|
||||
Decorate 30(myblock) Block
|
||||
Decorate 34(blk) Location 0
|
||||
Decorate 97(myblock2) Block
|
||||
Decorate 101(blk2) Location 20
|
||||
Decorate 137 BuiltIn WorkgroupSize
|
||||
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_LocalInvocationID): 10(ptr) Variable Input
|
||||
12: 6(int) Constant 0
|
||||
13: TypePointer Input 6(int)
|
||||
17(gl_WorkGroupID): 10(ptr) Variable Input
|
||||
20: TypeFloat 32
|
||||
21: 6(int) Constant 4
|
||||
22: TypeArray 20(float) 21
|
||||
23: TypeVector 20(float) 3
|
||||
24: TypeVector 20(float) 4
|
||||
25: TypeArray 24(fvec4) 21
|
||||
26: TypeMatrix 24(fvec4) 4
|
||||
27: TypeMatrix 23(fvec3) 3
|
||||
28: 6(int) Constant 2
|
||||
29: TypeArray 27 28
|
||||
30(myblock): TypeStruct 20(float) 22 23(fvec3) 25 26 29
|
||||
31: 6(int) Constant 32
|
||||
32: TypeArray 30(myblock) 31
|
||||
33: TypePointer Output 32
|
||||
34(blk): 33(ptr) Variable Output
|
||||
36: TypeInt 32 1
|
||||
37: 36(int) Constant 0
|
||||
38: 20(float) Constant 1093664768
|
||||
39: TypePointer Output 20(float)
|
||||
42: 6(int) Constant 1
|
||||
44: 36(int) Constant 1
|
||||
52: 36(int) Constant 2
|
||||
53: 20(float) Constant 1096810496
|
||||
54: 20(float) Constant 1097859072
|
||||
55: 20(float) Constant 1095761920
|
||||
56: 23(fvec3) ConstantComposite 53 54 55
|
||||
57: TypePointer Output 23(fvec3)
|
||||
63: 36(int) Constant 3
|
||||
68: TypePointer Output 24(fvec4)
|
||||
74: 36(int) Constant 4
|
||||
75: 20(float) Constant 1098907648
|
||||
76: 24(fvec4) ConstantComposite 55 53 54 75
|
||||
81: 36(int) Constant 5
|
||||
84: 6(int) Constant 3
|
||||
91: 20(float) Constant 1099431936
|
||||
92: 20(float) Constant 1099956224
|
||||
93: 20(float) Constant 1100480512
|
||||
94: 23(fvec3) ConstantComposite 91 92 93
|
||||
96: 6(int) Constant 264
|
||||
97(myblock2): TypeStruct 20(float) 24(fvec4) 26
|
||||
98: 6(int) Constant 81
|
||||
99: TypeArray 97(myblock2) 98
|
||||
100: TypePointer Output 99
|
||||
101(blk2): 100(ptr) Variable Output
|
||||
107: 20(float) Constant 1101004800
|
||||
111: 20(float) Constant 1101529088
|
||||
112: 20(float) Constant 1102053376
|
||||
113: 20(float) Constant 1102577664
|
||||
114: 20(float) Constant 1103101952
|
||||
115: 24(fvec4) ConstantComposite 111 112 113 114
|
||||
127: 20(float) Constant 1105723392
|
||||
137: 9(ivec3) ConstantComposite 31 42 42
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(iid): 7(ptr) Variable Function
|
||||
16(gid): 7(ptr) Variable Function
|
||||
14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12
|
||||
15: 6(int) Load 14
|
||||
Store 8(iid) 15
|
||||
18: 13(ptr) AccessChain 17(gl_WorkGroupID) 12
|
||||
19: 6(int) Load 18
|
||||
Store 16(gid) 19
|
||||
35: 6(int) Load 8(iid)
|
||||
40: 39(ptr) AccessChain 34(blk) 35 37
|
||||
Store 40 38
|
||||
41: 6(int) Load 8(iid)
|
||||
43: 6(int) IAdd 41 42
|
||||
45: 6(int) Load 16(gid)
|
||||
46: 6(int) Load 8(iid)
|
||||
47: 39(ptr) AccessChain 34(blk) 46 37
|
||||
48: 20(float) Load 47
|
||||
49: 39(ptr) AccessChain 34(blk) 43 44 45
|
||||
Store 49 48
|
||||
50: 6(int) Load 8(iid)
|
||||
51: 6(int) UDiv 50 28
|
||||
58: 57(ptr) AccessChain 34(blk) 51 52
|
||||
59: 23(fvec3) Load 58
|
||||
60: 23(fvec3) VectorShuffle 59 56 5 3 4
|
||||
Store 58 60
|
||||
61: 6(int) Load 8(iid)
|
||||
62: 6(int) IMul 61 28
|
||||
64: 6(int) Load 8(iid)
|
||||
65: 6(int) UDiv 64 28
|
||||
66: 57(ptr) AccessChain 34(blk) 65 52
|
||||
67: 23(fvec3) Load 66
|
||||
69: 68(ptr) AccessChain 34(blk) 62 63 44
|
||||
70: 24(fvec4) Load 69
|
||||
71: 24(fvec4) VectorShuffle 70 67 0 4 5 6
|
||||
Store 69 71
|
||||
72: 6(int) Load 8(iid)
|
||||
73: 6(int) UDiv 72 21
|
||||
77: 68(ptr) AccessChain 34(blk) 73 74 52
|
||||
78: 24(fvec4) Load 77
|
||||
79: 24(fvec4) VectorShuffle 78 76 7 6 5 4
|
||||
Store 77 79
|
||||
80: 6(int) Load 8(iid)
|
||||
82: 6(int) Load 8(iid)
|
||||
83: 6(int) UDiv 82 21
|
||||
85: 39(ptr) AccessChain 34(blk) 83 74 52 84
|
||||
86: 20(float) Load 85
|
||||
87: 39(ptr) AccessChain 34(blk) 80 81 37 44 42
|
||||
Store 87 86
|
||||
88: 6(int) Load 8(iid)
|
||||
89: 6(int) IMul 88 21
|
||||
90: 6(int) Load 16(gid)
|
||||
95: 57(ptr) AccessChain 34(blk) 89 81 44 90
|
||||
Store 95 94
|
||||
MemoryBarrier 42 96
|
||||
ControlBarrier 28 28 96
|
||||
102: 6(int) Load 8(iid)
|
||||
103: 6(int) Load 8(iid)
|
||||
104: 6(int) ISub 103 42
|
||||
105: 39(ptr) AccessChain 101(blk2) 104 37
|
||||
106: 20(float) Load 105
|
||||
108: 20(float) FAdd 106 107
|
||||
109: 39(ptr) AccessChain 101(blk2) 102 37
|
||||
Store 109 108
|
||||
110: 6(int) Load 8(iid)
|
||||
116: 68(ptr) AccessChain 101(blk2) 110 44
|
||||
Store 116 115
|
||||
117: 6(int) Load 8(iid)
|
||||
118: 6(int) IAdd 117 42
|
||||
119: 6(int) Load 16(gid)
|
||||
120: 6(int) Load 8(iid)
|
||||
121: 68(ptr) AccessChain 101(blk2) 120 44
|
||||
122: 24(fvec4) Load 121
|
||||
123: 68(ptr) AccessChain 101(blk2) 118 52 119
|
||||
Store 123 122
|
||||
124: 6(int) Load 8(iid)
|
||||
125: 6(int) IAdd 124 42
|
||||
126: 6(int) Load 16(gid)
|
||||
128: 39(ptr) AccessChain 101(blk2) 125 52 126 28
|
||||
Store 128 127
|
||||
129: 6(int) Load 8(iid)
|
||||
130: 6(int) IAdd 129 28
|
||||
131: 6(int) Load 8(iid)
|
||||
132: 6(int) IAdd 131 42
|
||||
133: 6(int) Load 16(gid)
|
||||
134: 68(ptr) AccessChain 101(blk2) 132 52 133
|
||||
135: 24(fvec4) Load 134
|
||||
136: 68(ptr) AccessChain 101(blk2) 130 52 63
|
||||
Store 136 135
|
||||
MemoryBarrier 42 96
|
||||
ControlBarrier 28 28 96
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,172 @@
|
|||
spv.meshTaskShader.task
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 104
|
||||
|
||||
Capability StorageImageWriteWithoutFormat
|
||||
Capability MeshShadingNV
|
||||
Extension "SPV_NV_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint TaskNV 4 "main" 11 17 80 101
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_NV_mesh_shader"
|
||||
Name 4 "main"
|
||||
Name 8 "iid"
|
||||
Name 11 "gl_LocalInvocationID"
|
||||
Name 16 "gid"
|
||||
Name 17 "gl_WorkGroupID"
|
||||
Name 20 "i"
|
||||
Name 34 "mem"
|
||||
Name 37 "block0"
|
||||
MemberName 37(block0) 0 "uni_value"
|
||||
Name 39 ""
|
||||
Name 55 "uni_image"
|
||||
Name 78 "Task"
|
||||
MemberName 78(Task) 0 "dummy"
|
||||
MemberName 78(Task) 1 "submesh"
|
||||
Name 80 "mytask"
|
||||
Name 101 "gl_TaskCountNV"
|
||||
Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||
Decorate 17(gl_WorkGroupID) BuiltIn WorkgroupId
|
||||
MemberDecorate 37(block0) 0 Offset 0
|
||||
Decorate 37(block0) Block
|
||||
Decorate 39 DescriptorSet 0
|
||||
Decorate 55(uni_image) DescriptorSet 0
|
||||
Decorate 55(uni_image) Binding 0
|
||||
Decorate 55(uni_image) NonReadable
|
||||
Decorate 77 ArrayStride 8
|
||||
MemberDecorate 78(Task) 0 PerTaskNV
|
||||
MemberDecorate 78(Task) 0 Offset 0
|
||||
MemberDecorate 78(Task) 1 PerTaskNV
|
||||
MemberDecorate 78(Task) 1 Offset 8
|
||||
Decorate 78(Task) Block
|
||||
Decorate 101(gl_TaskCountNV) BuiltIn TaskCountNV
|
||||
Decorate 103 BuiltIn WorkgroupSize
|
||||
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_LocalInvocationID): 10(ptr) Variable Input
|
||||
12: 6(int) Constant 0
|
||||
13: TypePointer Input 6(int)
|
||||
17(gl_WorkGroupID): 10(ptr) Variable Input
|
||||
27: 6(int) Constant 10
|
||||
28: TypeBool
|
||||
30: TypeFloat 32
|
||||
31: TypeVector 30(float) 4
|
||||
32: TypeArray 31(fvec4) 27
|
||||
33: TypePointer Workgroup 32
|
||||
34(mem): 33(ptr) Variable Workgroup
|
||||
37(block0): TypeStruct 6(int)
|
||||
38: TypePointer Uniform 37(block0)
|
||||
39: 38(ptr) Variable Uniform
|
||||
40: TypeInt 32 1
|
||||
41: 40(int) Constant 0
|
||||
42: TypePointer Uniform 6(int)
|
||||
48: TypePointer Workgroup 31(fvec4)
|
||||
51: 40(int) Constant 1
|
||||
53: TypeImage 30(float) 2D nonsampled format:Unknown
|
||||
54: TypePointer UniformConstant 53
|
||||
55(uni_image): 54(ptr) Variable UniformConstant
|
||||
59: TypeVector 40(int) 2
|
||||
69: 6(int) Constant 1
|
||||
73: 6(int) Constant 264
|
||||
74: 6(int) Constant 2
|
||||
75: TypeVector 30(float) 2
|
||||
76: 6(int) Constant 3
|
||||
77: TypeArray 75(fvec2) 76
|
||||
78(Task): TypeStruct 75(fvec2) 77
|
||||
79: TypePointer Output 78(Task)
|
||||
80(mytask): 79(ptr) Variable Output
|
||||
81: 30(float) Constant 1106247680
|
||||
82: 30(float) Constant 1106771968
|
||||
83: 75(fvec2) ConstantComposite 81 82
|
||||
84: TypePointer Output 75(fvec2)
|
||||
86: 30(float) Constant 1107296256
|
||||
87: 30(float) Constant 1107558400
|
||||
88: 75(fvec2) ConstantComposite 86 87
|
||||
90: 30(float) Constant 1107820544
|
||||
91: 30(float) Constant 1108082688
|
||||
92: 75(fvec2) ConstantComposite 90 91
|
||||
94: 40(int) Constant 2
|
||||
100: TypePointer Output 6(int)
|
||||
101(gl_TaskCountNV): 100(ptr) Variable Output
|
||||
102: 6(int) Constant 32
|
||||
103: 9(ivec3) ConstantComposite 102 69 69
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(iid): 7(ptr) Variable Function
|
||||
16(gid): 7(ptr) Variable Function
|
||||
20(i): 7(ptr) Variable Function
|
||||
14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12
|
||||
15: 6(int) Load 14
|
||||
Store 8(iid) 15
|
||||
18: 13(ptr) AccessChain 17(gl_WorkGroupID) 12
|
||||
19: 6(int) Load 18
|
||||
Store 16(gid) 19
|
||||
Store 20(i) 12
|
||||
Branch 21
|
||||
21: Label
|
||||
LoopMerge 23 24 None
|
||||
Branch 25
|
||||
25: Label
|
||||
26: 6(int) Load 20(i)
|
||||
29: 28(bool) ULessThan 26 27
|
||||
BranchConditional 29 22 23
|
||||
22: Label
|
||||
35: 6(int) Load 20(i)
|
||||
36: 6(int) Load 20(i)
|
||||
43: 42(ptr) AccessChain 39 41
|
||||
44: 6(int) Load 43
|
||||
45: 6(int) IAdd 36 44
|
||||
46: 30(float) ConvertUToF 45
|
||||
47: 31(fvec4) CompositeConstruct 46 46 46 46
|
||||
49: 48(ptr) AccessChain 34(mem) 35
|
||||
Store 49 47
|
||||
Branch 24
|
||||
24: Label
|
||||
50: 6(int) Load 20(i)
|
||||
52: 6(int) IAdd 50 51
|
||||
Store 20(i) 52
|
||||
Branch 21
|
||||
23: Label
|
||||
56: 53 Load 55(uni_image)
|
||||
57: 6(int) Load 8(iid)
|
||||
58: 40(int) Bitcast 57
|
||||
60: 59(ivec2) CompositeConstruct 58 58
|
||||
61: 6(int) Load 16(gid)
|
||||
62: 48(ptr) AccessChain 34(mem) 61
|
||||
63: 31(fvec4) Load 62
|
||||
ImageWrite 56 60 63
|
||||
64: 53 Load 55(uni_image)
|
||||
65: 6(int) Load 8(iid)
|
||||
66: 40(int) Bitcast 65
|
||||
67: 59(ivec2) CompositeConstruct 66 66
|
||||
68: 6(int) Load 16(gid)
|
||||
70: 6(int) IAdd 68 69
|
||||
71: 48(ptr) AccessChain 34(mem) 70
|
||||
72: 31(fvec4) Load 71
|
||||
ImageWrite 64 67 72
|
||||
MemoryBarrier 69 73
|
||||
ControlBarrier 74 74 73
|
||||
85: 84(ptr) AccessChain 80(mytask) 41
|
||||
Store 85 83
|
||||
89: 84(ptr) AccessChain 80(mytask) 51 41
|
||||
Store 89 88
|
||||
93: 84(ptr) AccessChain 80(mytask) 51 51
|
||||
Store 93 92
|
||||
95: 6(int) Load 16(gid)
|
||||
96: 6(int) UMod 95 74
|
||||
97: 84(ptr) AccessChain 80(mytask) 51 96
|
||||
98: 75(fvec2) Load 97
|
||||
99: 84(ptr) AccessChain 80(mytask) 51 94
|
||||
Store 99 98
|
||||
MemoryBarrier 69 73
|
||||
ControlBarrier 74 74 73
|
||||
Store 101(gl_TaskCountNV) 76
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,849 @@
|
|||
spv.shaderImageFootprint.frag
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 622
|
||||
|
||||
Capability Shader
|
||||
Capability MinLod
|
||||
Capability Bad
|
||||
Extension "SPV_NV_shader_image_footprint"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 21 24 76 125 225 275 277 387
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_NV_shader_texture_footprint"
|
||||
Name 4 "main"
|
||||
Name 8 "result2D"
|
||||
MemberName 8(result2D) 0 "ret2D"
|
||||
MemberName 8(result2D) 1 "anchor2D"
|
||||
MemberName 8(result2D) 2 "offset2D"
|
||||
MemberName 8(result2D) 3 "mask2D"
|
||||
MemberName 8(result2D) 4 "lod2D"
|
||||
MemberName 8(result2D) 5 "granularity2D"
|
||||
Name 10 ""
|
||||
Name 17 "sample2D"
|
||||
Name 21 "P2"
|
||||
Name 24 "granularity"
|
||||
Name 28 "gl_TextureFootprint2DNV"
|
||||
MemberName 28(gl_TextureFootprint2DNV) 0 "anchor"
|
||||
MemberName 28(gl_TextureFootprint2DNV) 1 "offset"
|
||||
MemberName 28(gl_TextureFootprint2DNV) 2 "mask"
|
||||
MemberName 28(gl_TextureFootprint2DNV) 3 "lod"
|
||||
MemberName 28(gl_TextureFootprint2DNV) 4 "granularity"
|
||||
Name 30 "fp2D"
|
||||
Name 31 "ResType"
|
||||
Name 76 "bias"
|
||||
Name 78 "ResType"
|
||||
Name 125 "lodClamp"
|
||||
Name 128 "ResType"
|
||||
Name 178 "ResType"
|
||||
Name 225 "lod"
|
||||
Name 228 "ResType"
|
||||
Name 275 "dx"
|
||||
Name 277 "dy"
|
||||
Name 280 "ResType"
|
||||
Name 331 "ResType"
|
||||
Name 377 "result3D"
|
||||
MemberName 377(result3D) 0 "ret3D"
|
||||
MemberName 377(result3D) 1 "anchor3D"
|
||||
MemberName 377(result3D) 2 "offset3D"
|
||||
MemberName 377(result3D) 3 "mask3D"
|
||||
MemberName 377(result3D) 4 "lod3D"
|
||||
MemberName 377(result3D) 5 "granularity3D"
|
||||
Name 379 ""
|
||||
Name 383 "sample3D"
|
||||
Name 387 "P3"
|
||||
Name 390 "gl_TextureFootprint3DNV"
|
||||
MemberName 390(gl_TextureFootprint3DNV) 0 "anchor"
|
||||
MemberName 390(gl_TextureFootprint3DNV) 1 "offset"
|
||||
MemberName 390(gl_TextureFootprint3DNV) 2 "mask"
|
||||
MemberName 390(gl_TextureFootprint3DNV) 3 "lod"
|
||||
MemberName 390(gl_TextureFootprint3DNV) 4 "granularity"
|
||||
Name 392 "fp3D"
|
||||
Name 393 "ResType"
|
||||
Name 429 "ResType"
|
||||
Name 478 "ResType"
|
||||
Name 528 "ResType"
|
||||
Name 577 "ResType"
|
||||
MemberDecorate 8(result2D) 0 Offset 0
|
||||
MemberDecorate 8(result2D) 1 Offset 8
|
||||
MemberDecorate 8(result2D) 2 Offset 16
|
||||
MemberDecorate 8(result2D) 3 Offset 24
|
||||
MemberDecorate 8(result2D) 4 Offset 32
|
||||
MemberDecorate 8(result2D) 5 Offset 36
|
||||
Decorate 8(result2D) BufferBlock
|
||||
Decorate 10 DescriptorSet 0
|
||||
Decorate 17(sample2D) DescriptorSet 0
|
||||
Decorate 21(P2) Location 0
|
||||
Decorate 24(granularity) Flat
|
||||
Decorate 24(granularity) Location 3
|
||||
Decorate 76(bias) Location 9
|
||||
Decorate 125(lodClamp) Location 4
|
||||
Decorate 225(lod) Location 5
|
||||
Decorate 275(dx) Location 6
|
||||
Decorate 277(dy) Location 8
|
||||
MemberDecorate 377(result3D) 0 Offset 0
|
||||
MemberDecorate 377(result3D) 1 Offset 16
|
||||
MemberDecorate 377(result3D) 2 Offset 32
|
||||
MemberDecorate 377(result3D) 3 Offset 48
|
||||
MemberDecorate 377(result3D) 4 Offset 56
|
||||
MemberDecorate 377(result3D) 5 Offset 60
|
||||
Decorate 377(result3D) BufferBlock
|
||||
Decorate 379 DescriptorSet 0
|
||||
Decorate 383(sample3D) DescriptorSet 0
|
||||
Decorate 387(P3) Location 2
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 2
|
||||
8(result2D): TypeStruct 6(int) 7(ivec2) 7(ivec2) 7(ivec2) 6(int) 6(int)
|
||||
9: TypePointer Uniform 8(result2D)
|
||||
10: 9(ptr) Variable Uniform
|
||||
11: TypeInt 32 1
|
||||
12: 11(int) Constant 0
|
||||
13: TypeFloat 32
|
||||
14: TypeImage 13(float) 2D sampled format:Unknown
|
||||
15: TypeSampledImage 14
|
||||
16: TypePointer UniformConstant 15
|
||||
17(sample2D): 16(ptr) Variable UniformConstant
|
||||
19: TypeVector 13(float) 2
|
||||
20: TypePointer Input 19(fvec2)
|
||||
21(P2): 20(ptr) Variable Input
|
||||
23: TypePointer Input 11(int)
|
||||
24(granularity): 23(ptr) Variable Input
|
||||
26: TypeBool
|
||||
27: 26(bool) ConstantTrue
|
||||
28(gl_TextureFootprint2DNV): TypeStruct 7(ivec2) 7(ivec2) 7(ivec2) 6(int) 6(int)
|
||||
29: TypePointer Function 28(gl_TextureFootprint2DNV)
|
||||
31(ResType): TypeStruct 26(bool) 7(ivec2) 7(ivec2) 7(ivec2) 6(int) 6(int)
|
||||
34: TypePointer Function 7(ivec2)
|
||||
36: 11(int) Constant 1
|
||||
39: 11(int) Constant 2
|
||||
42: 11(int) Constant 3
|
||||
44: TypePointer Function 6(int)
|
||||
46: 11(int) Constant 4
|
||||
50: 6(int) Constant 1
|
||||
51: 6(int) Constant 0
|
||||
53: TypePointer Uniform 6(int)
|
||||
57: TypePointer Uniform 7(ivec2)
|
||||
68: 11(int) Constant 5
|
||||
75: TypePointer Input 13(float)
|
||||
76(bias): 75(ptr) Variable Input
|
||||
78(ResType): TypeStruct 26(bool) 7(ivec2) 7(ivec2) 7(ivec2) 6(int) 6(int)
|
||||
125(lodClamp): 75(ptr) Variable Input
|
||||
128(ResType): TypeStruct 26(bool) 7(ivec2) 7(ivec2) 7(ivec2) 6(int) 6(int)
|
||||
178(ResType): TypeStruct 26(bool) 7(ivec2) 7(ivec2) 7(ivec2) 6(int) 6(int)
|
||||
225(lod): 75(ptr) Variable Input
|
||||
228(ResType): TypeStruct 26(bool) 7(ivec2) 7(ivec2) 7(ivec2) 6(int) 6(int)
|
||||
275(dx): 20(ptr) Variable Input
|
||||
277(dy): 20(ptr) Variable Input
|
||||
280(ResType): TypeStruct 26(bool) 7(ivec2) 7(ivec2) 7(ivec2) 6(int) 6(int)
|
||||
331(ResType): TypeStruct 26(bool) 7(ivec2) 7(ivec2) 7(ivec2) 6(int) 6(int)
|
||||
376: TypeVector 6(int) 3
|
||||
377(result3D): TypeStruct 6(int) 376(ivec3) 376(ivec3) 7(ivec2) 6(int) 6(int)
|
||||
378: TypePointer Uniform 377(result3D)
|
||||
379: 378(ptr) Variable Uniform
|
||||
380: TypeImage 13(float) 3D sampled format:Unknown
|
||||
381: TypeSampledImage 380
|
||||
382: TypePointer UniformConstant 381
|
||||
383(sample3D): 382(ptr) Variable UniformConstant
|
||||
385: TypeVector 13(float) 3
|
||||
386: TypePointer Input 385(fvec3)
|
||||
387(P3): 386(ptr) Variable Input
|
||||
390(gl_TextureFootprint3DNV): TypeStruct 376(ivec3) 376(ivec3) 7(ivec2) 6(int) 6(int)
|
||||
391: TypePointer Function 390(gl_TextureFootprint3DNV)
|
||||
393(ResType): TypeStruct 26(bool) 376(ivec3) 376(ivec3) 7(ivec2) 6(int) 6(int)
|
||||
396: TypePointer Function 376(ivec3)
|
||||
411: TypePointer Uniform 376(ivec3)
|
||||
429(ResType): TypeStruct 26(bool) 376(ivec3) 376(ivec3) 7(ivec2) 6(int) 6(int)
|
||||
478(ResType): TypeStruct 26(bool) 376(ivec3) 376(ivec3) 7(ivec2) 6(int) 6(int)
|
||||
528(ResType): TypeStruct 26(bool) 376(ivec3) 376(ivec3) 7(ivec2) 6(int) 6(int)
|
||||
577(ResType): TypeStruct 26(bool) 376(ivec3) 376(ivec3) 7(ivec2) 6(int) 6(int)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
30(fp2D): 29(ptr) Variable Function
|
||||
392(fp3D): 391(ptr) Variable Function
|
||||
18: 15 Load 17(sample2D)
|
||||
22: 19(fvec2) Load 21(P2)
|
||||
25: 11(int) Load 24(granularity)
|
||||
32: 31(ResType) ImageSampleFootprintNV 18 22 25 27
|
||||
33: 7(ivec2) CompositeExtract 32 1
|
||||
35: 34(ptr) AccessChain 30(fp2D) 12
|
||||
Store 35 33
|
||||
37: 7(ivec2) CompositeExtract 32 2
|
||||
38: 34(ptr) AccessChain 30(fp2D) 36
|
||||
Store 38 37
|
||||
40: 7(ivec2) CompositeExtract 32 3
|
||||
41: 34(ptr) AccessChain 30(fp2D) 39
|
||||
Store 41 40
|
||||
43: 6(int) CompositeExtract 32 4
|
||||
45: 44(ptr) AccessChain 30(fp2D) 42
|
||||
Store 45 43
|
||||
47: 6(int) CompositeExtract 32 5
|
||||
48: 44(ptr) AccessChain 30(fp2D) 46
|
||||
Store 48 47
|
||||
49: 26(bool) CompositeExtract 32 0
|
||||
52: 6(int) Select 49 50 51
|
||||
54: 53(ptr) AccessChain 10 12
|
||||
Store 54 52
|
||||
55: 34(ptr) AccessChain 30(fp2D) 12
|
||||
56: 7(ivec2) Load 55
|
||||
58: 57(ptr) AccessChain 10 36
|
||||
Store 58 56
|
||||
59: 34(ptr) AccessChain 30(fp2D) 36
|
||||
60: 7(ivec2) Load 59
|
||||
61: 57(ptr) AccessChain 10 39
|
||||
Store 61 60
|
||||
62: 34(ptr) AccessChain 30(fp2D) 39
|
||||
63: 7(ivec2) Load 62
|
||||
64: 57(ptr) AccessChain 10 42
|
||||
Store 64 63
|
||||
65: 44(ptr) AccessChain 30(fp2D) 42
|
||||
66: 6(int) Load 65
|
||||
67: 53(ptr) AccessChain 10 46
|
||||
Store 67 66
|
||||
69: 44(ptr) AccessChain 30(fp2D) 46
|
||||
70: 6(int) Load 69
|
||||
71: 53(ptr) AccessChain 10 68
|
||||
Store 71 70
|
||||
72: 15 Load 17(sample2D)
|
||||
73: 19(fvec2) Load 21(P2)
|
||||
74: 11(int) Load 24(granularity)
|
||||
77: 13(float) Load 76(bias)
|
||||
79: 78(ResType) ImageSampleFootprintNV 72 73 74 27 Bias 77
|
||||
80: 7(ivec2) CompositeExtract 79 1
|
||||
81: 34(ptr) AccessChain 30(fp2D) 12
|
||||
Store 81 80
|
||||
82: 7(ivec2) CompositeExtract 79 2
|
||||
83: 34(ptr) AccessChain 30(fp2D) 36
|
||||
Store 83 82
|
||||
84: 7(ivec2) CompositeExtract 79 3
|
||||
85: 34(ptr) AccessChain 30(fp2D) 39
|
||||
Store 85 84
|
||||
86: 6(int) CompositeExtract 79 4
|
||||
87: 44(ptr) AccessChain 30(fp2D) 42
|
||||
Store 87 86
|
||||
88: 6(int) CompositeExtract 79 5
|
||||
89: 44(ptr) AccessChain 30(fp2D) 46
|
||||
Store 89 88
|
||||
90: 26(bool) CompositeExtract 79 0
|
||||
91: 6(int) Select 90 50 51
|
||||
92: 53(ptr) AccessChain 10 12
|
||||
Store 92 91
|
||||
93: 34(ptr) AccessChain 30(fp2D) 12
|
||||
94: 7(ivec2) Load 93
|
||||
95: 57(ptr) AccessChain 10 36
|
||||
96: 7(ivec2) Load 95
|
||||
97: 7(ivec2) IAdd 96 94
|
||||
98: 57(ptr) AccessChain 10 36
|
||||
Store 98 97
|
||||
99: 34(ptr) AccessChain 30(fp2D) 36
|
||||
100: 7(ivec2) Load 99
|
||||
101: 57(ptr) AccessChain 10 39
|
||||
102: 7(ivec2) Load 101
|
||||
103: 7(ivec2) IAdd 102 100
|
||||
104: 57(ptr) AccessChain 10 39
|
||||
Store 104 103
|
||||
105: 34(ptr) AccessChain 30(fp2D) 39
|
||||
106: 7(ivec2) Load 105
|
||||
107: 57(ptr) AccessChain 10 42
|
||||
108: 7(ivec2) Load 107
|
||||
109: 7(ivec2) IAdd 108 106
|
||||
110: 57(ptr) AccessChain 10 42
|
||||
Store 110 109
|
||||
111: 44(ptr) AccessChain 30(fp2D) 42
|
||||
112: 6(int) Load 111
|
||||
113: 53(ptr) AccessChain 10 46
|
||||
114: 6(int) Load 113
|
||||
115: 6(int) IAdd 114 112
|
||||
116: 53(ptr) AccessChain 10 46
|
||||
Store 116 115
|
||||
117: 44(ptr) AccessChain 30(fp2D) 46
|
||||
118: 6(int) Load 117
|
||||
119: 53(ptr) AccessChain 10 68
|
||||
120: 6(int) Load 119
|
||||
121: 6(int) IAdd 120 118
|
||||
122: 53(ptr) AccessChain 10 68
|
||||
Store 122 121
|
||||
123: 15 Load 17(sample2D)
|
||||
124: 19(fvec2) Load 21(P2)
|
||||
126: 13(float) Load 125(lodClamp)
|
||||
127: 11(int) Load 24(granularity)
|
||||
129:128(ResType) ImageSampleFootprintNV 123 124 127 27 MinLod 126
|
||||
130: 7(ivec2) CompositeExtract 129 1
|
||||
131: 34(ptr) AccessChain 30(fp2D) 12
|
||||
Store 131 130
|
||||
132: 7(ivec2) CompositeExtract 129 2
|
||||
133: 34(ptr) AccessChain 30(fp2D) 36
|
||||
Store 133 132
|
||||
134: 7(ivec2) CompositeExtract 129 3
|
||||
135: 34(ptr) AccessChain 30(fp2D) 39
|
||||
Store 135 134
|
||||
136: 6(int) CompositeExtract 129 4
|
||||
137: 44(ptr) AccessChain 30(fp2D) 42
|
||||
Store 137 136
|
||||
138: 6(int) CompositeExtract 129 5
|
||||
139: 44(ptr) AccessChain 30(fp2D) 46
|
||||
Store 139 138
|
||||
140: 26(bool) CompositeExtract 129 0
|
||||
141: 6(int) Select 140 50 51
|
||||
142: 53(ptr) AccessChain 10 12
|
||||
Store 142 141
|
||||
143: 34(ptr) AccessChain 30(fp2D) 12
|
||||
144: 7(ivec2) Load 143
|
||||
145: 57(ptr) AccessChain 10 36
|
||||
146: 7(ivec2) Load 145
|
||||
147: 7(ivec2) IAdd 146 144
|
||||
148: 57(ptr) AccessChain 10 36
|
||||
Store 148 147
|
||||
149: 34(ptr) AccessChain 30(fp2D) 36
|
||||
150: 7(ivec2) Load 149
|
||||
151: 57(ptr) AccessChain 10 39
|
||||
152: 7(ivec2) Load 151
|
||||
153: 7(ivec2) IAdd 152 150
|
||||
154: 57(ptr) AccessChain 10 39
|
||||
Store 154 153
|
||||
155: 34(ptr) AccessChain 30(fp2D) 39
|
||||
156: 7(ivec2) Load 155
|
||||
157: 57(ptr) AccessChain 10 42
|
||||
158: 7(ivec2) Load 157
|
||||
159: 7(ivec2) IAdd 158 156
|
||||
160: 57(ptr) AccessChain 10 42
|
||||
Store 160 159
|
||||
161: 44(ptr) AccessChain 30(fp2D) 42
|
||||
162: 6(int) Load 161
|
||||
163: 53(ptr) AccessChain 10 46
|
||||
164: 6(int) Load 163
|
||||
165: 6(int) IAdd 164 162
|
||||
166: 53(ptr) AccessChain 10 46
|
||||
Store 166 165
|
||||
167: 44(ptr) AccessChain 30(fp2D) 46
|
||||
168: 6(int) Load 167
|
||||
169: 53(ptr) AccessChain 10 68
|
||||
170: 6(int) Load 169
|
||||
171: 6(int) IAdd 170 168
|
||||
172: 53(ptr) AccessChain 10 68
|
||||
Store 172 171
|
||||
173: 15 Load 17(sample2D)
|
||||
174: 19(fvec2) Load 21(P2)
|
||||
175: 13(float) Load 125(lodClamp)
|
||||
176: 11(int) Load 24(granularity)
|
||||
177: 13(float) Load 76(bias)
|
||||
179:178(ResType) ImageSampleFootprintNV 173 174 176 27 Bias MinLod 177 175
|
||||
180: 7(ivec2) CompositeExtract 179 1
|
||||
181: 34(ptr) AccessChain 30(fp2D) 12
|
||||
Store 181 180
|
||||
182: 7(ivec2) CompositeExtract 179 2
|
||||
183: 34(ptr) AccessChain 30(fp2D) 36
|
||||
Store 183 182
|
||||
184: 7(ivec2) CompositeExtract 179 3
|
||||
185: 34(ptr) AccessChain 30(fp2D) 39
|
||||
Store 185 184
|
||||
186: 6(int) CompositeExtract 179 4
|
||||
187: 44(ptr) AccessChain 30(fp2D) 42
|
||||
Store 187 186
|
||||
188: 6(int) CompositeExtract 179 5
|
||||
189: 44(ptr) AccessChain 30(fp2D) 46
|
||||
Store 189 188
|
||||
190: 26(bool) CompositeExtract 179 0
|
||||
191: 6(int) Select 190 50 51
|
||||
192: 53(ptr) AccessChain 10 12
|
||||
Store 192 191
|
||||
193: 34(ptr) AccessChain 30(fp2D) 12
|
||||
194: 7(ivec2) Load 193
|
||||
195: 57(ptr) AccessChain 10 36
|
||||
196: 7(ivec2) Load 195
|
||||
197: 7(ivec2) IAdd 196 194
|
||||
198: 57(ptr) AccessChain 10 36
|
||||
Store 198 197
|
||||
199: 34(ptr) AccessChain 30(fp2D) 36
|
||||
200: 7(ivec2) Load 199
|
||||
201: 57(ptr) AccessChain 10 39
|
||||
202: 7(ivec2) Load 201
|
||||
203: 7(ivec2) IAdd 202 200
|
||||
204: 57(ptr) AccessChain 10 39
|
||||
Store 204 203
|
||||
205: 34(ptr) AccessChain 30(fp2D) 39
|
||||
206: 7(ivec2) Load 205
|
||||
207: 57(ptr) AccessChain 10 42
|
||||
208: 7(ivec2) Load 207
|
||||
209: 7(ivec2) IAdd 208 206
|
||||
210: 57(ptr) AccessChain 10 42
|
||||
Store 210 209
|
||||
211: 44(ptr) AccessChain 30(fp2D) 42
|
||||
212: 6(int) Load 211
|
||||
213: 53(ptr) AccessChain 10 46
|
||||
214: 6(int) Load 213
|
||||
215: 6(int) IAdd 214 212
|
||||
216: 53(ptr) AccessChain 10 46
|
||||
Store 216 215
|
||||
217: 44(ptr) AccessChain 30(fp2D) 46
|
||||
218: 6(int) Load 217
|
||||
219: 53(ptr) AccessChain 10 68
|
||||
220: 6(int) Load 219
|
||||
221: 6(int) IAdd 220 218
|
||||
222: 53(ptr) AccessChain 10 68
|
||||
Store 222 221
|
||||
223: 15 Load 17(sample2D)
|
||||
224: 19(fvec2) Load 21(P2)
|
||||
226: 13(float) Load 225(lod)
|
||||
227: 11(int) Load 24(granularity)
|
||||
229:228(ResType) ImageSampleFootprintNV 223 224 227 27 Lod 226
|
||||
230: 7(ivec2) CompositeExtract 229 1
|
||||
231: 34(ptr) AccessChain 30(fp2D) 12
|
||||
Store 231 230
|
||||
232: 7(ivec2) CompositeExtract 229 2
|
||||
233: 34(ptr) AccessChain 30(fp2D) 36
|
||||
Store 233 232
|
||||
234: 7(ivec2) CompositeExtract 229 3
|
||||
235: 34(ptr) AccessChain 30(fp2D) 39
|
||||
Store 235 234
|
||||
236: 6(int) CompositeExtract 229 4
|
||||
237: 44(ptr) AccessChain 30(fp2D) 42
|
||||
Store 237 236
|
||||
238: 6(int) CompositeExtract 229 5
|
||||
239: 44(ptr) AccessChain 30(fp2D) 46
|
||||
Store 239 238
|
||||
240: 26(bool) CompositeExtract 229 0
|
||||
241: 6(int) Select 240 50 51
|
||||
242: 53(ptr) AccessChain 10 12
|
||||
Store 242 241
|
||||
243: 34(ptr) AccessChain 30(fp2D) 12
|
||||
244: 7(ivec2) Load 243
|
||||
245: 57(ptr) AccessChain 10 36
|
||||
246: 7(ivec2) Load 245
|
||||
247: 7(ivec2) IAdd 246 244
|
||||
248: 57(ptr) AccessChain 10 36
|
||||
Store 248 247
|
||||
249: 34(ptr) AccessChain 30(fp2D) 36
|
||||
250: 7(ivec2) Load 249
|
||||
251: 57(ptr) AccessChain 10 39
|
||||
252: 7(ivec2) Load 251
|
||||
253: 7(ivec2) IAdd 252 250
|
||||
254: 57(ptr) AccessChain 10 39
|
||||
Store 254 253
|
||||
255: 34(ptr) AccessChain 30(fp2D) 39
|
||||
256: 7(ivec2) Load 255
|
||||
257: 57(ptr) AccessChain 10 42
|
||||
258: 7(ivec2) Load 257
|
||||
259: 7(ivec2) IAdd 258 256
|
||||
260: 57(ptr) AccessChain 10 42
|
||||
Store 260 259
|
||||
261: 44(ptr) AccessChain 30(fp2D) 42
|
||||
262: 6(int) Load 261
|
||||
263: 53(ptr) AccessChain 10 46
|
||||
264: 6(int) Load 263
|
||||
265: 6(int) IAdd 264 262
|
||||
266: 53(ptr) AccessChain 10 46
|
||||
Store 266 265
|
||||
267: 44(ptr) AccessChain 30(fp2D) 46
|
||||
268: 6(int) Load 267
|
||||
269: 53(ptr) AccessChain 10 68
|
||||
270: 6(int) Load 269
|
||||
271: 6(int) IAdd 270 268
|
||||
272: 53(ptr) AccessChain 10 68
|
||||
Store 272 271
|
||||
273: 15 Load 17(sample2D)
|
||||
274: 19(fvec2) Load 21(P2)
|
||||
276: 19(fvec2) Load 275(dx)
|
||||
278: 19(fvec2) Load 277(dy)
|
||||
279: 11(int) Load 24(granularity)
|
||||
281:280(ResType) ImageSampleFootprintNV 273 274 279 27 Grad 276 278
|
||||
282: 7(ivec2) CompositeExtract 281 1
|
||||
283: 34(ptr) AccessChain 30(fp2D) 12
|
||||
Store 283 282
|
||||
284: 7(ivec2) CompositeExtract 281 2
|
||||
285: 34(ptr) AccessChain 30(fp2D) 36
|
||||
Store 285 284
|
||||
286: 7(ivec2) CompositeExtract 281 3
|
||||
287: 34(ptr) AccessChain 30(fp2D) 39
|
||||
Store 287 286
|
||||
288: 6(int) CompositeExtract 281 4
|
||||
289: 44(ptr) AccessChain 30(fp2D) 42
|
||||
Store 289 288
|
||||
290: 6(int) CompositeExtract 281 5
|
||||
291: 44(ptr) AccessChain 30(fp2D) 46
|
||||
Store 291 290
|
||||
292: 26(bool) CompositeExtract 281 0
|
||||
293: 6(int) Select 292 50 51
|
||||
294: 53(ptr) AccessChain 10 12
|
||||
Store 294 293
|
||||
295: 34(ptr) AccessChain 30(fp2D) 12
|
||||
296: 7(ivec2) Load 295
|
||||
297: 57(ptr) AccessChain 10 36
|
||||
298: 7(ivec2) Load 297
|
||||
299: 7(ivec2) IAdd 298 296
|
||||
300: 57(ptr) AccessChain 10 36
|
||||
Store 300 299
|
||||
301: 34(ptr) AccessChain 30(fp2D) 36
|
||||
302: 7(ivec2) Load 301
|
||||
303: 57(ptr) AccessChain 10 39
|
||||
304: 7(ivec2) Load 303
|
||||
305: 7(ivec2) IAdd 304 302
|
||||
306: 57(ptr) AccessChain 10 39
|
||||
Store 306 305
|
||||
307: 34(ptr) AccessChain 30(fp2D) 39
|
||||
308: 7(ivec2) Load 307
|
||||
309: 57(ptr) AccessChain 10 42
|
||||
310: 7(ivec2) Load 309
|
||||
311: 7(ivec2) IAdd 310 308
|
||||
312: 57(ptr) AccessChain 10 42
|
||||
Store 312 311
|
||||
313: 44(ptr) AccessChain 30(fp2D) 42
|
||||
314: 6(int) Load 313
|
||||
315: 53(ptr) AccessChain 10 46
|
||||
316: 6(int) Load 315
|
||||
317: 6(int) IAdd 316 314
|
||||
318: 53(ptr) AccessChain 10 46
|
||||
Store 318 317
|
||||
319: 44(ptr) AccessChain 30(fp2D) 46
|
||||
320: 6(int) Load 319
|
||||
321: 53(ptr) AccessChain 10 68
|
||||
322: 6(int) Load 321
|
||||
323: 6(int) IAdd 322 320
|
||||
324: 53(ptr) AccessChain 10 68
|
||||
Store 324 323
|
||||
325: 15 Load 17(sample2D)
|
||||
326: 19(fvec2) Load 21(P2)
|
||||
327: 19(fvec2) Load 275(dx)
|
||||
328: 19(fvec2) Load 277(dy)
|
||||
329: 13(float) Load 125(lodClamp)
|
||||
330: 11(int) Load 24(granularity)
|
||||
332:331(ResType) ImageSampleFootprintNV 325 326 330 27 Grad MinLod 327 328 329
|
||||
333: 7(ivec2) CompositeExtract 332 1
|
||||
334: 34(ptr) AccessChain 30(fp2D) 12
|
||||
Store 334 333
|
||||
335: 7(ivec2) CompositeExtract 332 2
|
||||
336: 34(ptr) AccessChain 30(fp2D) 36
|
||||
Store 336 335
|
||||
337: 7(ivec2) CompositeExtract 332 3
|
||||
338: 34(ptr) AccessChain 30(fp2D) 39
|
||||
Store 338 337
|
||||
339: 6(int) CompositeExtract 332 4
|
||||
340: 44(ptr) AccessChain 30(fp2D) 42
|
||||
Store 340 339
|
||||
341: 6(int) CompositeExtract 332 5
|
||||
342: 44(ptr) AccessChain 30(fp2D) 46
|
||||
Store 342 341
|
||||
343: 26(bool) CompositeExtract 332 0
|
||||
344: 6(int) Select 343 50 51
|
||||
345: 53(ptr) AccessChain 10 12
|
||||
Store 345 344
|
||||
346: 34(ptr) AccessChain 30(fp2D) 12
|
||||
347: 7(ivec2) Load 346
|
||||
348: 57(ptr) AccessChain 10 36
|
||||
349: 7(ivec2) Load 348
|
||||
350: 7(ivec2) IAdd 349 347
|
||||
351: 57(ptr) AccessChain 10 36
|
||||
Store 351 350
|
||||
352: 34(ptr) AccessChain 30(fp2D) 36
|
||||
353: 7(ivec2) Load 352
|
||||
354: 57(ptr) AccessChain 10 39
|
||||
355: 7(ivec2) Load 354
|
||||
356: 7(ivec2) IAdd 355 353
|
||||
357: 57(ptr) AccessChain 10 39
|
||||
Store 357 356
|
||||
358: 34(ptr) AccessChain 30(fp2D) 39
|
||||
359: 7(ivec2) Load 358
|
||||
360: 57(ptr) AccessChain 10 42
|
||||
361: 7(ivec2) Load 360
|
||||
362: 7(ivec2) IAdd 361 359
|
||||
363: 57(ptr) AccessChain 10 42
|
||||
Store 363 362
|
||||
364: 44(ptr) AccessChain 30(fp2D) 42
|
||||
365: 6(int) Load 364
|
||||
366: 53(ptr) AccessChain 10 46
|
||||
367: 6(int) Load 366
|
||||
368: 6(int) IAdd 367 365
|
||||
369: 53(ptr) AccessChain 10 46
|
||||
Store 369 368
|
||||
370: 44(ptr) AccessChain 30(fp2D) 46
|
||||
371: 6(int) Load 370
|
||||
372: 53(ptr) AccessChain 10 68
|
||||
373: 6(int) Load 372
|
||||
374: 6(int) IAdd 373 371
|
||||
375: 53(ptr) AccessChain 10 68
|
||||
Store 375 374
|
||||
384: 381 Load 383(sample3D)
|
||||
388: 385(fvec3) Load 387(P3)
|
||||
389: 11(int) Load 24(granularity)
|
||||
394:393(ResType) ImageSampleFootprintNV 384 388 389 27
|
||||
395: 376(ivec3) CompositeExtract 394 1
|
||||
397: 396(ptr) AccessChain 392(fp3D) 12
|
||||
Store 397 395
|
||||
398: 376(ivec3) CompositeExtract 394 2
|
||||
399: 396(ptr) AccessChain 392(fp3D) 36
|
||||
Store 399 398
|
||||
400: 7(ivec2) CompositeExtract 394 3
|
||||
401: 34(ptr) AccessChain 392(fp3D) 39
|
||||
Store 401 400
|
||||
402: 6(int) CompositeExtract 394 4
|
||||
403: 44(ptr) AccessChain 392(fp3D) 42
|
||||
Store 403 402
|
||||
404: 6(int) CompositeExtract 394 5
|
||||
405: 44(ptr) AccessChain 392(fp3D) 46
|
||||
Store 405 404
|
||||
406: 26(bool) CompositeExtract 394 0
|
||||
407: 6(int) Select 406 50 51
|
||||
408: 53(ptr) AccessChain 379 12
|
||||
Store 408 407
|
||||
409: 396(ptr) AccessChain 392(fp3D) 12
|
||||
410: 376(ivec3) Load 409
|
||||
412: 411(ptr) AccessChain 379 36
|
||||
Store 412 410
|
||||
413: 396(ptr) AccessChain 392(fp3D) 36
|
||||
414: 376(ivec3) Load 413
|
||||
415: 411(ptr) AccessChain 379 39
|
||||
Store 415 414
|
||||
416: 34(ptr) AccessChain 392(fp3D) 39
|
||||
417: 7(ivec2) Load 416
|
||||
418: 57(ptr) AccessChain 379 42
|
||||
Store 418 417
|
||||
419: 44(ptr) AccessChain 392(fp3D) 42
|
||||
420: 6(int) Load 419
|
||||
421: 53(ptr) AccessChain 379 46
|
||||
Store 421 420
|
||||
422: 44(ptr) AccessChain 392(fp3D) 46
|
||||
423: 6(int) Load 422
|
||||
424: 53(ptr) AccessChain 379 68
|
||||
Store 424 423
|
||||
425: 381 Load 383(sample3D)
|
||||
426: 385(fvec3) Load 387(P3)
|
||||
427: 11(int) Load 24(granularity)
|
||||
428: 13(float) Load 76(bias)
|
||||
430:429(ResType) ImageSampleFootprintNV 425 426 427 27 Bias 428
|
||||
431: 376(ivec3) CompositeExtract 430 1
|
||||
432: 396(ptr) AccessChain 392(fp3D) 12
|
||||
Store 432 431
|
||||
433: 376(ivec3) CompositeExtract 430 2
|
||||
434: 396(ptr) AccessChain 392(fp3D) 36
|
||||
Store 434 433
|
||||
435: 7(ivec2) CompositeExtract 430 3
|
||||
436: 34(ptr) AccessChain 392(fp3D) 39
|
||||
Store 436 435
|
||||
437: 6(int) CompositeExtract 430 4
|
||||
438: 44(ptr) AccessChain 392(fp3D) 42
|
||||
Store 438 437
|
||||
439: 6(int) CompositeExtract 430 5
|
||||
440: 44(ptr) AccessChain 392(fp3D) 46
|
||||
Store 440 439
|
||||
441: 26(bool) CompositeExtract 430 0
|
||||
442: 6(int) Select 441 50 51
|
||||
443: 53(ptr) AccessChain 379 12
|
||||
Store 443 442
|
||||
444: 396(ptr) AccessChain 392(fp3D) 12
|
||||
445: 376(ivec3) Load 444
|
||||
446: 411(ptr) AccessChain 379 36
|
||||
447: 376(ivec3) Load 446
|
||||
448: 376(ivec3) IAdd 447 445
|
||||
449: 411(ptr) AccessChain 379 36
|
||||
Store 449 448
|
||||
450: 396(ptr) AccessChain 392(fp3D) 36
|
||||
451: 376(ivec3) Load 450
|
||||
452: 411(ptr) AccessChain 379 39
|
||||
453: 376(ivec3) Load 452
|
||||
454: 376(ivec3) IAdd 453 451
|
||||
455: 411(ptr) AccessChain 379 39
|
||||
Store 455 454
|
||||
456: 34(ptr) AccessChain 392(fp3D) 39
|
||||
457: 7(ivec2) Load 456
|
||||
458: 57(ptr) AccessChain 379 42
|
||||
459: 7(ivec2) Load 458
|
||||
460: 7(ivec2) IAdd 459 457
|
||||
461: 57(ptr) AccessChain 379 42
|
||||
Store 461 460
|
||||
462: 44(ptr) AccessChain 392(fp3D) 42
|
||||
463: 6(int) Load 462
|
||||
464: 53(ptr) AccessChain 379 46
|
||||
465: 6(int) Load 464
|
||||
466: 6(int) IAdd 465 463
|
||||
467: 53(ptr) AccessChain 379 46
|
||||
Store 467 466
|
||||
468: 44(ptr) AccessChain 392(fp3D) 46
|
||||
469: 6(int) Load 468
|
||||
470: 53(ptr) AccessChain 379 68
|
||||
471: 6(int) Load 470
|
||||
472: 6(int) IAdd 471 469
|
||||
473: 53(ptr) AccessChain 379 68
|
||||
Store 473 472
|
||||
474: 381 Load 383(sample3D)
|
||||
475: 385(fvec3) Load 387(P3)
|
||||
476: 13(float) Load 125(lodClamp)
|
||||
477: 11(int) Load 24(granularity)
|
||||
479:478(ResType) ImageSampleFootprintNV 474 475 477 27 MinLod 476
|
||||
480: 376(ivec3) CompositeExtract 479 1
|
||||
481: 396(ptr) AccessChain 392(fp3D) 12
|
||||
Store 481 480
|
||||
482: 376(ivec3) CompositeExtract 479 2
|
||||
483: 396(ptr) AccessChain 392(fp3D) 36
|
||||
Store 483 482
|
||||
484: 7(ivec2) CompositeExtract 479 3
|
||||
485: 34(ptr) AccessChain 392(fp3D) 39
|
||||
Store 485 484
|
||||
486: 6(int) CompositeExtract 479 4
|
||||
487: 44(ptr) AccessChain 392(fp3D) 42
|
||||
Store 487 486
|
||||
488: 6(int) CompositeExtract 479 5
|
||||
489: 44(ptr) AccessChain 392(fp3D) 46
|
||||
Store 489 488
|
||||
490: 26(bool) CompositeExtract 479 0
|
||||
491: 6(int) Select 490 50 51
|
||||
492: 53(ptr) AccessChain 379 12
|
||||
Store 492 491
|
||||
493: 396(ptr) AccessChain 392(fp3D) 12
|
||||
494: 376(ivec3) Load 493
|
||||
495: 411(ptr) AccessChain 379 36
|
||||
496: 376(ivec3) Load 495
|
||||
497: 376(ivec3) IAdd 496 494
|
||||
498: 411(ptr) AccessChain 379 36
|
||||
Store 498 497
|
||||
499: 396(ptr) AccessChain 392(fp3D) 36
|
||||
500: 376(ivec3) Load 499
|
||||
501: 411(ptr) AccessChain 379 39
|
||||
502: 376(ivec3) Load 501
|
||||
503: 376(ivec3) IAdd 502 500
|
||||
504: 411(ptr) AccessChain 379 39
|
||||
Store 504 503
|
||||
505: 34(ptr) AccessChain 392(fp3D) 39
|
||||
506: 7(ivec2) Load 505
|
||||
507: 57(ptr) AccessChain 379 42
|
||||
508: 7(ivec2) Load 507
|
||||
509: 7(ivec2) IAdd 508 506
|
||||
510: 57(ptr) AccessChain 379 42
|
||||
Store 510 509
|
||||
511: 44(ptr) AccessChain 392(fp3D) 42
|
||||
512: 6(int) Load 511
|
||||
513: 53(ptr) AccessChain 379 46
|
||||
514: 6(int) Load 513
|
||||
515: 6(int) IAdd 514 512
|
||||
516: 53(ptr) AccessChain 379 46
|
||||
Store 516 515
|
||||
517: 44(ptr) AccessChain 392(fp3D) 46
|
||||
518: 6(int) Load 517
|
||||
519: 53(ptr) AccessChain 379 68
|
||||
520: 6(int) Load 519
|
||||
521: 6(int) IAdd 520 518
|
||||
522: 53(ptr) AccessChain 379 68
|
||||
Store 522 521
|
||||
523: 381 Load 383(sample3D)
|
||||
524: 385(fvec3) Load 387(P3)
|
||||
525: 13(float) Load 125(lodClamp)
|
||||
526: 11(int) Load 24(granularity)
|
||||
527: 13(float) Load 76(bias)
|
||||
529:528(ResType) ImageSampleFootprintNV 523 524 526 27 Bias MinLod 527 525
|
||||
530: 376(ivec3) CompositeExtract 529 1
|
||||
531: 396(ptr) AccessChain 392(fp3D) 12
|
||||
Store 531 530
|
||||
532: 376(ivec3) CompositeExtract 529 2
|
||||
533: 396(ptr) AccessChain 392(fp3D) 36
|
||||
Store 533 532
|
||||
534: 7(ivec2) CompositeExtract 529 3
|
||||
535: 34(ptr) AccessChain 392(fp3D) 39
|
||||
Store 535 534
|
||||
536: 6(int) CompositeExtract 529 4
|
||||
537: 44(ptr) AccessChain 392(fp3D) 42
|
||||
Store 537 536
|
||||
538: 6(int) CompositeExtract 529 5
|
||||
539: 44(ptr) AccessChain 392(fp3D) 46
|
||||
Store 539 538
|
||||
540: 26(bool) CompositeExtract 529 0
|
||||
541: 6(int) Select 540 50 51
|
||||
542: 53(ptr) AccessChain 379 12
|
||||
Store 542 541
|
||||
543: 396(ptr) AccessChain 392(fp3D) 12
|
||||
544: 376(ivec3) Load 543
|
||||
545: 411(ptr) AccessChain 379 36
|
||||
546: 376(ivec3) Load 545
|
||||
547: 376(ivec3) IAdd 546 544
|
||||
548: 411(ptr) AccessChain 379 36
|
||||
Store 548 547
|
||||
549: 396(ptr) AccessChain 392(fp3D) 36
|
||||
550: 376(ivec3) Load 549
|
||||
551: 411(ptr) AccessChain 379 39
|
||||
552: 376(ivec3) Load 551
|
||||
553: 376(ivec3) IAdd 552 550
|
||||
554: 411(ptr) AccessChain 379 39
|
||||
Store 554 553
|
||||
555: 34(ptr) AccessChain 392(fp3D) 39
|
||||
556: 7(ivec2) Load 555
|
||||
557: 57(ptr) AccessChain 379 42
|
||||
558: 7(ivec2) Load 557
|
||||
559: 7(ivec2) IAdd 558 556
|
||||
560: 57(ptr) AccessChain 379 42
|
||||
Store 560 559
|
||||
561: 44(ptr) AccessChain 392(fp3D) 42
|
||||
562: 6(int) Load 561
|
||||
563: 53(ptr) AccessChain 379 46
|
||||
564: 6(int) Load 563
|
||||
565: 6(int) IAdd 564 562
|
||||
566: 53(ptr) AccessChain 379 46
|
||||
Store 566 565
|
||||
567: 44(ptr) AccessChain 392(fp3D) 46
|
||||
568: 6(int) Load 567
|
||||
569: 53(ptr) AccessChain 379 68
|
||||
570: 6(int) Load 569
|
||||
571: 6(int) IAdd 570 568
|
||||
572: 53(ptr) AccessChain 379 68
|
||||
Store 572 571
|
||||
573: 381 Load 383(sample3D)
|
||||
574: 385(fvec3) Load 387(P3)
|
||||
575: 13(float) Load 225(lod)
|
||||
576: 11(int) Load 24(granularity)
|
||||
578:577(ResType) ImageSampleFootprintNV 573 574 576 27 Lod 575
|
||||
579: 376(ivec3) CompositeExtract 578 1
|
||||
580: 396(ptr) AccessChain 392(fp3D) 12
|
||||
Store 580 579
|
||||
581: 376(ivec3) CompositeExtract 578 2
|
||||
582: 396(ptr) AccessChain 392(fp3D) 36
|
||||
Store 582 581
|
||||
583: 7(ivec2) CompositeExtract 578 3
|
||||
584: 34(ptr) AccessChain 392(fp3D) 39
|
||||
Store 584 583
|
||||
585: 6(int) CompositeExtract 578 4
|
||||
586: 44(ptr) AccessChain 392(fp3D) 42
|
||||
Store 586 585
|
||||
587: 6(int) CompositeExtract 578 5
|
||||
588: 44(ptr) AccessChain 392(fp3D) 46
|
||||
Store 588 587
|
||||
589: 26(bool) CompositeExtract 578 0
|
||||
590: 6(int) Select 589 50 51
|
||||
591: 53(ptr) AccessChain 379 12
|
||||
Store 591 590
|
||||
592: 396(ptr) AccessChain 392(fp3D) 12
|
||||
593: 376(ivec3) Load 592
|
||||
594: 411(ptr) AccessChain 379 36
|
||||
595: 376(ivec3) Load 594
|
||||
596: 376(ivec3) IAdd 595 593
|
||||
597: 411(ptr) AccessChain 379 36
|
||||
Store 597 596
|
||||
598: 396(ptr) AccessChain 392(fp3D) 36
|
||||
599: 376(ivec3) Load 598
|
||||
600: 411(ptr) AccessChain 379 39
|
||||
601: 376(ivec3) Load 600
|
||||
602: 376(ivec3) IAdd 601 599
|
||||
603: 411(ptr) AccessChain 379 39
|
||||
Store 603 602
|
||||
604: 34(ptr) AccessChain 392(fp3D) 39
|
||||
605: 7(ivec2) Load 604
|
||||
606: 57(ptr) AccessChain 379 42
|
||||
607: 7(ivec2) Load 606
|
||||
608: 7(ivec2) IAdd 607 605
|
||||
609: 57(ptr) AccessChain 379 42
|
||||
Store 609 608
|
||||
610: 44(ptr) AccessChain 392(fp3D) 42
|
||||
611: 6(int) Load 610
|
||||
612: 53(ptr) AccessChain 379 46
|
||||
613: 6(int) Load 612
|
||||
614: 6(int) IAdd 613 611
|
||||
615: 53(ptr) AccessChain 379 46
|
||||
Store 615 614
|
||||
616: 44(ptr) AccessChain 392(fp3D) 46
|
||||
617: 6(int) Load 616
|
||||
618: 53(ptr) AccessChain 379 68
|
||||
619: 6(int) Load 618
|
||||
620: 6(int) IAdd 619 617
|
||||
621: 53(ptr) AccessChain 379 68
|
||||
Store 621 620
|
||||
Return
|
||||
FunctionEnd
|
|
@ -0,0 +1,48 @@
|
|||
spv.shadingRate.frag
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 21
|
||||
|
||||
Capability Shader
|
||||
Capability ShadingRateNV
|
||||
Extension "SPV_NV_shading_rate"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 9 13 17 19
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_NV_shading_rate_image"
|
||||
Name 4 "main"
|
||||
Name 9 "FragmentSize"
|
||||
Name 13 "gl_FragmentSizeNV"
|
||||
Name 17 "InvocationsPerPixel"
|
||||
Name 19 "gl_InvocationsPerPixelNV"
|
||||
Decorate 9(FragmentSize) Location 0
|
||||
Decorate 13(gl_FragmentSizeNV) Flat
|
||||
Decorate 13(gl_FragmentSizeNV) BuiltIn FragmentSizeNV
|
||||
Decorate 17(InvocationsPerPixel) Location 2
|
||||
Decorate 19(gl_InvocationsPerPixelNV) Flat
|
||||
Decorate 19(gl_InvocationsPerPixelNV) BuiltIn InvocationsPerPixelNV
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 2
|
||||
8: TypePointer Output 7(fvec2)
|
||||
9(FragmentSize): 8(ptr) Variable Output
|
||||
10: TypeInt 32 1
|
||||
11: TypeVector 10(int) 2
|
||||
12: TypePointer Input 11(ivec2)
|
||||
13(gl_FragmentSizeNV): 12(ptr) Variable Input
|
||||
16: TypePointer Output 10(int)
|
||||
17(InvocationsPerPixel): 16(ptr) Variable Output
|
||||
18: TypePointer Input 10(int)
|
||||
19(gl_InvocationsPerPixelNV): 18(ptr) Variable Input
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
14: 11(ivec2) Load 13(gl_FragmentSizeNV)
|
||||
15: 7(fvec2) ConvertSToF 14
|
||||
Store 9(FragmentSize) 15
|
||||
20: 10(int) Load 19(gl_InvocationsPerPixelNV)
|
||||
Store 17(InvocationsPerPixel) 20
|
||||
Return
|
||||
FunctionEnd
|
|
@ -81,6 +81,15 @@ MaxTransformFeedbackInterleavedComponents 64
|
|||
MaxCullDistances 8
|
||||
MaxCombinedClipAndCullDistances 8
|
||||
MaxSamples 4
|
||||
MaxMeshOutputVerticesNV 256
|
||||
MaxMeshOutputPrimitivesNV 512
|
||||
MaxMeshWorkGroupSizeX_NV 32
|
||||
MaxMeshWorkGroupSizeY_NV 1
|
||||
MaxMeshWorkGroupSizeZ_NV 1
|
||||
MaxTaskWorkGroupSizeX_NV 32
|
||||
MaxTaskWorkGroupSizeY_NV 1
|
||||
MaxTaskWorkGroupSizeZ_NV 1
|
||||
MaxMeshViewCountNV 4
|
||||
nonInductiveForLoops 1
|
||||
whileLoops 1
|
||||
doWhileLoops 1
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
#version 460
|
||||
#extension GL_NVX_raytracing : enable
|
||||
layout(location = 1) rayPayloadInNVX vec4 incomingPayload;
|
||||
void main()
|
||||
{
|
||||
uvec2 v0 = gl_LaunchIDNVX;
|
||||
uvec2 v1 = gl_LaunchSizeNVX;
|
||||
int v2 = gl_PrimitiveID;
|
||||
int v3 = gl_InstanceID;
|
||||
int v4 = gl_InstanceCustomIndexNVX;
|
||||
vec3 v5 = gl_WorldRayOriginNVX;
|
||||
vec3 v6 = gl_WorldRayDirectionNVX;
|
||||
vec3 v7 = gl_ObjectRayOriginNVX;
|
||||
vec3 v8 = gl_ObjectRayDirectionNVX;
|
||||
float v9 = gl_RayTminNVX;
|
||||
float v10 = gl_RayTmaxNVX;
|
||||
float v11 = gl_HitTNVX;
|
||||
uint v12 = gl_HitKindNVX;
|
||||
mat4x3 v13 = gl_ObjectToWorldNVX;
|
||||
mat4x3 v14 = gl_WorldToObjectNVX;
|
||||
incomingPayload = vec4(0.5f);
|
||||
if (v2 == 1)
|
||||
ignoreIntersectionNVX();
|
||||
else
|
||||
terminateRayNVX();
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
#version 460
|
||||
#extension GL_NVX_raytracing : enable
|
||||
hitAttributeNVX vec4 payload;
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureNVX accNV;
|
||||
|
||||
void main()
|
||||
{
|
||||
payload.x = 1.0f; // ERROR, cannot write to hitattributeNVX in stage
|
||||
reportIntersectionNVX(1.0, 1U); // ERROR, unsupported builtin in stage
|
||||
traceNVX(accNV, 0, 0, 1, 1, 0, vec3(0.0f), 0.5f, vec3(1.0f), 0.75f, 0); // ERROR, unsupported builtin in stage
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
#version 460
|
||||
#extension GL_NVX_raytracing : enable
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureNVX accNV;
|
||||
layout(location = 0) rayPayloadNVX vec4 localPayload;
|
||||
layout(location = 1) rayPayloadInNVX vec4 incomingPayload;
|
||||
void main()
|
||||
{
|
||||
uvec2 v0 = gl_LaunchIDNVX;
|
||||
uvec2 v1 = gl_LaunchSizeNVX;
|
||||
int v2 = gl_PrimitiveID;
|
||||
int v3 = gl_InstanceID;
|
||||
int v4 = gl_InstanceCustomIndexNVX;
|
||||
vec3 v5 = gl_WorldRayOriginNVX;
|
||||
vec3 v6 = gl_WorldRayDirectionNVX;
|
||||
vec3 v7 = gl_ObjectRayOriginNVX;
|
||||
vec3 v8 = gl_ObjectRayDirectionNVX;
|
||||
float v9 = gl_RayTminNVX;
|
||||
float v10 = gl_RayTmaxNVX;
|
||||
float v11 = gl_HitTNVX;
|
||||
uint v12 = gl_HitKindNVX;
|
||||
mat4x3 v13 = gl_ObjectToWorldNVX;
|
||||
mat4x3 v14 = gl_WorldToObjectNVX;
|
||||
traceNVX(accNV, 0u, 1u, 2u, 3u, 0u, vec3(0.5f), 0.5f, vec3(1.0f), 0.75f, 1);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
#version 460
|
||||
#extension GL_NVX_raytracing : enable
|
||||
hitAttributeNVX vec4 payload;
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureNVX accNV;
|
||||
|
||||
void main()
|
||||
{
|
||||
payload.x = 1.0f; // ERROR, cannot write to hitattributeNVX in stage
|
||||
reportIntersectionNVX(1.0, 1U); // ERROR, unsupported builtin in stage
|
||||
terminateRayNVX();
|
||||
ignoreIntersectionNVX();
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
#version 460
|
||||
#extension GL_NVX_raytracing : enable
|
||||
hitAttributeNVX vec4 iAttr;
|
||||
void main()
|
||||
{
|
||||
uvec2 v0 = gl_LaunchIDNVX;
|
||||
uvec2 v1 = gl_LaunchSizeNVX;
|
||||
int v2 = gl_PrimitiveID;
|
||||
int v3 = gl_InstanceID;
|
||||
int v4 = gl_InstanceCustomIndexNVX;
|
||||
vec3 v5 = gl_WorldRayOriginNVX;
|
||||
vec3 v6 = gl_WorldRayDirectionNVX;
|
||||
vec3 v7 = gl_ObjectRayOriginNVX;
|
||||
vec3 v8 = gl_ObjectRayDirectionNVX;
|
||||
float v9 = gl_RayTminNVX;
|
||||
float v10 = gl_RayTmaxNVX;
|
||||
mat4x3 v11 = gl_ObjectToWorldNVX;
|
||||
mat4x3 v12 = gl_WorldToObjectNVX;
|
||||
iAttr = vec4(0.5f,0.5f,0.0f,1.0f);
|
||||
reportIntersectionNVX(0.5, 1U);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
#version 460
|
||||
#extension GL_NVX_raytracing : enable
|
||||
rayPayloadInNVX vec4 payloadIn; // ERROR, rayPayloadIn unsupported in this stage
|
||||
rayPayloadNVX vec4 payload; // ERROR, rayPayload unsuppoted in this stage
|
||||
uniform accelerationStructureNVX accNV;
|
||||
void main()
|
||||
{
|
||||
float e12 = gl_HitTNVX; // ERROR, unsupported builtin in stage
|
||||
float e13 = gl_HitKindNVX; // ERROR, unsupported builtin in stage
|
||||
traceNVX(accNV, 0, 0, 1, 1, 0, vec3(0.0f), 0.5f, vec3(1.0f), 0.75f, 0); // ERROR, unsupported
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
#version 460
|
||||
#extension GL_NVX_raytracing : enable
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureNVX accNV;
|
||||
layout(location = 0) rayPayloadNVX vec4 localPayload;
|
||||
layout(location = 1) rayPayloadInNVX vec4 incomingPayload;
|
||||
void main()
|
||||
{
|
||||
uvec2 v0 = gl_LaunchIDNVX;
|
||||
uvec2 v1 = gl_LaunchSizeNVX;
|
||||
vec3 v2 = gl_WorldRayOriginNVX;
|
||||
vec3 v3 = gl_WorldRayDirectionNVX;
|
||||
vec3 v4 = gl_ObjectRayOriginNVX;
|
||||
vec3 v5 = gl_ObjectRayDirectionNVX;
|
||||
float v6 = gl_RayTminNVX;
|
||||
float v7 = gl_RayTmaxNVX;
|
||||
traceNVX(accNV, 0u, 1u, 2u, 3u, 0u, vec3(0.5f), 0.5f, vec3(1.0f), 0.75f, 1);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
#version 460
|
||||
#extension GL_NVX_raytracing : enable
|
||||
hitAttributeNVX vec4 payload; // ERROR, hitattributeNVX 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_InstanceCustomIndexNVX; // ERROR, unsupported builtin in stage
|
||||
mat4x3 e10 = gl_ObjectToWorldNVX; // ERROR, unsupported builtin in stage
|
||||
mat4x3 e11 = gl_WorldToObjectNVX; // ERROR, unsupported builtin in stage
|
||||
float e12 = gl_HitTNVX; // ERROR, unsupported builtin in stage
|
||||
float e13 = gl_HitKindNVX; // ERROR, unsupported builtin in stage
|
||||
reportIntersectionNVX(1.0, 1U); // ERROR, unsupported builtin in stage
|
||||
ignoreIntersectionNVX(); // ERROR, unsupported builtin in stage
|
||||
terminateRayNVX(); // ERROR, unsupported builtin in stage
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
#version 460
|
||||
#extension GL_NVX_raytracing : enable
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureNVX accNV;
|
||||
layout(location = 0) rayPayloadNVX vec4 payload;
|
||||
void main()
|
||||
{
|
||||
const uint rayFlags = gl_RayFlagsNoneNVX | gl_RayFlagsOpaqueNVX |
|
||||
gl_RayFlagsNoOpaqueNVX | gl_RayFlagsTerminateOnFirstHitNVX |
|
||||
gl_RayFlagsSkipClosestHitShaderNVX | gl_RayFlagsCullBackFacingTrianglesNVX |
|
||||
gl_RayFlagsCullFrontFacingTrianglesNVX | gl_RayFlagsCullOpaqueNVX |
|
||||
gl_RayFlagsCullNoOpaqueNVX;
|
||||
|
||||
const int payloadId = 1;
|
||||
traceNVX(accNV, rayFlags, 0, 1, 1, 0, vec3(0.0f), 0.5f, vec3(1.0f), 0.75f, payloadId);
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
#version 460
|
||||
#extension GL_NVX_raytracing : enable
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureNVX accNV;
|
||||
layout(location = 0) rayPayloadNVX vec4 payload;
|
||||
layout(shaderRecordNVX) buffer block
|
||||
{
|
||||
float arr[4];
|
||||
vec4 pad;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
uint lx = gl_LaunchIDNVX.x;
|
||||
uint ly = gl_LaunchIDNVX.y;
|
||||
uint sx = gl_LaunchSizeNVX.x;
|
||||
uint sy = gl_LaunchSizeNVX.y;
|
||||
traceNVX(accNV, lx, ly, sx, sy, 0u, vec3(0.0f), 0.5f, vec3(1.0f), 0.75f, 1);
|
||||
arr[3] = 1.0f;
|
||||
pad = payload;
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
#version 460
|
||||
#extension GL_NVX_raytracing : enable
|
||||
hitAttributeNVX vec4 payload; // ERROR, hitattributeNVX unsupported in this stage
|
||||
rayPayloadInNVX vec4 payloadIn; // ERROR, rayPayloadIn unsupported in this stage
|
||||
layout(shaderRecordNVX) uniform ublock // ERROR, shaderRecordNVX unsupported on uniform blocks
|
||||
{
|
||||
float a;
|
||||
};
|
||||
layout(binding = 0, shaderRecordNVX) buffer bblock { // ERROR, binding unsupported on shaderRecordNVX blocks
|
||||
float b;
|
||||
};
|
||||
layout(set = 0, shaderRecordNVX) buffer bblock2 { // ERROR, set unsupported on shaderRecordNVX blocks
|
||||
float c;
|
||||
};
|
||||
layout(shaderRecordNVX) buffer bblock3 {
|
||||
float d;
|
||||
};
|
||||
layout(shaderRecordNVX) buffer bblock4 { // ERROR, cannot have more than one shaderRecordNVX block
|
||||
float e;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
accelerationStructureNVX a = 0;
|
||||
int e0 = gl_PrimitiveID; // ERROR, unsupported builtin in stage
|
||||
int e1 = gl_InstanceID; // ERROR, unsupported builtin in stage
|
||||
int e3 = gl_InstanceCustomIndexNVX; // ERROR, unsupported builtin in stage
|
||||
vec3 e4 = gl_WorldRayOriginNVX; // ERROR, unsupported builtin in stage
|
||||
vec3 e5 = gl_WorldRayDirectionNVX; // ERROR, unsupported builtin in stage
|
||||
vec3 e6 = gl_ObjectRayOriginNVX; // ERROR, unsupported builtin in stage
|
||||
vec3 e7 = gl_ObjectRayDirectionNVX; // ERROR, unsupported builtin in stage
|
||||
float e8 = gl_RayTminNVX; // ERROR, unsupported builtin in stage
|
||||
float e9 = gl_RayTmaxNVX; // ERROR, unsupported builtin in stage
|
||||
mat4x3 e10 = gl_ObjectToWorldNVX; // ERROR, unsupported builtin in stage
|
||||
mat4x3 e11 = gl_WorldToObjectNVX; // ERROR, unsupported builtin in stage
|
||||
float e12 = gl_HitTNVX; // ERROR, unsupported builtin in stage
|
||||
float e13 = gl_HitKindNVX; // ERROR, unsupported builtin in stage
|
||||
reportIntersectionNVX(1.0, 1U); // ERROR, unsupported builtin in stage
|
||||
ignoreIntersectionNVX(); // ERROR, unsupported builtin in stage
|
||||
terminateRayNVX(); // ERROR, unsupported builtin in stage
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
#version 450
|
||||
#extension GL_NV_compute_shader_derivatives : require
|
||||
|
||||
layout (local_size_x = 2, local_size_y = 4) in;
|
||||
layout(derivative_group_quadsNV) in;
|
||||
|
||||
buffer block {
|
||||
float fDerivativeX;
|
||||
float fDerivativeY;
|
||||
float fDerivativeWidth;
|
||||
float fCoarseDerivativeX;
|
||||
float fCoarseDerivativeY;
|
||||
float fCoarseDerivativeWidth;
|
||||
float fFineDerivativeX;
|
||||
float fFineDerivativeY;
|
||||
float fFineDerivativeWidth;
|
||||
|
||||
float fX;
|
||||
float fY;
|
||||
|
||||
|
||||
vec2 v2DerivativeX;
|
||||
vec2 v2DerivativeY;
|
||||
vec2 v2DerivativeWidth;
|
||||
vec2 v2CoarseDerivativeX;
|
||||
vec2 v2CoarseDerivativeY;
|
||||
vec2 v2CoarseDerivativeWidth;
|
||||
vec2 v2FineDerivativeX;
|
||||
vec2 v2FineDerivativeY;
|
||||
vec2 v2FineDerivativeWidth;
|
||||
|
||||
vec2 v2X;
|
||||
vec2 v2Y;
|
||||
|
||||
|
||||
vec3 v3DerivativeX;
|
||||
vec3 v3DerivativeY;
|
||||
vec3 v3DerivativeWidth;
|
||||
vec3 v3CoarseDerivativeX;
|
||||
vec3 v3CoarseDerivativeY;
|
||||
vec3 v3CoarseDerivativeWidth;
|
||||
vec3 v3FineDerivativeX;
|
||||
vec3 v3FineDerivativeY;
|
||||
vec3 v3FineDerivativeWidth;
|
||||
|
||||
vec3 v3X;
|
||||
vec3 v3Y;
|
||||
|
||||
|
||||
vec4 v4DerivativeX;
|
||||
vec4 v4DerivativeY;
|
||||
vec4 v4DerivativeWidth;
|
||||
vec4 v4CoarseDerivativeX;
|
||||
vec4 v4CoarseDerivativeY;
|
||||
vec4 v4CoarseDerivativeWidth;
|
||||
vec4 v4FineDerivativeX;
|
||||
vec4 v4FineDerivativeY;
|
||||
vec4 v4FineDerivativeWidth;
|
||||
|
||||
vec4 v4X;
|
||||
vec4 v4Y;
|
||||
};
|
||||
|
||||
void main(){
|
||||
fDerivativeX = dFdx(fX);
|
||||
fDerivativeY = dFdy(fY);
|
||||
fDerivativeWidth = fwidth(fX);
|
||||
fCoarseDerivativeX = dFdxCoarse(fX);
|
||||
fCoarseDerivativeY = dFdyCoarse(fY);
|
||||
fCoarseDerivativeWidth = fwidthCoarse(fX);
|
||||
fFineDerivativeX = dFdxFine(fX);
|
||||
fFineDerivativeY = dFdyFine(fY);
|
||||
fFineDerivativeWidth = fwidthFine(fX);
|
||||
|
||||
v2DerivativeX = dFdx(v2X);
|
||||
v2DerivativeY = dFdy(v2Y);
|
||||
v2DerivativeWidth = fwidth(v2X);
|
||||
v2CoarseDerivativeX = dFdxCoarse(v2X);
|
||||
v2CoarseDerivativeY = dFdyCoarse(v2Y);
|
||||
v2CoarseDerivativeWidth = fwidthCoarse(v2X);
|
||||
v2FineDerivativeX = dFdxFine(v2X);
|
||||
v2FineDerivativeY = dFdyFine(v2Y);
|
||||
v2FineDerivativeWidth = fwidthFine(v2X);
|
||||
|
||||
|
||||
v3DerivativeX = dFdx(v3X);
|
||||
v3DerivativeY = dFdy(v3Y);
|
||||
v3DerivativeWidth = fwidth(v3X);
|
||||
v3CoarseDerivativeX = dFdxCoarse(v3X);
|
||||
v3CoarseDerivativeY = dFdyCoarse(v3Y);
|
||||
v3CoarseDerivativeWidth = fwidthCoarse(v3X);
|
||||
v3FineDerivativeX = dFdxFine(v3X);
|
||||
v3FineDerivativeY = dFdyFine(v3Y);
|
||||
v3FineDerivativeWidth = fwidthFine(v3X);
|
||||
|
||||
|
||||
v4DerivativeX = dFdx(v4X);
|
||||
v4DerivativeY = dFdy(v4Y);
|
||||
v4DerivativeWidth = fwidth(v4X);
|
||||
v4CoarseDerivativeX = dFdxCoarse(v4X);
|
||||
v4CoarseDerivativeY = dFdyCoarse(v4Y);
|
||||
v4CoarseDerivativeWidth = fwidthCoarse(v4X);
|
||||
v4FineDerivativeX = dFdxFine(v4X);
|
||||
v4FineDerivativeY = dFdyFine(v4Y);
|
||||
v4FineDerivativeWidth = fwidthFine(v4X);
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
#version 320 es
|
||||
#extension GL_NV_compute_shader_derivatives : require
|
||||
|
||||
layout (local_size_x = 2, local_size_y = 4) in;
|
||||
layout(derivative_group_linearNV) in;
|
||||
|
||||
buffer block {
|
||||
float fDerivativeX;
|
||||
float fDerivativeY;
|
||||
float fDerivativeWidth;
|
||||
float fCoarseDerivativeX;
|
||||
float fCoarseDerivativeY;
|
||||
float fCoarseDerivativeWidth;
|
||||
float fFineDerivativeX;
|
||||
float fFineDerivativeY;
|
||||
float fFineDerivativeWidth;
|
||||
|
||||
float fX;
|
||||
float fY;
|
||||
|
||||
|
||||
vec2 v2DerivativeX;
|
||||
vec2 v2DerivativeY;
|
||||
vec2 v2DerivativeWidth;
|
||||
vec2 v2CoarseDerivativeX;
|
||||
vec2 v2CoarseDerivativeY;
|
||||
vec2 v2CoarseDerivativeWidth;
|
||||
vec2 v2FineDerivativeX;
|
||||
vec2 v2FineDerivativeY;
|
||||
vec2 v2FineDerivativeWidth;
|
||||
|
||||
vec2 v2X;
|
||||
vec2 v2Y;
|
||||
|
||||
|
||||
vec3 v3DerivativeX;
|
||||
vec3 v3DerivativeY;
|
||||
vec3 v3DerivativeWidth;
|
||||
vec3 v3CoarseDerivativeX;
|
||||
vec3 v3CoarseDerivativeY;
|
||||
vec3 v3CoarseDerivativeWidth;
|
||||
vec3 v3FineDerivativeX;
|
||||
vec3 v3FineDerivativeY;
|
||||
vec3 v3FineDerivativeWidth;
|
||||
|
||||
vec3 v3X;
|
||||
vec3 v3Y;
|
||||
|
||||
|
||||
vec4 v4DerivativeX;
|
||||
vec4 v4DerivativeY;
|
||||
vec4 v4DerivativeWidth;
|
||||
vec4 v4CoarseDerivativeX;
|
||||
vec4 v4CoarseDerivativeY;
|
||||
vec4 v4CoarseDerivativeWidth;
|
||||
vec4 v4FineDerivativeX;
|
||||
vec4 v4FineDerivativeY;
|
||||
vec4 v4FineDerivativeWidth;
|
||||
|
||||
vec4 v4X;
|
||||
vec4 v4Y;
|
||||
};
|
||||
|
||||
void main(){
|
||||
fDerivativeX = dFdx(fX);
|
||||
fDerivativeY = dFdy(fY);
|
||||
fDerivativeWidth = fwidth(fX);
|
||||
fCoarseDerivativeX = dFdxCoarse(fX);
|
||||
fCoarseDerivativeY = dFdyCoarse(fY);
|
||||
fCoarseDerivativeWidth = fwidthCoarse(fX);
|
||||
fFineDerivativeX = dFdxFine(fX);
|
||||
fFineDerivativeY = dFdyFine(fY);
|
||||
fFineDerivativeWidth = fwidthFine(fX);
|
||||
|
||||
v2DerivativeX = dFdx(v2X);
|
||||
v2DerivativeY = dFdy(v2Y);
|
||||
v2DerivativeWidth = fwidth(v2X);
|
||||
v2CoarseDerivativeX = dFdxCoarse(v2X);
|
||||
v2CoarseDerivativeY = dFdyCoarse(v2Y);
|
||||
v2CoarseDerivativeWidth = fwidthCoarse(v2X);
|
||||
v2FineDerivativeX = dFdxFine(v2X);
|
||||
v2FineDerivativeY = dFdyFine(v2Y);
|
||||
v2FineDerivativeWidth = fwidthFine(v2X);
|
||||
|
||||
|
||||
v3DerivativeX = dFdx(v3X);
|
||||
v3DerivativeY = dFdy(v3Y);
|
||||
v3DerivativeWidth = fwidth(v3X);
|
||||
v3CoarseDerivativeX = dFdxCoarse(v3X);
|
||||
v3CoarseDerivativeY = dFdyCoarse(v3Y);
|
||||
v3CoarseDerivativeWidth = fwidthCoarse(v3X);
|
||||
v3FineDerivativeX = dFdxFine(v3X);
|
||||
v3FineDerivativeY = dFdyFine(v3Y);
|
||||
v3FineDerivativeWidth = fwidthFine(v3X);
|
||||
|
||||
|
||||
v4DerivativeX = dFdx(v4X);
|
||||
v4DerivativeY = dFdy(v4Y);
|
||||
v4DerivativeWidth = fwidth(v4X);
|
||||
v4CoarseDerivativeX = dFdxCoarse(v4X);
|
||||
v4CoarseDerivativeY = dFdyCoarse(v4Y);
|
||||
v4CoarseDerivativeWidth = fwidthCoarse(v4X);
|
||||
v4FineDerivativeX = dFdxFine(v4X);
|
||||
v4FineDerivativeY = dFdyFine(v4Y);
|
||||
v4FineDerivativeWidth = fwidthFine(v4X);
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
#version 450
|
||||
#extension GL_NV_fragment_shader_barycentric : require
|
||||
|
||||
layout(location = 0) pervertexNV in vertices {
|
||||
float attrib;
|
||||
} v[];
|
||||
|
||||
layout(location = 1) out float value;
|
||||
|
||||
void main () {
|
||||
value = (gl_BaryCoordNV.x * v[0].attrib +
|
||||
gl_BaryCoordNV.y * v[1].attrib +
|
||||
gl_BaryCoordNV.z * v[2].attrib);
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
#version 320 es
|
||||
#extension GL_NV_fragment_shader_barycentric : require
|
||||
|
||||
precision highp float;
|
||||
|
||||
layout(location = 0) pervertexNV in float vertexIDs[3];
|
||||
|
||||
layout(location = 1) out float value;
|
||||
|
||||
void main () {
|
||||
value = (gl_BaryCoordNoPerspNV.x * vertexIDs[0] +
|
||||
gl_BaryCoordNoPerspNV.y * vertexIDs[1] +
|
||||
gl_BaryCoordNoPerspNV.z * vertexIDs[2]);
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
#version 460
|
||||
|
||||
#define MAX_VER 81
|
||||
#define MAX_PRIM 32
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_NV_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 32) in;
|
||||
|
||||
layout(max_vertices=MAX_VER) out;
|
||||
layout(max_primitives=MAX_PRIM) out;
|
||||
layout(triangles) out;
|
||||
|
||||
// test use of builtins in mesh shaders:
|
||||
|
||||
void main()
|
||||
{
|
||||
uint iid = gl_LocalInvocationID.x;
|
||||
uint gid = gl_WorkGroupID.x;
|
||||
|
||||
gl_MeshVerticesNV[iid].gl_Position = vec4(1.0);
|
||||
gl_MeshVerticesNV[iid].gl_PointSize = 2.0;
|
||||
gl_MeshVerticesNV[iid].gl_ClipDistance[3] = 3.0;
|
||||
gl_MeshVerticesNV[iid].gl_CullDistance[2] = 4.0;
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshVerticesNV[iid+1].gl_Position = gl_MeshVerticesNV[iid].gl_Position;
|
||||
gl_MeshVerticesNV[iid+1].gl_PointSize = gl_MeshVerticesNV[iid].gl_PointSize;
|
||||
gl_MeshVerticesNV[iid+1].gl_ClipDistance[3] = gl_MeshVerticesNV[iid].gl_ClipDistance[3];
|
||||
gl_MeshVerticesNV[iid+1].gl_CullDistance[2] = gl_MeshVerticesNV[iid].gl_CullDistance[2];
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshPrimitivesNV[iid].gl_PrimitiveID = 6;
|
||||
gl_MeshPrimitivesNV[iid].gl_Layer = 7;
|
||||
gl_MeshPrimitivesNV[iid].gl_ViewportIndex = 8;
|
||||
gl_MeshPrimitivesNV[iid].gl_ViewportMask[0] = 9;
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshPrimitivesNV[iid+1].gl_PrimitiveID = gl_MeshPrimitivesNV[iid].gl_PrimitiveID;
|
||||
gl_MeshPrimitivesNV[iid+1].gl_Layer = gl_MeshPrimitivesNV[iid].gl_Layer;
|
||||
gl_MeshPrimitivesNV[iid+1].gl_ViewportIndex = gl_MeshPrimitivesNV[iid].gl_ViewportIndex;
|
||||
gl_MeshPrimitivesNV[iid+1].gl_ViewportMask[0] = gl_MeshPrimitivesNV[iid].gl_ViewportMask[0];
|
||||
|
||||
BARRIER();
|
||||
|
||||
// should truncate 257 -> 1
|
||||
gl_PrimitiveIndicesNV[0] = 257;
|
||||
gl_PrimitiveIndicesNV[gid] = gl_PrimitiveIndicesNV[gid-1];
|
||||
|
||||
// writes 4 indices at offset gl_DrawID
|
||||
writePackedPrimitiveIndices4x8NV(gl_DrawID, 0x01020304);
|
||||
|
||||
gl_PrimitiveCountNV = MAX_PRIM * 3;
|
||||
|
||||
BARRIER();
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
#version 450
|
||||
|
||||
#define MAX_VER 81
|
||||
#define MAX_PRIM 32
|
||||
#define MAX_VIEWS gl_MaxMeshViewCountNV
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_NV_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 32) in;
|
||||
|
||||
layout(max_vertices=MAX_VER) out;
|
||||
layout(max_primitives=MAX_PRIM) out;
|
||||
layout(triangles) out;
|
||||
|
||||
// test use of per-view builtin attributes
|
||||
|
||||
void main()
|
||||
{
|
||||
uint iid = gl_LocalInvocationID.x;
|
||||
uint viewID = gl_MeshViewIndicesNV[gl_MeshViewCountNV%MAX_VIEWS];
|
||||
|
||||
gl_MeshVerticesNV[iid].gl_PositionPerViewNV[viewID] = vec4(1.0, 2.0, 3.0, 4.0);
|
||||
gl_MeshVerticesNV[iid].gl_ClipDistancePerViewNV[viewID][2] = 5.0;
|
||||
gl_MeshVerticesNV[iid].gl_CullDistancePerViewNV[viewID][3] = 6.0;
|
||||
gl_MeshPrimitivesNV[iid].gl_LayerPerViewNV[viewID] = 7;
|
||||
gl_MeshPrimitivesNV[iid].gl_ViewportMaskPerViewNV[viewID][0] = 8;
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshVerticesNV[iid+1].gl_PositionPerViewNV[viewID] = gl_MeshVerticesNV[iid].gl_PositionPerViewNV[viewID];
|
||||
gl_MeshVerticesNV[iid+1].gl_ClipDistancePerViewNV[viewID][2] = gl_MeshVerticesNV[iid].gl_ClipDistancePerViewNV[viewID][2];
|
||||
gl_MeshVerticesNV[iid+1].gl_CullDistancePerViewNV[viewID][3] = gl_MeshVerticesNV[iid].gl_CullDistancePerViewNV[viewID][3];
|
||||
gl_MeshPrimitivesNV[iid+1].gl_LayerPerViewNV[viewID] = gl_MeshPrimitivesNV[iid].gl_LayerPerViewNV[viewID];
|
||||
gl_MeshPrimitivesNV[iid+1].gl_ViewportMaskPerViewNV[viewID][0] = gl_MeshPrimitivesNV[iid].gl_ViewportMaskPerViewNV[viewID][0];
|
||||
|
||||
BARRIER();
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
#version 450
|
||||
|
||||
#define MAX_VER 81
|
||||
#define MAX_PRIM 32
|
||||
#define MAX_VIEWS gl_MaxMeshViewCountNV
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_NV_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 32) in;
|
||||
|
||||
layout(max_vertices=MAX_VER) out;
|
||||
layout(max_primitives=MAX_PRIM) out;
|
||||
layout(triangles) out;
|
||||
|
||||
// test use of user-defined per-view attributes
|
||||
|
||||
// mix of single-view and per-view attributes
|
||||
layout(location=0) out block {
|
||||
perprimitiveNV perviewNV vec4 color1[][3]; // Implicitly sized
|
||||
perprimitiveNV vec4 color2[3];
|
||||
perviewNV vec4 color3[MAX_VIEWS][3]; // Explicitly sized
|
||||
vec4 color4;
|
||||
} b[];
|
||||
|
||||
// per-view block
|
||||
perviewNV layout(location=10) out perviewBlock {
|
||||
perprimitiveNV vec4 color5[]; // Implicitly sized
|
||||
perprimitiveNV vec4 color6[MAX_VIEWS][3]; // Explicitly sized
|
||||
vec4 color7[][3]; // Implicitly sized
|
||||
vec4 color8[MAX_VIEWS]; // Explicitly sized
|
||||
} b2[];
|
||||
|
||||
void main()
|
||||
{
|
||||
uint iid = gl_LocalInvocationID.x;
|
||||
uint viewID = gl_MeshViewIndicesNV[gl_MeshViewCountNV%MAX_VIEWS];
|
||||
|
||||
b[iid].color1[viewID][2] = vec4(1.0);
|
||||
b[iid].color2[1] = vec4(2.0);
|
||||
b[iid].color3[viewID][2] = vec4(3.0);
|
||||
b[iid].color4 = vec4(4.0);
|
||||
|
||||
BARRIER();
|
||||
|
||||
b2[iid].color5[viewID] = vec4(5.0);
|
||||
b2[iid].color6[viewID][1] = vec4(6.0);
|
||||
b2[iid].color7[viewID][2] = vec4(7.0);
|
||||
b2[iid].color8[viewID] = vec4(8.0);
|
||||
|
||||
BARRIER();
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
#version 450
|
||||
|
||||
#define MAX_VER 81
|
||||
#define MAX_PRIM 32
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_NV_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 32) in;
|
||||
|
||||
layout(max_vertices=MAX_VER) out;
|
||||
layout(max_primitives=MAX_PRIM) out;
|
||||
layout(triangles) out;
|
||||
|
||||
// test use of shared memory in mesh shaders:
|
||||
|
||||
writeonly uniform image2D uni_image;
|
||||
uniform block0 {
|
||||
uint uni_value;
|
||||
};
|
||||
|
||||
shared vec4 mem[10];
|
||||
|
||||
void main()
|
||||
{
|
||||
uint iid = gl_LocalInvocationID.x;
|
||||
uint gid = gl_WorkGroupID.x;
|
||||
|
||||
for (uint i = 0; i < 10; ++i) {
|
||||
mem[i] = vec4(i+uni_value);
|
||||
}
|
||||
imageStore(uni_image, ivec2(iid), mem[gid]);
|
||||
imageStore(uni_image, ivec2(iid), mem[gid+1]);
|
||||
|
||||
BARRIER();
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
#version 450
|
||||
|
||||
#define MAX_VER 81
|
||||
#define MAX_PRIM 32
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_NV_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 32) in;
|
||||
|
||||
layout(max_vertices=MAX_VER) out;
|
||||
layout(max_primitives=MAX_PRIM) out;
|
||||
layout(triangles) out;
|
||||
|
||||
// test use of task memory in mesh shaders:
|
||||
|
||||
taskNV in taskBlock {
|
||||
float gid1[2];
|
||||
vec4 gid2;
|
||||
} mytask;
|
||||
|
||||
buffer bufferBlock {
|
||||
float gid3[2];
|
||||
vec4 gid4;
|
||||
} mybuf;
|
||||
|
||||
layout(location=0) out outBlock {
|
||||
float gid5;
|
||||
vec4 gid6;
|
||||
} myblk[];
|
||||
|
||||
void main()
|
||||
{
|
||||
uint iid = gl_LocalInvocationID.x;
|
||||
|
||||
myblk[iid].gid5 = mytask.gid1[1] + mybuf.gid3[1];
|
||||
myblk[iid].gid6 = mytask.gid2 + mybuf.gid4;
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
#version 450
|
||||
|
||||
#define MAX_VER 81
|
||||
#define MAX_PRIM 32
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_NV_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 32) in;
|
||||
|
||||
layout(max_vertices=MAX_VER) out;
|
||||
layout(max_primitives=MAX_PRIM) out;
|
||||
layout(triangles) out;
|
||||
|
||||
// test use of user defined interface out blocks:
|
||||
|
||||
// per-primitive block
|
||||
perprimitiveNV layout(location=0) out myblock {
|
||||
float f;
|
||||
float fArr[4];
|
||||
vec3 pos;
|
||||
vec4 posArr[4];
|
||||
mat4 m;
|
||||
mat3 mArr[2];
|
||||
} blk[];
|
||||
|
||||
// per-vertex block
|
||||
layout(location=20) out myblock2 {
|
||||
float f;
|
||||
vec4 pos;
|
||||
mat4 m;
|
||||
} blk2[];
|
||||
|
||||
void main()
|
||||
{
|
||||
uint iid = gl_LocalInvocationID.x;
|
||||
uint gid = gl_WorkGroupID.x;
|
||||
|
||||
blk[iid].f = 11.0;
|
||||
blk[iid+1].fArr[gid] = blk[iid].f;
|
||||
blk[iid/2].pos.yzx = vec3(14.0, 15.0, 13.0);
|
||||
blk[iid*2].posArr[1].yzw = blk[iid/2].pos;
|
||||
blk[iid/4].m[2].wzyx = vec4(13.0, 14.0, 15.0, 16.0);
|
||||
blk[iid].mArr[0][1][1] = blk[iid/4].m[2].w;
|
||||
blk[iid*4].mArr[1][gid] = vec3(17.0, 18.0, 19.0);
|
||||
|
||||
BARRIER();
|
||||
|
||||
blk2[iid].f = blk2[iid-1].f + 20.0;
|
||||
blk2[iid].pos = vec4(21.0, 22.0, 23.0, 24.0);
|
||||
blk2[iid+1].m[gid] = blk2[iid].pos;
|
||||
blk2[iid+1].m[gid][2] = 29.0;
|
||||
blk2[iid+2].m[3] = blk2[iid+1].m[gid];
|
||||
|
||||
BARRIER();
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
#version 450
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_NV_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 32) in;
|
||||
|
||||
// test use of shared memory in task shaders:
|
||||
layout(binding=0) writeonly uniform image2D uni_image;
|
||||
uniform block0 {
|
||||
uint uni_value;
|
||||
};
|
||||
shared vec4 mem[10];
|
||||
|
||||
// test use of task memory in task shaders:
|
||||
taskNV out Task {
|
||||
vec2 dummy;
|
||||
vec2 submesh[3];
|
||||
} mytask;
|
||||
|
||||
void main()
|
||||
{
|
||||
uint iid = gl_LocalInvocationID.x;
|
||||
uint gid = gl_WorkGroupID.x;
|
||||
|
||||
// 1. shared memory load and stores
|
||||
for (uint i = 0; i < 10; ++i) {
|
||||
mem[i] = vec4(i + uni_value);
|
||||
}
|
||||
imageStore(uni_image, ivec2(iid), mem[gid]);
|
||||
imageStore(uni_image, ivec2(iid), mem[gid+1]);
|
||||
|
||||
BARRIER();
|
||||
|
||||
// 2. task memory stores
|
||||
|
||||
mytask.dummy = vec2(30.0, 31.0);
|
||||
mytask.submesh[0] = vec2(32.0, 33.0);
|
||||
mytask.submesh[1] = vec2(34.0, 35.0);
|
||||
mytask.submesh[2] = mytask.submesh[gid%2];
|
||||
|
||||
BARRIER();
|
||||
|
||||
// 3. set task count
|
||||
gl_TaskCountNV = 3;
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
#version 450
|
||||
|
||||
#extension GL_NV_shader_texture_footprint : require
|
||||
|
||||
|
||||
layout (location = 0) in vec2 P2;
|
||||
layout (location = 2) in vec3 P3;
|
||||
layout (location = 3) in flat int granularity;
|
||||
layout (location = 4) in float lodClamp;
|
||||
layout (location = 5) in float lod;
|
||||
layout (location = 6) in vec2 dx;
|
||||
layout (location = 8) in vec2 dy;
|
||||
layout (location = 9) in float bias;
|
||||
|
||||
uniform sampler2D sample2D;
|
||||
uniform sampler3D sample3D;
|
||||
|
||||
buffer result2D {
|
||||
bool ret2D;
|
||||
uvec2 anchor2D;
|
||||
uvec2 offset2D;
|
||||
uvec2 mask2D;
|
||||
uint lod2D;
|
||||
uint granularity2D;
|
||||
};
|
||||
|
||||
buffer result3D {
|
||||
bool ret3D;
|
||||
uvec3 anchor3D;
|
||||
uvec3 offset3D;
|
||||
uvec2 mask3D;
|
||||
uint lod3D;
|
||||
uint granularity3D;
|
||||
};
|
||||
|
||||
void main() {
|
||||
gl_TextureFootprint2DNV fp2D;
|
||||
gl_TextureFootprint3DNV fp3D;
|
||||
|
||||
ret2D = textureFootprintNV(sample2D, P2, granularity, true, fp2D);
|
||||
anchor2D = fp2D.anchor;
|
||||
offset2D = fp2D.offset;
|
||||
mask2D = fp2D.mask;
|
||||
lod2D = fp2D.lod;
|
||||
granularity2D = fp2D.granularity;
|
||||
|
||||
ret2D = textureFootprintNV(sample2D, P2, granularity, true, fp2D, bias);
|
||||
anchor2D += fp2D.anchor;
|
||||
offset2D += fp2D.offset;
|
||||
mask2D += fp2D.mask;
|
||||
lod2D += fp2D.lod;
|
||||
granularity2D += fp2D.granularity;
|
||||
|
||||
ret2D = textureFootprintClampNV(sample2D, P2, lodClamp, granularity, true, fp2D);
|
||||
anchor2D += fp2D.anchor;
|
||||
offset2D += fp2D.offset;
|
||||
mask2D += fp2D.mask;
|
||||
lod2D += fp2D.lod;
|
||||
granularity2D += fp2D.granularity;
|
||||
|
||||
ret2D = textureFootprintClampNV(sample2D, P2, lodClamp, granularity, true, fp2D, bias);
|
||||
anchor2D += fp2D.anchor;
|
||||
offset2D += fp2D.offset;
|
||||
mask2D += fp2D.mask;
|
||||
lod2D += fp2D.lod;
|
||||
granularity2D += fp2D.granularity;
|
||||
|
||||
ret2D = textureFootprintLodNV(sample2D, P2, lod, granularity, true, fp2D);
|
||||
anchor2D += fp2D.anchor;
|
||||
offset2D += fp2D.offset;
|
||||
mask2D += fp2D.mask;
|
||||
lod2D += fp2D.lod;
|
||||
granularity2D += fp2D.granularity;
|
||||
|
||||
ret2D = textureFootprintGradNV(sample2D, P2, dx, dy, granularity, true, fp2D);
|
||||
anchor2D += fp2D.anchor;
|
||||
offset2D += fp2D.offset;
|
||||
mask2D += fp2D.mask;
|
||||
lod2D += fp2D.lod;
|
||||
granularity2D += fp2D.granularity;
|
||||
|
||||
ret2D = textureFootprintGradClampNV(sample2D, P2, dx, dy, lodClamp, granularity, true, fp2D);
|
||||
anchor2D += fp2D.anchor;
|
||||
offset2D += fp2D.offset;
|
||||
mask2D += fp2D.mask;
|
||||
lod2D += fp2D.lod;
|
||||
granularity2D += fp2D.granularity;
|
||||
|
||||
ret3D = textureFootprintNV(sample3D, P3, granularity, true, fp3D);
|
||||
anchor3D = fp3D.anchor;
|
||||
offset3D = fp3D.offset;
|
||||
mask3D = fp3D.mask;
|
||||
lod3D = fp3D.lod;
|
||||
granularity3D = fp3D.granularity;
|
||||
|
||||
ret3D = textureFootprintNV(sample3D, P3, granularity, true, fp3D, bias);
|
||||
anchor3D += fp3D.anchor;
|
||||
offset3D += fp3D.offset;
|
||||
mask3D += fp3D.mask;
|
||||
lod3D += fp3D.lod;
|
||||
granularity3D += fp3D.granularity;
|
||||
|
||||
ret3D = textureFootprintClampNV(sample3D, P3, lodClamp, granularity, true, fp3D);
|
||||
anchor3D += fp3D.anchor;
|
||||
offset3D += fp3D.offset;
|
||||
mask3D += fp3D.mask;
|
||||
lod3D += fp3D.lod;
|
||||
granularity3D += fp3D.granularity;
|
||||
|
||||
ret3D = textureFootprintClampNV(sample3D, P3, lodClamp, granularity, true, fp3D, bias);
|
||||
anchor3D += fp3D.anchor;
|
||||
offset3D += fp3D.offset;
|
||||
mask3D += fp3D.mask;
|
||||
lod3D += fp3D.lod;
|
||||
granularity3D += fp3D.granularity;
|
||||
|
||||
ret3D = textureFootprintLodNV(sample3D, P3, lod, granularity, true, fp3D);
|
||||
anchor3D += fp3D.anchor;
|
||||
offset3D += fp3D.offset;
|
||||
mask3D += fp3D.mask;
|
||||
lod3D += fp3D.lod;
|
||||
granularity3D += fp3D.granularity;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
#version 450
|
||||
|
||||
#extension GL_NV_shading_rate_image : require
|
||||
|
||||
layout (location = 0) out vec2 FragmentSize;
|
||||
layout (location = 2) out int InvocationsPerPixel;
|
||||
|
||||
void main () {
|
||||
FragmentSize = gl_FragmentSizeNV;
|
||||
InvocationsPerPixel = gl_InvocationsPerPixelNV;
|
||||
}
|
|
@ -62,6 +62,10 @@ enum TBasicType {
|
|||
EbtStruct,
|
||||
EbtBlock,
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
EbtAccStructNV,
|
||||
#endif
|
||||
|
||||
// HLSL types that live only temporarily.
|
||||
EbtString,
|
||||
|
||||
|
@ -88,6 +92,12 @@ enum TStorageQualifier {
|
|||
EvqBuffer, // read/write, shared with app
|
||||
EvqShared, // compute shader's read/write 'shared' qualifier
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
EvqPayloadNV,
|
||||
EvqPayloadInNV,
|
||||
EvqHitAttrNV,
|
||||
#endif
|
||||
|
||||
// parameters
|
||||
EvqIn, // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter
|
||||
EvqOut, // also, for 'out' in the grammar before we know if it's a pipeline output or an 'out' parameter
|
||||
|
@ -227,6 +237,32 @@ enum TBuiltInVariable {
|
|||
EbvPositionPerViewNV,
|
||||
EbvViewportMaskPerViewNV,
|
||||
EbvFragFullyCoveredNV,
|
||||
EbvFragmentSizeNV,
|
||||
EbvInvocationsPerPixelNV,
|
||||
// raytracing
|
||||
EbvLaunchIdNV,
|
||||
EbvLaunchSizeNV,
|
||||
EbvInstanceCustomIndexNV,
|
||||
EbvWorldRayOriginNV,
|
||||
EbvWorldRayDirectionNV,
|
||||
EbvObjectRayOriginNV,
|
||||
EbvObjectRayDirectionNV,
|
||||
EbvRayTminNV,
|
||||
EbvRayTmaxNV,
|
||||
EbvHitTNV,
|
||||
EbvHitKindNV,
|
||||
EbvObjectToWorldNV,
|
||||
EbvWorldToObjectNV,
|
||||
EbvBaryCoordNV,
|
||||
EbvBaryCoordNoPerspNV,
|
||||
EbvTaskCountNV,
|
||||
EbvPrimitiveCountNV,
|
||||
EbvPrimitiveIndicesNV,
|
||||
EbvClipDistancePerViewNV,
|
||||
EbvCullDistancePerViewNV,
|
||||
EbvLayerPerViewNV,
|
||||
EbvMeshViewCountNV,
|
||||
EbvMeshViewIndicesNV,
|
||||
#endif
|
||||
|
||||
// HLSL built-ins that live only temporarily, until they get remapped
|
||||
|
@ -273,6 +309,11 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
|
|||
case EvqPointCoord: return "gl_PointCoord"; break;
|
||||
case EvqFragColor: return "fragColor"; break;
|
||||
case EvqFragDepth: return "gl_FragDepth"; break;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EvqPayloadNV: return "rayPayloadNVX"; break;
|
||||
case EvqPayloadInNV: return "rayPayloadInNVX"; break;
|
||||
case EvqHitAttrNV: return "hitAttributeNVX"; break;
|
||||
#endif
|
||||
default: return "unknown qualifier";
|
||||
}
|
||||
}
|
||||
|
@ -365,6 +406,31 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
|
|||
case EbvPositionPerViewNV: return "PositionPerViewNV";
|
||||
case EbvViewportMaskPerViewNV: return "ViewportMaskPerViewNV";
|
||||
case EbvFragFullyCoveredNV: return "FragFullyCoveredNV";
|
||||
case EbvFragmentSizeNV: return "FragmentSizeNV";
|
||||
case EbvInvocationsPerPixelNV: return "InvocationsPerPixelNV";
|
||||
case EbvLaunchIdNV: return "LaunchIdNVX";
|
||||
case EbvLaunchSizeNV: return "LaunchSizeNVX";
|
||||
case EbvInstanceCustomIndexNV: return "InstanceCustomIndexNVX";
|
||||
case EbvWorldRayOriginNV: return "WorldRayOriginNVX";
|
||||
case EbvWorldRayDirectionNV: return "WorldRayDirectionNVX";
|
||||
case EbvObjectRayOriginNV: return "ObjectRayOriginNVX";
|
||||
case EbvObjectRayDirectionNV: return "ObjectRayDirectionNVX";
|
||||
case EbvRayTminNV: return "ObjectRayTminNVX";
|
||||
case EbvRayTmaxNV: return "ObjectRayTmaxNVX";
|
||||
case EbvHitTNV: return "HitTNVX";
|
||||
case EbvHitKindNV: return "HitKindNVX";
|
||||
case EbvObjectToWorldNV: return "ObjectToWorldNVX";
|
||||
case EbvWorldToObjectNV: return "WorldToObjectNVX";
|
||||
case EbvBaryCoordNV: return "BaryCoordNV";
|
||||
case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
|
||||
case EbvTaskCountNV: return "TaskCountNV";
|
||||
case EbvPrimitiveCountNV: return "PrimitiveCountNV";
|
||||
case EbvPrimitiveIndicesNV: return "PrimitiveIndicesNV";
|
||||
case EbvClipDistancePerViewNV: return "ClipDistancePerViewNV";
|
||||
case EbvCullDistancePerViewNV: return "CullDistancePerViewNV";
|
||||
case EbvLayerPerViewNV: return "LayerPerViewNV";
|
||||
case EbvMeshViewCountNV: return "MeshViewCountNV";
|
||||
case EbvMeshViewIndicesNV: return "MeshViewIndicesNV";
|
||||
#endif
|
||||
default: return "unknown built-in variable";
|
||||
}
|
||||
|
|
|
@ -133,6 +133,17 @@ struct TBuiltInResource {
|
|||
int maxCullDistances;
|
||||
int maxCombinedClipAndCullDistances;
|
||||
int maxSamples;
|
||||
#ifdef NV_EXTENSIONS
|
||||
int maxMeshOutputVerticesNV;
|
||||
int maxMeshOutputPrimitivesNV;
|
||||
int maxMeshWorkGroupSizeX_NV;
|
||||
int maxMeshWorkGroupSizeY_NV;
|
||||
int maxMeshWorkGroupSizeZ_NV;
|
||||
int maxTaskWorkGroupSizeX_NV;
|
||||
int maxTaskWorkGroupSizeY_NV;
|
||||
int maxTaskWorkGroupSizeZ_NV;
|
||||
int maxMeshViewCountNV;
|
||||
#endif
|
||||
|
||||
TLimits limits;
|
||||
};
|
||||
|
|
|
@ -456,6 +456,12 @@ public:
|
|||
nopersp = false;
|
||||
#ifdef AMD_EXTENSIONS
|
||||
explicitInterp = false;
|
||||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
pervertexNV = false;
|
||||
perPrimitiveNV = false;
|
||||
perViewNV = false;
|
||||
perTaskNV = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -500,6 +506,12 @@ public:
|
|||
bool nopersp : 1;
|
||||
#ifdef AMD_EXTENSIONS
|
||||
bool explicitInterp : 1;
|
||||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
bool pervertexNV : 1;
|
||||
bool perPrimitiveNV : 1;
|
||||
bool perViewNV : 1;
|
||||
bool perTaskNV : 1;
|
||||
#endif
|
||||
bool patch : 1;
|
||||
bool sample : 1;
|
||||
|
@ -524,6 +536,7 @@ public:
|
|||
{
|
||||
return subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly;
|
||||
}
|
||||
|
||||
bool isInterpolation() const
|
||||
{
|
||||
#ifdef AMD_EXTENSIONS
|
||||
|
@ -532,15 +545,21 @@ public:
|
|||
return flat || smooth || nopersp;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AMD_EXTENSIONS
|
||||
bool isExplicitInterpolation() const
|
||||
{
|
||||
return explicitInterp;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool isAuxiliary() const
|
||||
{
|
||||
#ifdef NV_EXTENSIONS
|
||||
return centroid || patch || sample || pervertexNV;
|
||||
#else
|
||||
return centroid || patch || sample;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool isPipeInput() const
|
||||
|
@ -607,6 +626,33 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool isPerPrimitive() const
|
||||
{
|
||||
#ifdef NV_EXTENSIONS
|
||||
return perPrimitiveNV;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool isPerView() const
|
||||
{
|
||||
#ifdef NV_EXTENSIONS
|
||||
return perViewNV;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool isTaskMemory() const
|
||||
{
|
||||
#ifdef NV_EXTENSIONS
|
||||
return perTaskNV;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool isIo() const
|
||||
{
|
||||
switch (storage) {
|
||||
|
@ -656,6 +702,13 @@ public:
|
|||
return ! patch && (isPipeInput() || isPipeOutput());
|
||||
case EShLangTessEvaluation:
|
||||
return ! patch && isPipeInput();
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EShLangFragment:
|
||||
return pervertexNV && isPipeInput();
|
||||
case EShLangMeshNV:
|
||||
return ! perTaskNV && isPipeOutput();
|
||||
#endif
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -672,6 +725,7 @@ public:
|
|||
layoutViewportRelative = false;
|
||||
// -2048 as the default value indicating layoutSecondaryViewportRelative is not set
|
||||
layoutSecondaryViewportRelativeOffset = -2048;
|
||||
layoutShaderRecordNV = false;
|
||||
#endif
|
||||
|
||||
clearInterstageLayout();
|
||||
|
@ -705,6 +759,9 @@ public:
|
|||
hasAnyLocation() ||
|
||||
hasStream() ||
|
||||
hasFormat() ||
|
||||
#ifdef NV_EXTENSIONS
|
||||
layoutShaderRecordNV ||
|
||||
#endif
|
||||
layoutPushConstant;
|
||||
}
|
||||
bool hasLayout() const
|
||||
|
@ -758,6 +815,7 @@ public:
|
|||
bool layoutPassthrough;
|
||||
bool layoutViewportRelative;
|
||||
int layoutSecondaryViewportRelativeOffset;
|
||||
bool layoutShaderRecordNV;
|
||||
#endif
|
||||
|
||||
bool hasUniformLayout() const
|
||||
|
@ -1035,7 +1093,7 @@ struct TShaderQualifiers {
|
|||
bool pixelCenterInteger; // fragment shader
|
||||
bool originUpperLeft; // fragment shader
|
||||
int invocations;
|
||||
int vertices; // both for tessellation "vertices" and geometry "max_vertices"
|
||||
int vertices; // for tessellation "vertices", geometry & mesh "max_vertices"
|
||||
TVertexSpacing spacing;
|
||||
TVertexOrder order;
|
||||
bool pointMode;
|
||||
|
@ -1048,7 +1106,10 @@ struct TShaderQualifiers {
|
|||
int numViews; // multiview extenstions
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
bool layoutOverrideCoverage; // true if layout override_coverage set
|
||||
bool layoutOverrideCoverage; // true if layout override_coverage set
|
||||
bool layoutDerivativeGroupQuads; // true if layout derivative_group_quadsNV set
|
||||
bool layoutDerivativeGroupLinear; // true if layout derivative_group_linearNV set
|
||||
int primitives; // mesh shader "max_primitives"DerivativeGroupLinear; // true if layout derivative_group_linearNV set
|
||||
#endif
|
||||
|
||||
void init()
|
||||
|
@ -1073,7 +1134,10 @@ struct TShaderQualifiers {
|
|||
blendEquation = false;
|
||||
numViews = TQualifier::layoutNotSet;
|
||||
#ifdef NV_EXTENSIONS
|
||||
layoutOverrideCoverage = false;
|
||||
layoutOverrideCoverage = false;
|
||||
layoutDerivativeGroupQuads = false;
|
||||
layoutDerivativeGroupLinear = false;
|
||||
primitives = TQualifier::layoutNotSet;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1118,6 +1182,12 @@ struct TShaderQualifiers {
|
|||
#ifdef NV_EXTENSIONS
|
||||
if (src.layoutOverrideCoverage)
|
||||
layoutOverrideCoverage = src.layoutOverrideCoverage;
|
||||
if (src.layoutDerivativeGroupQuads)
|
||||
layoutDerivativeGroupQuads = src.layoutDerivativeGroupQuads;
|
||||
if (src.layoutDerivativeGroupLinear)
|
||||
layoutDerivativeGroupLinear = src.layoutDerivativeGroupLinear;
|
||||
if (src.primitives != TQualifier::layoutNotSet)
|
||||
primitives = src.primitives;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
@ -1416,7 +1486,11 @@ public:
|
|||
}
|
||||
return false;
|
||||
}
|
||||
virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint; }
|
||||
virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint
|
||||
#ifdef NV_EXTENSIONS
|
||||
|| basicType == EbtAccStructNV
|
||||
#endif
|
||||
; }
|
||||
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
|
||||
|
||||
// "Image" is a superset of "Subpass"
|
||||
|
@ -1604,6 +1678,9 @@ public:
|
|||
case EbtSampler: return "sampler/image";
|
||||
case EbtStruct: return "structure";
|
||||
case EbtBlock: return "block";
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EbtAccStructNV: return "accelerationStructureNVX";
|
||||
#endif
|
||||
default: return "unknown type";
|
||||
}
|
||||
}
|
||||
|
@ -1699,6 +1776,8 @@ public:
|
|||
appendStr(" layoutSecondaryViewportRelativeOffset=");
|
||||
appendInt(qualifier.layoutSecondaryViewportRelativeOffset);
|
||||
}
|
||||
if (qualifier.layoutShaderRecordNV)
|
||||
appendStr(" shaderRecordNVX");
|
||||
#endif
|
||||
|
||||
appendStr(")");
|
||||
|
@ -1720,6 +1799,16 @@ public:
|
|||
#ifdef AMD_EXTENSIONS
|
||||
if (qualifier.explicitInterp)
|
||||
appendStr(" __explicitInterpAMD");
|
||||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (qualifier.pervertexNV)
|
||||
appendStr(" pervertexNV");
|
||||
if (qualifier.perPrimitiveNV)
|
||||
appendStr(" perprimitiveNV");
|
||||
if (qualifier.perViewNV)
|
||||
appendStr(" perviewNV");
|
||||
if (qualifier.perTaskNV)
|
||||
appendStr(" taskNV");
|
||||
#endif
|
||||
if (qualifier.patch)
|
||||
appendStr(" patch");
|
||||
|
|
|
@ -865,6 +865,16 @@ enum TOperator {
|
|||
#endif
|
||||
|
||||
EOpSparseTextureGuardEnd,
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
EOpImageFootprintGuardBegin,
|
||||
EOpImageSampleFootprintNV,
|
||||
EOpImageSampleFootprintClampNV,
|
||||
EOpImageSampleFootprintLodNV,
|
||||
EOpImageSampleFootprintGradNV,
|
||||
EOpImageSampleFootprintGradClampNV,
|
||||
EOpImageFootprintGuardEnd,
|
||||
#endif
|
||||
EOpSamplingGuardEnd,
|
||||
EOpTextureGuardEnd,
|
||||
|
||||
|
@ -883,6 +893,13 @@ enum TOperator {
|
|||
EOpFindLSB,
|
||||
EOpFindMSB,
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
EOpTraceNV,
|
||||
EOpReportIntersectionNV,
|
||||
EOpIgnoreIntersectionNV,
|
||||
EOpTerminateRayNV,
|
||||
EOpWritePackedPrimitiveIndices4x8NV,
|
||||
#endif
|
||||
//
|
||||
// HLSL operations
|
||||
//
|
||||
|
@ -1248,6 +1265,9 @@ public:
|
|||
bool isSampling() const { return op > EOpSamplingGuardBegin && op < EOpSamplingGuardEnd; }
|
||||
bool isImage() const { return op > EOpImageGuardBegin && op < EOpImageGuardEnd; }
|
||||
bool isSparseTexture() const { return op > EOpSparseTextureGuardBegin && op < EOpSparseTextureGuardEnd; }
|
||||
#ifdef NV_EXTENSIONS
|
||||
bool isImageFootprint() const { return op > EOpImageFootprintGuardBegin && op < EOpImageFootprintGuardEnd; }
|
||||
#endif
|
||||
bool isSparseImage() const { return op == EOpSparseImageLoad; }
|
||||
|
||||
void setOperationPrecision(TPrecisionQualifier p) { operationPrecision = p; }
|
||||
|
@ -1420,6 +1440,23 @@ public:
|
|||
cracked.subpass = sampler.dim == EsdSubpass;
|
||||
cracked.fragMask = true;
|
||||
break;
|
||||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EOpImageSampleFootprintNV:
|
||||
break;
|
||||
case EOpImageSampleFootprintClampNV:
|
||||
cracked.lodClamp = true;
|
||||
break;
|
||||
case EOpImageSampleFootprintLodNV:
|
||||
cracked.lod = true;
|
||||
break;
|
||||
case EOpImageSampleFootprintGradNV:
|
||||
cracked.grad = true;
|
||||
break;
|
||||
case EOpImageSampleFootprintGradClampNV:
|
||||
cracked.lodClamp = true;
|
||||
cracked.grad = true;
|
||||
break;
|
||||
#endif
|
||||
case EOpSubpassLoad:
|
||||
case EOpSubpassLoadMS:
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
// This header is generated by the make-revision script.
|
||||
|
||||
#define GLSLANG_PATCH_LEVEL 2888
|
||||
#define GLSLANG_PATCH_LEVEL 2904
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -460,6 +460,9 @@ bool TIntermediate::isConversionAllowed(TOperator op, TIntermTyped* node) const
|
|||
return false;
|
||||
case EbtAtomicUint:
|
||||
case EbtSampler:
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EbtAccStructNV:
|
||||
#endif
|
||||
// opaque types can be passed to functions
|
||||
if (op == EOpFunction)
|
||||
break;
|
||||
|
|
|
@ -153,6 +153,12 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
|
|||
if (node->getQualifier().readonly)
|
||||
message = "can't modify a readonly buffer";
|
||||
break;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EvqHitAttrNV:
|
||||
if (language != EShLangIntersectNV)
|
||||
message = "cannot modify hitAttributeNVX in this stage";
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
//
|
||||
|
@ -168,6 +174,11 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
|
|||
case EbtVoid:
|
||||
message = "can't modify void";
|
||||
break;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EbtAccStructNV:
|
||||
message = "can't modify accelerationStructureNVX";
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -491,12 +491,20 @@ void TParseContext::makeEditable(TSymbol*& symbol)
|
|||
ioArraySymbolResizeList.push_back(symbol);
|
||||
}
|
||||
|
||||
// Return true if this is a geometry shader input array or tessellation control output array.
|
||||
// Return true if this is a geometry shader input array or tessellation control output array
|
||||
// or mesh shader output array.
|
||||
bool TParseContext::isIoResizeArray(const TType& type) const
|
||||
{
|
||||
return type.isArray() &&
|
||||
((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) ||
|
||||
(language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut && ! type.getQualifier().patch));
|
||||
(language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut && ! type.getQualifier().patch)
|
||||
#ifdef NV_EXTENSIONS
|
||||
||
|
||||
(language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn && type.getQualifier().pervertexNV) ||
|
||||
(language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut && !type.getQualifier().perTaskNV)
|
||||
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
// If an array is not isIoResizeArray() but is an io array, make sure it has the right size
|
||||
|
@ -546,7 +554,7 @@ void TParseContext::handleIoResizeArrayAccess(const TSourceLoc& /*loc*/, TInterm
|
|||
|
||||
// fix array size, if it can be fixed and needs to be fixed (will allow variable indexing)
|
||||
if (symbolNode->getType().isUnsizedArray()) {
|
||||
int newSize = getIoArrayImplicitSize();
|
||||
int newSize = getIoArrayImplicitSize(symbolNode->getType().getQualifier().isPerPrimitive());
|
||||
if (newSize > 0)
|
||||
symbolNode->getWritableType().changeOuterArraySize(newSize);
|
||||
}
|
||||
|
@ -560,17 +568,27 @@ void TParseContext::handleIoResizeArrayAccess(const TSourceLoc& /*loc*/, TInterm
|
|||
// Types without an array size will be given one.
|
||||
// Types already having a size that is wrong will get an error.
|
||||
//
|
||||
void TParseContext::checkIoArraysConsistency(const TSourceLoc& loc, bool tailOnly)
|
||||
void TParseContext::checkIoArraysConsistency(const TSourceLoc& loc, bool tailOnly, bool isPerPrimitive)
|
||||
{
|
||||
int requiredSize = getIoArrayImplicitSize();
|
||||
int requiredSize = getIoArrayImplicitSize(isPerPrimitive);
|
||||
if (requiredSize == 0)
|
||||
return;
|
||||
|
||||
const char* feature;
|
||||
if (language == EShLangGeometry)
|
||||
feature = TQualifier::getGeometryString(intermediate.getInputPrimitive());
|
||||
else if (language == EShLangTessControl)
|
||||
else if (language == EShLangTessControl
|
||||
#ifdef NV_EXTENSIONS
|
||||
|| language == EShLangFragment
|
||||
#endif
|
||||
)
|
||||
|
||||
feature = "vertices";
|
||||
#ifdef NV_EXTENSIONS
|
||||
else if (language == EShLangMeshNV) {
|
||||
feature = isPerPrimitive ? "max_primitives" : "max_vertices";
|
||||
}
|
||||
#endif
|
||||
else
|
||||
feature = "unknown";
|
||||
|
||||
|
@ -583,12 +601,24 @@ void TParseContext::checkIoArraysConsistency(const TSourceLoc& loc, bool tailOnl
|
|||
checkIoArrayConsistency(loc, requiredSize, feature, ioArraySymbolResizeList[i]->getWritableType(), ioArraySymbolResizeList[i]->getName());
|
||||
}
|
||||
|
||||
int TParseContext::getIoArrayImplicitSize() const
|
||||
int TParseContext::getIoArrayImplicitSize(bool isPerPrimitive) const
|
||||
{
|
||||
if (language == EShLangGeometry)
|
||||
return TQualifier::mapGeometryToSize(intermediate.getInputPrimitive());
|
||||
else if (language == EShLangTessControl)
|
||||
return intermediate.getVertices() != TQualifier::layoutNotSet ? intermediate.getVertices() : 0;
|
||||
#ifdef NV_EXTENSIONS
|
||||
else if (language == EShLangFragment)
|
||||
return 3; //Number of vertices for Fragment shader is always three.
|
||||
else if (language == EShLangMeshNV) {
|
||||
if (isPerPrimitive) {
|
||||
return intermediate.getPrimitives() != TQualifier::layoutNotSet ? intermediate.getPrimitives() : 0;
|
||||
} else {
|
||||
return intermediate.getVertices() != TQualifier::layoutNotSet ? intermediate.getVertices() : 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
@ -602,6 +632,14 @@ void TParseContext::checkIoArrayConsistency(const TSourceLoc& loc, int requiredS
|
|||
error(loc, "inconsistent input primitive for array size of", feature, name.c_str());
|
||||
else if (language == EShLangTessControl)
|
||||
error(loc, "inconsistent output number of vertices for array size of", feature, name.c_str());
|
||||
#ifdef NV_EXTENSIONS
|
||||
else if (language == EShLangFragment) {
|
||||
if (type.getOuterArraySize() > requiredSize)
|
||||
error(loc, " cannot be greater than 3 for pervertexNV", feature, name.c_str());
|
||||
}
|
||||
else if (language == EShLangMeshNV)
|
||||
error(loc, "inconsistent output array size of", feature, name.c_str());
|
||||
#endif
|
||||
else
|
||||
assert(0);
|
||||
}
|
||||
|
@ -1301,8 +1339,15 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction
|
|||
// without actually redeclaring the array. (It is an error to use a member before the
|
||||
// redeclaration, but not an error to use the array name itself.)
|
||||
const TString& name = intermNode->getAsSymbolNode()->getName();
|
||||
if (name == "gl_in" || name == "gl_out")
|
||||
length = getIoArrayImplicitSize();
|
||||
if (name == "gl_in" || name == "gl_out"
|
||||
#ifdef NV_EXTENSIONS
|
||||
|| name == "gl_MeshVerticesNV"
|
||||
|| name == "gl_MeshPrimitivesNV"
|
||||
#endif
|
||||
)
|
||||
{
|
||||
length = getIoArrayImplicitSize(type.getQualifier().isPerPrimitive());
|
||||
}
|
||||
}
|
||||
if (length == 0) {
|
||||
if (intermNode->getAsSymbolNode() && isIoResizeArray(type))
|
||||
|
@ -2917,6 +2962,20 @@ void TParseContext::atomicUintCheck(const TSourceLoc& loc, const TType& type, co
|
|||
else if (type.getBasicType() == EbtAtomicUint && type.getQualifier().storage != EvqUniform)
|
||||
error(loc, "atomic_uints can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str());
|
||||
}
|
||||
#ifdef NV_EXTENSIONS
|
||||
void TParseContext::accStructNVCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
|
||||
{
|
||||
if (type.getQualifier().storage == EvqUniform)
|
||||
return;
|
||||
|
||||
if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtAccStructNV))
|
||||
error(loc, "non-uniform struct contains an accelerationStructureNVX:", type.getBasicTypeString().c_str(), identifier.c_str());
|
||||
else if (type.getBasicType() == EbtAccStructNV && type.getQualifier().storage != EvqUniform)
|
||||
error(loc, "accelerationStructureNVX can only be used in uniform variables or function parameters:",
|
||||
type.getBasicTypeString().c_str(), identifier.c_str());
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
|
||||
{
|
||||
|
@ -3020,11 +3079,14 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
|
|||
if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble)
|
||||
profileRequires(loc, EEsProfile, 300, nullptr, "shader input/output");
|
||||
|
||||
if (!qualifier.flat
|
||||
#ifdef AMD_EXTENSIONS
|
||||
if (! qualifier.flat && ! qualifier.explicitInterp) {
|
||||
#else
|
||||
if (!qualifier.flat) {
|
||||
&& !qualifier.explicitInterp
|
||||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
&& !qualifier.pervertexNV
|
||||
#endif
|
||||
) {
|
||||
if (isTypeInt(publicType.basicType) ||
|
||||
publicType.basicType == EbtDouble ||
|
||||
(publicType.userDef && (publicType.userDef->containsBasicType(EbtInt8) ||
|
||||
|
@ -3046,6 +3108,11 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
|
|||
if (qualifier.patch && qualifier.isInterpolation())
|
||||
error(loc, "cannot use interpolation qualifiers with patch", "patch", "");
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (qualifier.perTaskNV && publicType.basicType != EbtBlock)
|
||||
error(loc, "taskNV variables can be declared only as blocks", "taskNV", "");
|
||||
#endif
|
||||
|
||||
if (qualifier.storage == EvqVaryingIn) {
|
||||
switch (language) {
|
||||
case EShLangVertex:
|
||||
|
@ -3233,6 +3300,11 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
|
|||
MERGE_SINGLETON(nopersp);
|
||||
#ifdef AMD_EXTENSIONS
|
||||
MERGE_SINGLETON(explicitInterp);
|
||||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
MERGE_SINGLETON(perPrimitiveNV);
|
||||
MERGE_SINGLETON(perViewNV);
|
||||
MERGE_SINGLETON(perTaskNV);
|
||||
#endif
|
||||
MERGE_SINGLETON(patch);
|
||||
MERGE_SINGLETON(sample);
|
||||
|
@ -3575,7 +3647,7 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie
|
|||
if (! symbolTable.atBuiltInLevel()) {
|
||||
if (isIoResizeArray(type)) {
|
||||
ioArraySymbolResizeList.push_back(symbol);
|
||||
checkIoArraysConsistency(loc, true);
|
||||
checkIoArraysConsistency(loc, true, type.getQualifier().isPerPrimitive());
|
||||
} else
|
||||
fixIoArraySize(loc, symbol->getWritableType());
|
||||
}
|
||||
|
@ -3628,7 +3700,7 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie
|
|||
existingType.updateArraySizes(type);
|
||||
|
||||
if (isIoResizeArray(type))
|
||||
checkIoArraysConsistency(loc);
|
||||
checkIoArraysConsistency(loc, false, type.getQualifier().isPerPrimitive());
|
||||
}
|
||||
|
||||
// Policy and error check for needing a runtime sized array.
|
||||
|
@ -3664,6 +3736,28 @@ bool TParseContext::isRuntimeLength(const TIntermTyped& base) const
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
// Fix mesh view output array dimension
|
||||
void TParseContext::resizeMeshViewDimension(const TSourceLoc& loc, TType& type)
|
||||
{
|
||||
// see if member is a per-view attribute
|
||||
if (type.getQualifier().isPerView()) {
|
||||
// since we don't have the maxMeshViewCountNV set during parsing builtins, we hardcode the value
|
||||
int maxViewCount = parsingBuiltins ? 4 : resources.maxMeshViewCountNV;
|
||||
|
||||
if (! type.isArray()) {
|
||||
error(loc, "requires an view array dimension", "perviewNV", "");
|
||||
}
|
||||
else if (!type.isUnsizedArray() && type.getOuterArraySize() != maxViewCount) {
|
||||
error(loc, "mesh view output array size must be gl_MaxMeshViewCountNV or implicitly sized", "[]", "");
|
||||
}
|
||||
else if (type.isUnsizedArray()) {
|
||||
type.changeOuterArraySize(maxViewCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Returns true if the first argument to the #line directive is the line number for the next line.
|
||||
//
|
||||
// Desktop, pre-version 3.30: "After processing this directive
|
||||
|
@ -3854,7 +3948,12 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT
|
|||
profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature);
|
||||
profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_separate_shader_objects, feature);
|
||||
|
||||
if (blockName != "gl_PerVertex" && blockName != "gl_PerFragment") {
|
||||
if (blockName != "gl_PerVertex" && blockName != "gl_PerFragment"
|
||||
#ifdef NV_EXTENSIONS
|
||||
&& blockName != "gl_MeshPerVertexNV" && blockName != "gl_MeshPerPrimitiveNV"
|
||||
#endif
|
||||
)
|
||||
{
|
||||
error(loc, "cannot redeclare block: ", "block declaration", blockName.c_str());
|
||||
return;
|
||||
}
|
||||
|
@ -4030,7 +4129,7 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT
|
|||
// Tracking for implicit sizing of array
|
||||
if (isIoResizeArray(block->getType())) {
|
||||
ioArraySymbolResizeList.push_back(block);
|
||||
checkIoArraysConsistency(loc, true);
|
||||
checkIoArraysConsistency(loc, true, block->getType().getQualifier().isPerPrimitive());
|
||||
} else if (block->getType().isArray())
|
||||
fixIoArraySize(loc, block->getWritableType());
|
||||
|
||||
|
@ -4447,44 +4546,57 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|||
publicType.qualifier.layoutPushConstant = true;
|
||||
return;
|
||||
}
|
||||
if (language == EShLangGeometry || language == EShLangTessEvaluation) {
|
||||
if (language == EShLangGeometry || language == EShLangTessEvaluation
|
||||
#ifdef NV_EXTENSIONS
|
||||
|| language == EShLangMeshNV
|
||||
#endif
|
||||
) {
|
||||
if (id == TQualifier::getGeometryString(ElgTriangles)) {
|
||||
publicType.shaderQualifiers.geometry = ElgTriangles;
|
||||
return;
|
||||
}
|
||||
if (language == EShLangGeometry) {
|
||||
if (language == EShLangGeometry
|
||||
#ifdef NV_EXTENSIONS
|
||||
|| language == EShLangMeshNV
|
||||
#endif
|
||||
) {
|
||||
if (id == TQualifier::getGeometryString(ElgPoints)) {
|
||||
publicType.shaderQualifiers.geometry = ElgPoints;
|
||||
return;
|
||||
}
|
||||
if (id == TQualifier::getGeometryString(ElgLineStrip)) {
|
||||
publicType.shaderQualifiers.geometry = ElgLineStrip;
|
||||
return;
|
||||
}
|
||||
if (id == TQualifier::getGeometryString(ElgLines)) {
|
||||
publicType.shaderQualifiers.geometry = ElgLines;
|
||||
return;
|
||||
}
|
||||
if (id == TQualifier::getGeometryString(ElgLinesAdjacency)) {
|
||||
publicType.shaderQualifiers.geometry = ElgLinesAdjacency;
|
||||
return;
|
||||
}
|
||||
if (id == TQualifier::getGeometryString(ElgTrianglesAdjacency)) {
|
||||
publicType.shaderQualifiers.geometry = ElgTrianglesAdjacency;
|
||||
return;
|
||||
}
|
||||
if (id == TQualifier::getGeometryString(ElgTriangleStrip)) {
|
||||
publicType.shaderQualifiers.geometry = ElgTriangleStrip;
|
||||
return;
|
||||
}
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (id == "passthrough") {
|
||||
requireExtensions(loc, 1, &E_SPV_NV_geometry_shader_passthrough, "geometry shader passthrough");
|
||||
publicType.qualifier.layoutPassthrough = true;
|
||||
intermediate.setGeoPassthroughEXT();
|
||||
return;
|
||||
}
|
||||
if (language == EShLangGeometry)
|
||||
#endif
|
||||
{
|
||||
if (id == TQualifier::getGeometryString(ElgLineStrip)) {
|
||||
publicType.shaderQualifiers.geometry = ElgLineStrip;
|
||||
return;
|
||||
}
|
||||
if (id == TQualifier::getGeometryString(ElgLinesAdjacency)) {
|
||||
publicType.shaderQualifiers.geometry = ElgLinesAdjacency;
|
||||
return;
|
||||
}
|
||||
if (id == TQualifier::getGeometryString(ElgTrianglesAdjacency)) {
|
||||
publicType.shaderQualifiers.geometry = ElgTrianglesAdjacency;
|
||||
return;
|
||||
}
|
||||
if (id == TQualifier::getGeometryString(ElgTriangleStrip)) {
|
||||
publicType.shaderQualifiers.geometry = ElgTriangleStrip;
|
||||
return;
|
||||
}
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (id == "passthrough") {
|
||||
requireExtensions(loc, 1, &E_SPV_NV_geometry_shader_passthrough, "geometry shader passthrough");
|
||||
publicType.qualifier.layoutPassthrough = true;
|
||||
intermediate.setGeoPassthroughEXT();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
assert(language == EShLangTessEvaluation);
|
||||
|
||||
|
@ -4598,6 +4710,27 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|||
publicType.qualifier.layoutViewportRelative = true;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (language == EShLangRayGenNV || language == EShLangIntersectNV ||
|
||||
language == EShLangAnyHitNV || language == EShLangClosestHitNV ||
|
||||
language == EShLangMissNV || language == EShLangCallableNV) {
|
||||
if (id == "shaderrecordnvx") {
|
||||
publicType.qualifier.layoutShaderRecordNV = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (language == EShLangCompute) {
|
||||
if (id.compare(0, 17, "derivative_group_") == 0) {
|
||||
requireExtensions(loc, 1, &E_GL_NV_compute_shader_derivatives, "compute shader derivatives");
|
||||
if (id == "derivative_group_quadsnv") {
|
||||
publicType.shaderQualifiers.layoutDerivativeGroupQuads = true;
|
||||
return;
|
||||
} else if (id == "derivative_group_linearnv") {
|
||||
publicType.shaderQualifiers.layoutDerivativeGroupLinear = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
}
|
||||
|
@ -4827,10 +4960,37 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|||
}
|
||||
break;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EShLangMeshNV:
|
||||
if (id == "max_vertices") {
|
||||
publicType.shaderQualifiers.vertices = value;
|
||||
if (value > resources.maxMeshOutputVerticesNV)
|
||||
error(loc, "too large, must be less than gl_MaxMeshOutputVerticesNV", "max_vertices", "");
|
||||
return;
|
||||
}
|
||||
if (id == "max_primitives") {
|
||||
publicType.shaderQualifiers.primitives = value;
|
||||
if (value > resources.maxMeshOutputPrimitivesNV)
|
||||
error(loc, "too large, must be less than gl_MaxMeshOutputPrimitivesNV", "max_primitives", "");
|
||||
return;
|
||||
}
|
||||
// Fall through
|
||||
|
||||
case EShLangTaskNV:
|
||||
// Fall through
|
||||
#endif
|
||||
case EShLangCompute:
|
||||
if (id.compare(0, 11, "local_size_") == 0) {
|
||||
profileRequires(loc, EEsProfile, 310, 0, "gl_WorkGroupSize");
|
||||
profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_compute_shader, "gl_WorkGroupSize");
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (language == EShLangMeshNV || language == EShLangTaskNV) {
|
||||
profileRequires(loc, ~EEsProfile, 450, E_GL_NV_mesh_shader, "gl_WorkGroupSize");
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
profileRequires(loc, EEsProfile, 310, 0, "gl_WorkGroupSize");
|
||||
profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_compute_shader, "gl_WorkGroupSize");
|
||||
}
|
||||
if (id.size() == 12 && value == 0) {
|
||||
error(loc, "must be at least 1", id.c_str(), "");
|
||||
return;
|
||||
|
@ -4939,6 +5099,10 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie
|
|||
dst.layoutViewportRelative = true;
|
||||
if (src.layoutSecondaryViewportRelativeOffset != -2048)
|
||||
dst.layoutSecondaryViewportRelativeOffset = src.layoutSecondaryViewportRelativeOffset;
|
||||
if (src.layoutShaderRecordNV)
|
||||
dst.layoutShaderRecordNV = true;
|
||||
if (src.pervertexNV)
|
||||
dst.pervertexNV = true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -4975,9 +5139,10 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb
|
|||
switch (qualifier.storage) {
|
||||
case EvqVaryingIn:
|
||||
case EvqVaryingOut:
|
||||
if (type.getBasicType() != EbtBlock ||
|
||||
(!(*type.getStruct())[0].type->getQualifier().hasLocation() &&
|
||||
(*type.getStruct())[0].type->getQualifier().builtIn == EbvNone))
|
||||
if (!type.getQualifier().isTaskMemory() &&
|
||||
(type.getBasicType() != EbtBlock ||
|
||||
(!(*type.getStruct())[0].type->getQualifier().hasLocation() &&
|
||||
(*type.getStruct())[0].type->getQualifier().builtIn == EbvNone)))
|
||||
error(loc, "SPIR-V requires location for user input/output", "location", "");
|
||||
break;
|
||||
default:
|
||||
|
@ -5003,6 +5168,10 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb
|
|||
error(loc, "cannot specify on a variable declaration", "align", "");
|
||||
if (qualifier.layoutPushConstant)
|
||||
error(loc, "can only specify on a uniform block", "push_constant", "");
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (qualifier.layoutShaderRecordNV)
|
||||
error(loc, "can only specify on a buffer block", "shaderRecordNVX", "");
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -5066,12 +5235,22 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||
case EvqVaryingOut:
|
||||
if (type.getBasicType() == EbtBlock)
|
||||
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, "location qualifier on in/out block");
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (type.getQualifier().isTaskMemory())
|
||||
error(loc, "cannot apply to taskNV in/out blocks", "location", "");
|
||||
#endif
|
||||
break;
|
||||
case EvqUniform:
|
||||
case EvqBuffer:
|
||||
if (type.getBasicType() == EbtBlock)
|
||||
error(loc, "cannot apply to uniform or buffer block", "location", "");
|
||||
break;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EvqPayloadNV:
|
||||
case EvqPayloadInNV:
|
||||
case EvqHitAttrNV:
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
error(loc, "can only apply to uniform, buffer, in, or out storage qualifiers", "location", "");
|
||||
break;
|
||||
|
@ -5155,7 +5334,10 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||
if (spvVersion.spv > 0) {
|
||||
if (qualifier.isUniformOrBuffer()) {
|
||||
if (type.getBasicType() == EbtBlock && !qualifier.layoutPushConstant &&
|
||||
!qualifier.layoutAttachment)
|
||||
#ifdef NV_EXTENSIONS
|
||||
!qualifier.layoutShaderRecordNV &&
|
||||
#endif
|
||||
!qualifier.layoutAttachment)
|
||||
error(loc, "uniform/buffer blocks require layout(binding=X)", "binding", "");
|
||||
else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler)
|
||||
error(loc, "sampler/texture/image requires layout(binding=X)", "binding", "");
|
||||
|
@ -5207,6 +5389,11 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||
if (qualifier.layoutPushConstant && type.getBasicType() != EbtBlock)
|
||||
error(loc, "can only be used with a block", "push_constant", "");
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (qualifier.layoutShaderRecordNV && type.getBasicType() != EbtBlock)
|
||||
error(loc, "can only be used with a block", "shaderRecordNVX", "");
|
||||
#endif
|
||||
|
||||
// input attachment
|
||||
if (type.isSubpass()) {
|
||||
if (! qualifier.hasAttachment())
|
||||
|
@ -5317,7 +5504,7 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
|
|||
}
|
||||
|
||||
if (qualifier.hasBinding()) {
|
||||
if (! qualifier.isUniformOrBuffer())
|
||||
if (! qualifier.isUniformOrBuffer() && !qualifier.isTaskMemory())
|
||||
error(loc, "requires uniform or buffer storage qualifier", "binding", "");
|
||||
}
|
||||
if (qualifier.hasStream()) {
|
||||
|
@ -5329,7 +5516,7 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
|
|||
error(loc, "can only be used on an output", "xfb layout qualifier", "");
|
||||
}
|
||||
if (qualifier.hasUniformLayout()) {
|
||||
if (! qualifier.isUniformOrBuffer()) {
|
||||
if (! qualifier.isUniformOrBuffer() && !qualifier.isTaskMemory()) {
|
||||
if (qualifier.hasMatrix() || qualifier.hasPacking())
|
||||
error(loc, "matrix or packing qualifiers can only be used on a uniform or buffer", "layout", "");
|
||||
if (qualifier.hasOffset() || qualifier.hasAlign())
|
||||
|
@ -5342,6 +5529,16 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
|
|||
if (qualifier.hasSet())
|
||||
error(loc, "cannot be used with push_constant", "set", "");
|
||||
}
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (qualifier.layoutShaderRecordNV) {
|
||||
if (qualifier.storage != EvqBuffer)
|
||||
error(loc, "can only be used with a buffer", "shaderRecordNVX", "");
|
||||
if (qualifier.hasBinding())
|
||||
error(loc, "cannot be used with shaderRecordNVX", "binding", "");
|
||||
if (qualifier.hasSet())
|
||||
error(loc, "cannot be used with shaderRecordNVX", "set", "");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// For places that can't have shader-level layout qualifiers
|
||||
|
@ -5370,13 +5567,25 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua
|
|||
error(loc, message, "local_size id", "");
|
||||
}
|
||||
if (shaderQualifiers.vertices != TQualifier::layoutNotSet) {
|
||||
if (language == EShLangGeometry)
|
||||
if (language == EShLangGeometry
|
||||
#ifdef NV_EXTENSIONS
|
||||
|| language == EShLangMeshNV
|
||||
#endif
|
||||
)
|
||||
error(loc, message, "max_vertices", "");
|
||||
else if (language == EShLangTessControl)
|
||||
error(loc, message, "vertices", "");
|
||||
else
|
||||
assert(0);
|
||||
}
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (shaderQualifiers.primitives != TQualifier::layoutNotSet) {
|
||||
if (language == EShLangMeshNV)
|
||||
error(loc, message, "max_primitives", "");
|
||||
else
|
||||
assert(0);
|
||||
}
|
||||
#endif
|
||||
if (shaderQualifiers.blendEquation)
|
||||
error(loc, message, "blend equation", "");
|
||||
if (shaderQualifiers.numViews != TQualifier::layoutNotSet)
|
||||
|
@ -5759,6 +5968,9 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
|
|||
samplerCheck(loc, type, identifier, initializer);
|
||||
atomicUintCheck(loc, type, identifier);
|
||||
transparentOpaqueCheck(loc, type, identifier);
|
||||
#ifdef NV_EXTENSIONS
|
||||
accStructNVCheck(loc, type, identifier);
|
||||
#endif
|
||||
|
||||
if (type.getQualifier().storage != EvqUniform && type.getQualifier().storage != EvqBuffer) {
|
||||
if (type.containsBasicType(EbtFloat16))
|
||||
|
@ -6407,6 +6619,14 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
|
|||
if (memberQualifier.storage != EvqTemporary && memberQualifier.storage != EvqGlobal && memberQualifier.storage != currentBlockQualifier.storage)
|
||||
error(memberLoc, "member storage qualifier cannot contradict block storage qualifier", memberType.getFieldName().c_str(), "");
|
||||
memberQualifier.storage = currentBlockQualifier.storage;
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (currentBlockQualifier.perPrimitiveNV)
|
||||
memberQualifier.perPrimitiveNV = currentBlockQualifier.perPrimitiveNV;
|
||||
if (currentBlockQualifier.perViewNV)
|
||||
memberQualifier.perViewNV = currentBlockQualifier.perViewNV;
|
||||
if (currentBlockQualifier.perTaskNV)
|
||||
memberQualifier.perTaskNV = currentBlockQualifier.perTaskNV;
|
||||
#endif
|
||||
if ((currentBlockQualifier.storage == EvqUniform || currentBlockQualifier.storage == EvqBuffer) && (memberQualifier.isInterpolation() || memberQualifier.isAuxiliary()))
|
||||
error(memberLoc, "member of uniform or buffer block cannot have an auxiliary or interpolation qualifier", memberType.getFieldName().c_str(), "");
|
||||
if (memberType.isArray())
|
||||
|
@ -6449,9 +6669,19 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
|
|||
|
||||
// Special case for "push_constant uniform", which has a default of std430,
|
||||
// contrary to normal uniform defaults, and can't have a default tracked for it.
|
||||
if (currentBlockQualifier.layoutPushConstant && !currentBlockQualifier.hasPacking())
|
||||
if ((currentBlockQualifier.layoutPushConstant && !currentBlockQualifier.hasPacking())
|
||||
#ifdef NV_EXTENSIONS
|
||||
|| (currentBlockQualifier.layoutShaderRecordNV && !currentBlockQualifier.hasPacking())
|
||||
#endif
|
||||
)
|
||||
currentBlockQualifier.layoutPacking = ElpStd430;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
// Special case for "taskNV in/out", which has a default of std430,
|
||||
if (currentBlockQualifier.perTaskNV && !currentBlockQualifier.hasPacking())
|
||||
currentBlockQualifier.layoutPacking = ElpStd430;
|
||||
#endif
|
||||
|
||||
// fix and check for member layout qualifiers
|
||||
|
||||
mergeObjectLayoutQualifiers(defaultQualification, currentBlockQualifier, true);
|
||||
|
@ -6466,6 +6696,9 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
|
|||
|
||||
bool memberWithLocation = false;
|
||||
bool memberWithoutLocation = false;
|
||||
#ifdef NV_EXTENSIONS
|
||||
bool memberWithPerViewQualifier = false;
|
||||
#endif
|
||||
for (unsigned int member = 0; member < typeList.size(); ++member) {
|
||||
TQualifier& memberQualifier = typeList[member].type->getQualifier();
|
||||
const TSourceLoc& memberLoc = typeList[member].loc;
|
||||
|
@ -6509,6 +6742,12 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
|
|||
error(memberLoc, "can only be used with std140 or std430 layout packing", "offset/align", "");
|
||||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (memberQualifier.isPerView()) {
|
||||
memberWithPerViewQualifier = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
TQualifier newMemberQualification = defaultQualification;
|
||||
mergeQualifiers(memberLoc, newMemberQualification, memberQualifier, false);
|
||||
memberQualifier = newMemberQualification;
|
||||
|
@ -6523,6 +6762,14 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
|
|||
for (unsigned int member = 0; member < typeList.size(); ++member)
|
||||
layoutTypeCheck(typeList[member].loc, *typeList[member].type);
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (memberWithPerViewQualifier) {
|
||||
for (unsigned int member = 0; member < typeList.size(); ++member) {
|
||||
resizeMeshViewDimension(typeList[member].loc, *typeList[member].type);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// reverse merge, so that currentBlockQualifier now has all layout information
|
||||
// (can't use defaultQualification directly, it's missing other non-layout-default-class qualifiers)
|
||||
mergeObjectLayoutQualifiers(currentBlockQualifier, defaultQualification, true);
|
||||
|
@ -6586,7 +6833,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
|
|||
// fix up
|
||||
if (isIoResizeArray(blockType)) {
|
||||
ioArraySymbolResizeList.push_back(&variable);
|
||||
checkIoArraysConsistency(loc, true);
|
||||
checkIoArraysConsistency(loc, true, blockType.getQualifier().isPerPrimitive());
|
||||
} else
|
||||
fixIoArraySize(loc, variable.getWritableType());
|
||||
|
||||
|
@ -6614,17 +6861,56 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
|
|||
profileRequires(loc, ~EEsProfile, 150, E_GL_ARB_separate_shader_objects, "input block");
|
||||
// It is a compile-time error to have an input block in a vertex shader or an output block in a fragment shader
|
||||
// "Compute shaders do not permit user-defined input variables..."
|
||||
requireStage(loc, (EShLanguageMask)(EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask|EShLangFragmentMask), "input block");
|
||||
if (language == EShLangFragment)
|
||||
requireStage(loc, (EShLanguageMask)(EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask|EShLangFragmentMask
|
||||
#ifdef NV_EXTENSIONS
|
||||
|EShLangMeshNVMask
|
||||
#endif
|
||||
), "input block");
|
||||
if (language == EShLangFragment) {
|
||||
profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "fragment input block");
|
||||
}
|
||||
#ifdef NV_EXTENSIONS
|
||||
else if (language == EShLangMeshNV && ! qualifier.isTaskMemory()) {
|
||||
error(loc, "input blocks cannot be used in a mesh shader", "out", "");
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case EvqVaryingOut:
|
||||
profileRequires(loc, ~EEsProfile, 150, E_GL_ARB_separate_shader_objects, "output block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangVertexMask|EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask), "output block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangVertexMask|EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask
|
||||
#ifdef NV_EXTENSIONS
|
||||
|EShLangMeshNVMask|EShLangTaskNVMask
|
||||
#endif
|
||||
), "output block");
|
||||
// ES 310 can have a block before shader_io is turned on, so skip this test for built-ins
|
||||
if (language == EShLangVertex && ! parsingBuiltins)
|
||||
if (language == EShLangVertex && ! parsingBuiltins) {
|
||||
profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "vertex output block");
|
||||
}
|
||||
#ifdef NV_EXTENSIONS
|
||||
else if (language == EShLangMeshNV && qualifier.isTaskMemory()) {
|
||||
error(loc, "can only use on input blocks in mesh shader", "taskNV", "");
|
||||
}
|
||||
else if (language == EShLangTaskNV && ! qualifier.isTaskMemory()) {
|
||||
error(loc, "output blocks cannot be used in a task shader", "out", "");
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EvqPayloadNV:
|
||||
profileRequires(loc, ~EEsProfile, 450, E_GL_NVX_raytracing, "rayPayloadNVX block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangAnyHitNVMask | EShLangClosestHitNVMask | EShLangMissNVMask),
|
||||
"rayPayloadNVX block");
|
||||
break;
|
||||
case EvqPayloadInNV:
|
||||
profileRequires(loc, ~EEsProfile, 450, E_GL_NVX_raytracing, "rayPayloadInNVX block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangAnyHitNVMask | EShLangClosestHitNVMask | EShLangMissNVMask),
|
||||
"rayPayloadInNVX block");
|
||||
break;
|
||||
case EvqHitAttrNV:
|
||||
profileRequires(loc, ~EEsProfile, 450, E_GL_NVX_raytracing, "hitAttributeNVX block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangIntersectNVMask | EShLangAnyHitNVMask | EShLangClosestHitNVMask), "hitAttributeNVX block");
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
error(loc, "only uniform, buffer, in, or out blocks are supported", blockName->c_str(), "");
|
||||
break;
|
||||
|
@ -6661,6 +6947,12 @@ void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier&
|
|||
error(loc, "cannot use invariant qualifier on an interface block", "invariant", "");
|
||||
if (qualifier.layoutPushConstant)
|
||||
intermediate.addPushConstantCount();
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (qualifier.layoutShaderRecordNV)
|
||||
intermediate.addShaderRecordNVCount();
|
||||
if (qualifier.perTaskNV)
|
||||
intermediate.addTaskNVCount();
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -6746,7 +7038,7 @@ void TParseContext::fixBlockXfbOffsets(TQualifier& qualifier, TTypeList& typeLis
|
|||
//
|
||||
void TParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typeList)
|
||||
{
|
||||
if (! qualifier.isUniformOrBuffer())
|
||||
if (!qualifier.isUniformOrBuffer() && !qualifier.isTaskMemory())
|
||||
return;
|
||||
if (qualifier.layoutPacking != ElpStd140 && qualifier.layoutPacking != ElpStd430)
|
||||
return;
|
||||
|
@ -6878,7 +7170,11 @@ void TParseContext::invariantCheck(const TSourceLoc& loc, const TQualifier& qual
|
|||
void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, const TPublicType& publicType)
|
||||
{
|
||||
if (publicType.shaderQualifiers.vertices != TQualifier::layoutNotSet) {
|
||||
#ifdef NV_EXTENSIONS
|
||||
assert(language == EShLangTessControl || language == EShLangGeometry || language == EShLangMeshNV);
|
||||
#else
|
||||
assert(language == EShLangTessControl || language == EShLangGeometry);
|
||||
#endif
|
||||
const char* id = (language == EShLangTessControl) ? "vertices" : "max_vertices";
|
||||
|
||||
if (publicType.qualifier.storage != EvqVaryingOut)
|
||||
|
@ -6889,6 +7185,17 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
|||
if (language == EShLangTessControl)
|
||||
checkIoArraysConsistency(loc);
|
||||
}
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (publicType.shaderQualifiers.primitives != TQualifier::layoutNotSet) {
|
||||
assert(language == EShLangMeshNV);
|
||||
const char* id = "max_primitives";
|
||||
|
||||
if (publicType.qualifier.storage != EvqVaryingOut)
|
||||
error(loc, "can only apply to 'out'", id, "");
|
||||
if (! intermediate.setPrimitives(publicType.shaderQualifiers.primitives))
|
||||
error(loc, "cannot change previously set layout value", id, "");
|
||||
}
|
||||
#endif
|
||||
if (publicType.shaderQualifiers.invocations != TQualifier::layoutNotSet) {
|
||||
if (publicType.qualifier.storage != EvqVaryingIn)
|
||||
error(loc, "can only apply to 'in'", "invocations", "");
|
||||
|
@ -6905,6 +7212,12 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
|||
case ElgTrianglesAdjacency:
|
||||
case ElgQuads:
|
||||
case ElgIsolines:
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (language == EShLangMeshNV) {
|
||||
error(loc, "cannot apply to input", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if (intermediate.setInputPrimitive(publicType.shaderQualifiers.geometry)) {
|
||||
if (language == EShLangGeometry)
|
||||
checkIoArraysConsistency(loc);
|
||||
|
@ -6916,6 +7229,15 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
|||
}
|
||||
} else if (publicType.qualifier.storage == EvqVaryingOut) {
|
||||
switch (publicType.shaderQualifiers.geometry) {
|
||||
#ifdef NV_EXTENSIONS
|
||||
case ElgLines:
|
||||
case ElgTriangles:
|
||||
if (language != EShLangMeshNV) {
|
||||
error(loc, "cannot apply to 'out'", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
// Fall through
|
||||
case ElgPoints:
|
||||
case ElgLineStrip:
|
||||
case ElgTriangleStrip:
|
||||
|
@ -6955,14 +7277,41 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
|||
error(loc, "cannot change previously set size", "local_size", "");
|
||||
else {
|
||||
int max = 0;
|
||||
switch (i) {
|
||||
case 0: max = resources.maxComputeWorkGroupSizeX; break;
|
||||
case 1: max = resources.maxComputeWorkGroupSizeY; break;
|
||||
case 2: max = resources.maxComputeWorkGroupSizeZ; break;
|
||||
default: break;
|
||||
if (language == EShLangCompute) {
|
||||
switch (i) {
|
||||
case 0: max = resources.maxComputeWorkGroupSizeX; break;
|
||||
case 1: max = resources.maxComputeWorkGroupSizeY; break;
|
||||
case 2: max = resources.maxComputeWorkGroupSizeZ; break;
|
||||
default: break;
|
||||
}
|
||||
if (intermediate.getLocalSize(i) > (unsigned int)max)
|
||||
error(loc, "too large; see gl_MaxComputeWorkGroupSize", "local_size", "");
|
||||
}
|
||||
#ifdef NV_EXTENSIONS
|
||||
else if (language == EShLangMeshNV) {
|
||||
switch (i) {
|
||||
case 0: max = resources.maxMeshWorkGroupSizeX_NV; break;
|
||||
case 1: max = resources.maxMeshWorkGroupSizeY_NV; break;
|
||||
case 2: max = resources.maxMeshWorkGroupSizeZ_NV; break;
|
||||
default: break;
|
||||
}
|
||||
if (intermediate.getLocalSize(i) > (unsigned int)max)
|
||||
error(loc, "too large; see gl_MaxMeshWorkGroupSizeNV", "local_size", "");
|
||||
}
|
||||
else if (language == EShLangTaskNV) {
|
||||
switch (i) {
|
||||
case 0: max = resources.maxTaskWorkGroupSizeX_NV; break;
|
||||
case 1: max = resources.maxTaskWorkGroupSizeY_NV; break;
|
||||
case 2: max = resources.maxTaskWorkGroupSizeZ_NV; break;
|
||||
default: break;
|
||||
}
|
||||
if (intermediate.getLocalSize(i) > (unsigned int)max)
|
||||
error(loc, "too large; see gl_MaxTaskWorkGroupSizeNV", "local_size", "");
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
assert(0);
|
||||
}
|
||||
if (intermediate.getLocalSize(i) > (unsigned int)max)
|
||||
error(loc, "too large; see gl_MaxComputeWorkGroupSize", "local_size", "");
|
||||
|
||||
// Fix the existing constant gl_WorkGroupSize with this new information.
|
||||
TVariable* workGroupSize = getEditableVariable("gl_WorkGroupSize");
|
||||
|
@ -7001,6 +7350,36 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
|||
error(loc, "can only apply to 'out'", "blend equation", "");
|
||||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (publicType.shaderQualifiers.layoutDerivativeGroupQuads &&
|
||||
publicType.shaderQualifiers.layoutDerivativeGroupLinear) {
|
||||
error(loc, "cannot be both specified", "derivative_group_quadsNV and derivative_group_linearNV", "");
|
||||
}
|
||||
|
||||
if (publicType.shaderQualifiers.layoutDerivativeGroupQuads) {
|
||||
if (publicType.qualifier.storage == EvqVaryingIn) {
|
||||
if ((intermediate.getLocalSize(0) & 1) ||
|
||||
(intermediate.getLocalSize(1) & 1))
|
||||
error(loc, "requires local_size_x and local_size_y to be multiple of two", "derivative_group_quadsNV", "");
|
||||
else
|
||||
intermediate.setLayoutDerivativeMode(LayoutDerivativeGroupQuads);
|
||||
}
|
||||
else
|
||||
error(loc, "can only apply to 'in'", "derivative_group_quadsNV", "");
|
||||
}
|
||||
if (publicType.shaderQualifiers.layoutDerivativeGroupLinear) {
|
||||
if (publicType.qualifier.storage == EvqVaryingIn) {
|
||||
if((intermediate.getLocalSize(0) *
|
||||
intermediate.getLocalSize(1) *
|
||||
intermediate.getLocalSize(2)) % 4 != 0)
|
||||
error(loc, "requires total group size to be multiple of four", "derivative_group_linearNV", "");
|
||||
else
|
||||
intermediate.setLayoutDerivativeMode(LayoutDerivativeGroupLinear);
|
||||
}
|
||||
else
|
||||
error(loc, "can only apply to 'in'", "derivative_group_linearNV", "");
|
||||
}
|
||||
#endif
|
||||
const TQualifier& qualifier = publicType.qualifier;
|
||||
|
||||
if (qualifier.isAuxiliary() ||
|
||||
|
@ -7056,6 +7435,10 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
|||
error(loc, "cannot declare a default, can only be used on a block", "push_constant", "");
|
||||
if (qualifier.hasSpecConstantId())
|
||||
error(loc, "cannot declare a default, can only be used on a scalar", "constant_id", "");
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (qualifier.layoutShaderRecordNV)
|
||||
error(loc, "cannot declare a default, can only be used on a block", "shaderRecordNVX", "");
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -298,8 +298,8 @@ public:
|
|||
void fixIoArraySize(const TSourceLoc&, TType&);
|
||||
void ioArrayCheck(const TSourceLoc&, const TType&, const TString& identifier);
|
||||
void handleIoResizeArrayAccess(const TSourceLoc&, TIntermTyped* base);
|
||||
void checkIoArraysConsistency(const TSourceLoc&, bool tailOnly = false);
|
||||
int getIoArrayImplicitSize() const;
|
||||
void checkIoArraysConsistency(const TSourceLoc&, bool tailOnly = false, bool isPerPrimitive = false);
|
||||
int getIoArrayImplicitSize(bool isPerPrimitive = false) const;
|
||||
void checkIoArrayConsistency(const TSourceLoc&, int requiredSize, const char* feature, TType&, const TString&);
|
||||
|
||||
TIntermTyped* handleBinaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right);
|
||||
|
@ -348,6 +348,9 @@ public:
|
|||
void boolCheck(const TSourceLoc&, const TPublicType&);
|
||||
void samplerCheck(const TSourceLoc&, const TType&, const TString& identifier, TIntermTyped* initializer);
|
||||
void atomicUintCheck(const TSourceLoc&, const TType&, const TString& identifier);
|
||||
#ifdef NV_EXTENSIONS
|
||||
void accStructNVCheck(const TSourceLoc & loc, const TType & type, const TString & identifier);
|
||||
#endif
|
||||
void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier);
|
||||
void memberQualifierCheck(glslang::TPublicType&);
|
||||
void globalQualifierFixCheck(const TSourceLoc&, TQualifier&);
|
||||
|
@ -423,6 +426,9 @@ public:
|
|||
// Determine loop control from attributes
|
||||
void handleLoopAttributes(const TAttributes& attributes, TIntermNode*);
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
void resizeMeshViewDimension(const TSourceLoc&, TType&);
|
||||
#endif
|
||||
protected:
|
||||
void nonInitConstCheck(const TSourceLoc&, TString& identifier, TType& type);
|
||||
void inheritGlobalDefaults(TQualifier& dst) const;
|
||||
|
|
|
@ -691,12 +691,25 @@ void TScanContext::fillInKeywordMap()
|
|||
(*KeywordMap)["__explicitInterpAMD"] = EXPLICITINTERPAMD;
|
||||
#endif
|
||||
(*KeywordMap)["centroid"] = CENTROID;
|
||||
#ifdef NV_EXTENSIONS
|
||||
(*KeywordMap)["pervertexNV"] = PERVERTEXNV;
|
||||
#endif
|
||||
(*KeywordMap)["precise"] = PRECISE;
|
||||
(*KeywordMap)["invariant"] = INVARIANT;
|
||||
(*KeywordMap)["packed"] = PACKED;
|
||||
(*KeywordMap)["resource"] = RESOURCE;
|
||||
(*KeywordMap)["superp"] = SUPERP;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
(*KeywordMap)["rayPayloadNVX"] = PAYLOADNV;
|
||||
(*KeywordMap)["rayPayloadInNVX"] = PAYLOADINNV;
|
||||
(*KeywordMap)["hitAttributeNVX"] = HITATTRNV;
|
||||
(*KeywordMap)["accelerationStructureNVX"] = ACCSTRUCTNV;
|
||||
(*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV;
|
||||
(*KeywordMap)["perviewNV"] = PERVIEWNV;
|
||||
(*KeywordMap)["taskNV"] = PERTASKNV;
|
||||
#endif
|
||||
|
||||
ReservedSet = new std::unordered_set<const char*, str_hash, str_eq>;
|
||||
|
||||
ReservedSet->insert("common");
|
||||
|
@ -935,6 +948,18 @@ int TScanContext::tokenizeIdentifier()
|
|||
return identifierOrType();
|
||||
return keyword;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case PAYLOADNV:
|
||||
case PAYLOADINNV:
|
||||
case HITATTRNV:
|
||||
case ACCSTRUCTNV:
|
||||
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||
(parseContext.profile != EEsProfile && parseContext.version >= 460
|
||||
&& parseContext.extensionTurnedOn(E_GL_NVX_raytracing)))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
#endif
|
||||
|
||||
case ATOMIC_UINT:
|
||||
if ((parseContext.profile == EEsProfile && parseContext.version >= 310) ||
|
||||
parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters))
|
||||
|
@ -1507,6 +1532,15 @@ int TScanContext::tokenizeIdentifier()
|
|||
return identifierOrType();
|
||||
#endif
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case PERVERTEXNV:
|
||||
if (((parseContext.profile != EEsProfile && parseContext.version >= 450) ||
|
||||
(parseContext.profile == EEsProfile && parseContext.version >= 320)) &&
|
||||
parseContext.extensionTurnedOn(E_GL_NV_fragment_shader_barycentric))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
#endif
|
||||
|
||||
case FLAT:
|
||||
if (parseContext.profile == EEsProfile && parseContext.version < 300)
|
||||
reservedWord();
|
||||
|
@ -1553,6 +1587,16 @@ int TScanContext::tokenizeIdentifier()
|
|||
return identifierOrReserved(reserved);
|
||||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case PERPRIMITIVENV:
|
||||
case PERVIEWNV:
|
||||
case PERTASKNV:
|
||||
if (parseContext.profile != EEsProfile &&
|
||||
(parseContext.version >= 450 || parseContext.extensionTurnedOn(E_GL_NV_mesh_shader)))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
#endif
|
||||
|
||||
default:
|
||||
parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc);
|
||||
return 0;
|
||||
|
|
|
@ -347,6 +347,31 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
|
|||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
// check for ray tracing stages
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGenNV, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangIntersectNV, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangAnyHitNV, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangClosestHitNV, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMissNV, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
}
|
||||
// check for mesh
|
||||
if (profile != EEsProfile && version >= 450)
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMeshNV, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
|
||||
// check for task
|
||||
if (profile != EEsProfile && version >= 450)
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTaskNV, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -570,6 +595,27 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
|
|||
version = profile == EEsProfile ? 310 : 420;
|
||||
}
|
||||
break;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EShLangRayGenNV:
|
||||
case EShLangIntersectNV:
|
||||
case EShLangAnyHitNV:
|
||||
case EShLangClosestHitNV:
|
||||
case EShLangCallableNV:
|
||||
if (profile == EEsProfile || version < 460) {
|
||||
correct = false;
|
||||
infoSink.info.message(EPrefixError, "#version: raytracing shaders require non-es profile with version 460 or above");
|
||||
version = 460;
|
||||
}
|
||||
break;
|
||||
case EShLangMeshNV:
|
||||
case EShLangTaskNV:
|
||||
if ((profile == EEsProfile) ||
|
||||
(profile != EEsProfile && version < 450)) {
|
||||
correct = false;
|
||||
infoSink.info.message(EPrefixError, "#version: mesh/task shaders require non-es profile with version 450 or above");
|
||||
version = 450;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -72,6 +72,9 @@ void TType::buildMangledName(TString& mangledName) const
|
|||
case EbtUint64: mangledName += "u64"; break;
|
||||
case EbtBool: mangledName += 'b'; break;
|
||||
case EbtAtomicUint: mangledName += "au"; break;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EbtAccStructNV: mangledName += "asnv"; break;
|
||||
#endif
|
||||
case EbtSampler:
|
||||
switch (sampler.type) {
|
||||
#ifdef AMD_EXTENSIONS
|
||||
|
|
|
@ -235,6 +235,12 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
extensionBehavior[E_GL_NV_conservative_raster_underestimation] = EBhDisable;
|
||||
extensionBehavior[E_GL_NV_shader_noperspective_interpolation] = EBhDisable;
|
||||
extensionBehavior[E_GL_NV_shader_subgroup_partitioned] = EBhDisable;
|
||||
extensionBehavior[E_GL_NV_shading_rate_image] = EBhDisable;
|
||||
extensionBehavior[E_GL_NVX_raytracing] = EBhDisable;
|
||||
extensionBehavior[E_GL_NV_fragment_shader_barycentric] = EBhDisable;
|
||||
extensionBehavior[E_GL_NV_compute_shader_derivatives] = EBhDisable;
|
||||
extensionBehavior[E_GL_NV_shader_texture_footprint] = EBhDisable;
|
||||
extensionBehavior[E_GL_NV_mesh_shader] = EBhDisable;
|
||||
#endif
|
||||
|
||||
// AEP
|
||||
|
@ -405,6 +411,12 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
"#define GL_NV_shader_atomic_int64 1\n"
|
||||
"#define GL_NV_conservative_raster_underestimation 1\n"
|
||||
"#define GL_NV_shader_subgroup_partitioned 1\n"
|
||||
"#define GL_NV_shading_rate_image 1\n"
|
||||
"#define GL_NVX_raytracing 1\n"
|
||||
"#define GL_NV_fragment_shader_barycentric 1\n"
|
||||
"#define GL_NV_compute_shader_derivatives 1\n"
|
||||
"#define GL_NV_shader_texture_footprint 1\n"
|
||||
"#define GL_NV_mesh_shader 1\n"
|
||||
#endif
|
||||
"#define GL_KHX_shader_explicit_arithmetic_types 1\n"
|
||||
"#define GL_KHX_shader_explicit_arithmetic_types_int8 1\n"
|
||||
|
@ -492,6 +504,16 @@ const char* StageName(EShLanguage stage)
|
|||
case EShLangGeometry: return "geometry";
|
||||
case EShLangFragment: return "fragment";
|
||||
case EShLangCompute: return "compute";
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EShLangRayGenNV: return "ray-generation";
|
||||
case EShLangIntersectNV: return "intersection";
|
||||
case EShLangAnyHitNV: return "any-hit";
|
||||
case EShLangClosestHitNV: return "closest-hit";
|
||||
case EShLangMissNV: return "miss";
|
||||
case EShLangCallableNV: return "callable";
|
||||
case EShLangMeshNV: return "mesh";
|
||||
case EShLangTaskNV: return "task";
|
||||
#endif
|
||||
default: return "unknown stage";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -207,6 +207,12 @@ const char* const E_GL_NV_shader_atomic_int64 = "GL_NV_shader_
|
|||
const char* const E_GL_NV_conservative_raster_underestimation = "GL_NV_conservative_raster_underestimation";
|
||||
const char* const E_GL_NV_shader_noperspective_interpolation = "GL_NV_shader_noperspective_interpolation";
|
||||
const char* const E_GL_NV_shader_subgroup_partitioned = "GL_NV_shader_subgroup_partitioned";
|
||||
const char* const E_GL_NV_shading_rate_image = "GL_NV_shading_rate_image";
|
||||
const char* const E_GL_NVX_raytracing = "GL_NVX_raytracing";
|
||||
const char* const E_GL_NV_fragment_shader_barycentric = "GL_NV_fragment_shader_barycentric";
|
||||
const char* const E_GL_NV_compute_shader_derivatives = "GL_NV_compute_shader_derivatives";
|
||||
const char* const E_GL_NV_shader_texture_footprint = "GL_NV_shader_texture_footprint";
|
||||
const char* const E_GL_NV_mesh_shader = "GL_NV_mesh_shader";
|
||||
|
||||
// Arrays of extensions for the above viewportEXTs duplications
|
||||
|
||||
|
|
|
@ -140,13 +140,13 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
%token <lex> U8VEC2 U8VEC3 U8VEC4
|
||||
%token <lex> VEC2 VEC3 VEC4
|
||||
%token <lex> MAT2 MAT3 MAT4 CENTROID IN OUT INOUT
|
||||
%token <lex> UNIFORM PATCH SAMPLE BUFFER SHARED NONUNIFORM
|
||||
%token <lex> UNIFORM PATCH SAMPLE BUFFER SHARED NONUNIFORM PAYLOADNV PAYLOADINNV HITATTRNV
|
||||
%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT SUBGROUPCOHERENT NONPRIVATE
|
||||
%token <lex> DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4
|
||||
%token <lex> F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4
|
||||
%token <lex> F32VEC2 F32VEC3 F32VEC4 F32MAT2 F32MAT3 F32MAT4
|
||||
%token <lex> F64VEC2 F64VEC3 F64VEC4 F64MAT2 F64MAT3 F64MAT4
|
||||
%token <lex> NOPERSPECTIVE FLAT SMOOTH LAYOUT EXPLICITINTERPAMD
|
||||
%token <lex> NOPERSPECTIVE FLAT SMOOTH LAYOUT EXPLICITINTERPAMD PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV
|
||||
|
||||
%token <lex> MAT2X2 MAT2X3 MAT2X4
|
||||
%token <lex> MAT3X2 MAT3X3 MAT3X4
|
||||
|
@ -164,6 +164,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
%token <lex> F64MAT3X2 F64MAT3X3 F64MAT3X4
|
||||
%token <lex> F64MAT4X2 F64MAT4X3 F64MAT4X4
|
||||
%token <lex> ATOMIC_UINT
|
||||
%token <lex> ACCSTRUCTNV
|
||||
|
||||
// combined image/sampler
|
||||
%token <lex> SAMPLER1D SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLER1DSHADOW SAMPLER2DSHADOW
|
||||
|
@ -1142,6 +1143,40 @@ interpolation_qualifier
|
|||
parseContext.profileRequires($1.loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.explicitInterp = true;
|
||||
#endif
|
||||
}
|
||||
| PERVERTEXNV {
|
||||
#ifdef NV_EXTENSIONS
|
||||
parseContext.globalCheck($1.loc, "pervertexNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric");
|
||||
parseContext.profileRequires($1.loc, ECompatibilityProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric");
|
||||
parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.pervertexNV = true;
|
||||
#endif
|
||||
}
|
||||
| PERPRIMITIVENV {
|
||||
#ifdef NV_EXTENSIONS
|
||||
parseContext.globalCheck($1.loc, "perprimitiveNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_NV_mesh_shader, "perprimitiveNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perPrimitiveNV = true;
|
||||
#endif
|
||||
}
|
||||
| PERVIEWNV {
|
||||
#ifdef NV_EXTENSIONS
|
||||
parseContext.globalCheck($1.loc, "perviewNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_NV_mesh_shader, "perviewNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perViewNV = true;
|
||||
#endif
|
||||
}
|
||||
| PERTASKNV {
|
||||
#ifdef NV_EXTENSIONS
|
||||
parseContext.globalCheck($1.loc, "taskNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_NV_mesh_shader, "taskNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perTaskNV = true;
|
||||
#endif
|
||||
}
|
||||
;
|
||||
|
@ -1305,11 +1340,45 @@ storage_qualifier
|
|||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqBuffer;
|
||||
}
|
||||
| HITATTRNV {
|
||||
#ifdef NV_EXTENSIONS
|
||||
parseContext.globalCheck($1.loc, "hitAttributeNVX");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectNVMask | EShLangClosestHitNVMask
|
||||
| EShLangAnyHitNVMask), "hitAttributeNVX");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_NVX_raytracing, "hitAttributeNVX");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqHitAttrNV;
|
||||
#endif
|
||||
}
|
||||
| PAYLOADNV {
|
||||
#ifdef NV_EXTENSIONS
|
||||
parseContext.globalCheck($1.loc, "rayPayloadNVX");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenNVMask | EShLangClosestHitNVMask |
|
||||
EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadNVX");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_NVX_raytracing, "rayPayloadNVX");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqPayloadNV;
|
||||
#endif
|
||||
}
|
||||
| PAYLOADINNV {
|
||||
#ifdef NV_EXTENSIONS
|
||||
parseContext.globalCheck($1.loc, "rayPayloadInNVX");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitNVMask |
|
||||
EShLangAnyHitNVMask | EShLangMissNVMask), "rayPayloadInNVX");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_NVX_raytracing, "rayPayloadInNVX");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqPayloadInNV;
|
||||
#endif
|
||||
}
|
||||
| SHARED {
|
||||
parseContext.globalCheck($1.loc, "shared");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
|
||||
parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared");
|
||||
#ifdef NV_EXTENSIONS
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared");
|
||||
#else
|
||||
parseContext.requireStage($1.loc, EShLangCompute, "shared");
|
||||
#endif
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqShared;
|
||||
}
|
||||
|
@ -2139,6 +2208,12 @@ type_specifier_nonarray
|
|||
$$.basicType = EbtDouble;
|
||||
$$.setMatrix(4, 4);
|
||||
}
|
||||
| ACCSTRUCTNV {
|
||||
#ifdef NV_EXTENSIONS
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtAccStructNV;
|
||||
#endif
|
||||
}
|
||||
| ATOMIC_UINT {
|
||||
parseContext.vulkanRemoved($1.loc, "atomic counter types");
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -125,319 +125,327 @@ extern int yydebug;
|
|||
BUFFER = 335,
|
||||
SHARED = 336,
|
||||
NONUNIFORM = 337,
|
||||
COHERENT = 338,
|
||||
VOLATILE = 339,
|
||||
RESTRICT = 340,
|
||||
READONLY = 341,
|
||||
WRITEONLY = 342,
|
||||
DEVICECOHERENT = 343,
|
||||
QUEUEFAMILYCOHERENT = 344,
|
||||
WORKGROUPCOHERENT = 345,
|
||||
SUBGROUPCOHERENT = 346,
|
||||
NONPRIVATE = 347,
|
||||
DVEC2 = 348,
|
||||
DVEC3 = 349,
|
||||
DVEC4 = 350,
|
||||
DMAT2 = 351,
|
||||
DMAT3 = 352,
|
||||
DMAT4 = 353,
|
||||
F16VEC2 = 354,
|
||||
F16VEC3 = 355,
|
||||
F16VEC4 = 356,
|
||||
F16MAT2 = 357,
|
||||
F16MAT3 = 358,
|
||||
F16MAT4 = 359,
|
||||
F32VEC2 = 360,
|
||||
F32VEC3 = 361,
|
||||
F32VEC4 = 362,
|
||||
F32MAT2 = 363,
|
||||
F32MAT3 = 364,
|
||||
F32MAT4 = 365,
|
||||
F64VEC2 = 366,
|
||||
F64VEC3 = 367,
|
||||
F64VEC4 = 368,
|
||||
F64MAT2 = 369,
|
||||
F64MAT3 = 370,
|
||||
F64MAT4 = 371,
|
||||
NOPERSPECTIVE = 372,
|
||||
FLAT = 373,
|
||||
SMOOTH = 374,
|
||||
LAYOUT = 375,
|
||||
EXPLICITINTERPAMD = 376,
|
||||
MAT2X2 = 377,
|
||||
MAT2X3 = 378,
|
||||
MAT2X4 = 379,
|
||||
MAT3X2 = 380,
|
||||
MAT3X3 = 381,
|
||||
MAT3X4 = 382,
|
||||
MAT4X2 = 383,
|
||||
MAT4X3 = 384,
|
||||
MAT4X4 = 385,
|
||||
DMAT2X2 = 386,
|
||||
DMAT2X3 = 387,
|
||||
DMAT2X4 = 388,
|
||||
DMAT3X2 = 389,
|
||||
DMAT3X3 = 390,
|
||||
DMAT3X4 = 391,
|
||||
DMAT4X2 = 392,
|
||||
DMAT4X3 = 393,
|
||||
DMAT4X4 = 394,
|
||||
F16MAT2X2 = 395,
|
||||
F16MAT2X3 = 396,
|
||||
F16MAT2X4 = 397,
|
||||
F16MAT3X2 = 398,
|
||||
F16MAT3X3 = 399,
|
||||
F16MAT3X4 = 400,
|
||||
F16MAT4X2 = 401,
|
||||
F16MAT4X3 = 402,
|
||||
F16MAT4X4 = 403,
|
||||
F32MAT2X2 = 404,
|
||||
F32MAT2X3 = 405,
|
||||
F32MAT2X4 = 406,
|
||||
F32MAT3X2 = 407,
|
||||
F32MAT3X3 = 408,
|
||||
F32MAT3X4 = 409,
|
||||
F32MAT4X2 = 410,
|
||||
F32MAT4X3 = 411,
|
||||
F32MAT4X4 = 412,
|
||||
F64MAT2X2 = 413,
|
||||
F64MAT2X3 = 414,
|
||||
F64MAT2X4 = 415,
|
||||
F64MAT3X2 = 416,
|
||||
F64MAT3X3 = 417,
|
||||
F64MAT3X4 = 418,
|
||||
F64MAT4X2 = 419,
|
||||
F64MAT4X3 = 420,
|
||||
F64MAT4X4 = 421,
|
||||
ATOMIC_UINT = 422,
|
||||
SAMPLER1D = 423,
|
||||
SAMPLER2D = 424,
|
||||
SAMPLER3D = 425,
|
||||
SAMPLERCUBE = 426,
|
||||
SAMPLER1DSHADOW = 427,
|
||||
SAMPLER2DSHADOW = 428,
|
||||
SAMPLERCUBESHADOW = 429,
|
||||
SAMPLER1DARRAY = 430,
|
||||
SAMPLER2DARRAY = 431,
|
||||
SAMPLER1DARRAYSHADOW = 432,
|
||||
SAMPLER2DARRAYSHADOW = 433,
|
||||
ISAMPLER1D = 434,
|
||||
ISAMPLER2D = 435,
|
||||
ISAMPLER3D = 436,
|
||||
ISAMPLERCUBE = 437,
|
||||
ISAMPLER1DARRAY = 438,
|
||||
ISAMPLER2DARRAY = 439,
|
||||
USAMPLER1D = 440,
|
||||
USAMPLER2D = 441,
|
||||
USAMPLER3D = 442,
|
||||
USAMPLERCUBE = 443,
|
||||
USAMPLER1DARRAY = 444,
|
||||
USAMPLER2DARRAY = 445,
|
||||
SAMPLER2DRECT = 446,
|
||||
SAMPLER2DRECTSHADOW = 447,
|
||||
ISAMPLER2DRECT = 448,
|
||||
USAMPLER2DRECT = 449,
|
||||
SAMPLERBUFFER = 450,
|
||||
ISAMPLERBUFFER = 451,
|
||||
USAMPLERBUFFER = 452,
|
||||
SAMPLERCUBEARRAY = 453,
|
||||
SAMPLERCUBEARRAYSHADOW = 454,
|
||||
ISAMPLERCUBEARRAY = 455,
|
||||
USAMPLERCUBEARRAY = 456,
|
||||
SAMPLER2DMS = 457,
|
||||
ISAMPLER2DMS = 458,
|
||||
USAMPLER2DMS = 459,
|
||||
SAMPLER2DMSARRAY = 460,
|
||||
ISAMPLER2DMSARRAY = 461,
|
||||
USAMPLER2DMSARRAY = 462,
|
||||
SAMPLEREXTERNALOES = 463,
|
||||
F16SAMPLER1D = 464,
|
||||
F16SAMPLER2D = 465,
|
||||
F16SAMPLER3D = 466,
|
||||
F16SAMPLER2DRECT = 467,
|
||||
F16SAMPLERCUBE = 468,
|
||||
F16SAMPLER1DARRAY = 469,
|
||||
F16SAMPLER2DARRAY = 470,
|
||||
F16SAMPLERCUBEARRAY = 471,
|
||||
F16SAMPLERBUFFER = 472,
|
||||
F16SAMPLER2DMS = 473,
|
||||
F16SAMPLER2DMSARRAY = 474,
|
||||
F16SAMPLER1DSHADOW = 475,
|
||||
F16SAMPLER2DSHADOW = 476,
|
||||
F16SAMPLER1DARRAYSHADOW = 477,
|
||||
F16SAMPLER2DARRAYSHADOW = 478,
|
||||
F16SAMPLER2DRECTSHADOW = 479,
|
||||
F16SAMPLERCUBESHADOW = 480,
|
||||
F16SAMPLERCUBEARRAYSHADOW = 481,
|
||||
SAMPLER = 482,
|
||||
SAMPLERSHADOW = 483,
|
||||
TEXTURE1D = 484,
|
||||
TEXTURE2D = 485,
|
||||
TEXTURE3D = 486,
|
||||
TEXTURECUBE = 487,
|
||||
TEXTURE1DARRAY = 488,
|
||||
TEXTURE2DARRAY = 489,
|
||||
ITEXTURE1D = 490,
|
||||
ITEXTURE2D = 491,
|
||||
ITEXTURE3D = 492,
|
||||
ITEXTURECUBE = 493,
|
||||
ITEXTURE1DARRAY = 494,
|
||||
ITEXTURE2DARRAY = 495,
|
||||
UTEXTURE1D = 496,
|
||||
UTEXTURE2D = 497,
|
||||
UTEXTURE3D = 498,
|
||||
UTEXTURECUBE = 499,
|
||||
UTEXTURE1DARRAY = 500,
|
||||
UTEXTURE2DARRAY = 501,
|
||||
TEXTURE2DRECT = 502,
|
||||
ITEXTURE2DRECT = 503,
|
||||
UTEXTURE2DRECT = 504,
|
||||
TEXTUREBUFFER = 505,
|
||||
ITEXTUREBUFFER = 506,
|
||||
UTEXTUREBUFFER = 507,
|
||||
TEXTURECUBEARRAY = 508,
|
||||
ITEXTURECUBEARRAY = 509,
|
||||
UTEXTURECUBEARRAY = 510,
|
||||
TEXTURE2DMS = 511,
|
||||
ITEXTURE2DMS = 512,
|
||||
UTEXTURE2DMS = 513,
|
||||
TEXTURE2DMSARRAY = 514,
|
||||
ITEXTURE2DMSARRAY = 515,
|
||||
UTEXTURE2DMSARRAY = 516,
|
||||
F16TEXTURE1D = 517,
|
||||
F16TEXTURE2D = 518,
|
||||
F16TEXTURE3D = 519,
|
||||
F16TEXTURE2DRECT = 520,
|
||||
F16TEXTURECUBE = 521,
|
||||
F16TEXTURE1DARRAY = 522,
|
||||
F16TEXTURE2DARRAY = 523,
|
||||
F16TEXTURECUBEARRAY = 524,
|
||||
F16TEXTUREBUFFER = 525,
|
||||
F16TEXTURE2DMS = 526,
|
||||
F16TEXTURE2DMSARRAY = 527,
|
||||
SUBPASSINPUT = 528,
|
||||
SUBPASSINPUTMS = 529,
|
||||
ISUBPASSINPUT = 530,
|
||||
ISUBPASSINPUTMS = 531,
|
||||
USUBPASSINPUT = 532,
|
||||
USUBPASSINPUTMS = 533,
|
||||
F16SUBPASSINPUT = 534,
|
||||
F16SUBPASSINPUTMS = 535,
|
||||
IMAGE1D = 536,
|
||||
IIMAGE1D = 537,
|
||||
UIMAGE1D = 538,
|
||||
IMAGE2D = 539,
|
||||
IIMAGE2D = 540,
|
||||
UIMAGE2D = 541,
|
||||
IMAGE3D = 542,
|
||||
IIMAGE3D = 543,
|
||||
UIMAGE3D = 544,
|
||||
IMAGE2DRECT = 545,
|
||||
IIMAGE2DRECT = 546,
|
||||
UIMAGE2DRECT = 547,
|
||||
IMAGECUBE = 548,
|
||||
IIMAGECUBE = 549,
|
||||
UIMAGECUBE = 550,
|
||||
IMAGEBUFFER = 551,
|
||||
IIMAGEBUFFER = 552,
|
||||
UIMAGEBUFFER = 553,
|
||||
IMAGE1DARRAY = 554,
|
||||
IIMAGE1DARRAY = 555,
|
||||
UIMAGE1DARRAY = 556,
|
||||
IMAGE2DARRAY = 557,
|
||||
IIMAGE2DARRAY = 558,
|
||||
UIMAGE2DARRAY = 559,
|
||||
IMAGECUBEARRAY = 560,
|
||||
IIMAGECUBEARRAY = 561,
|
||||
UIMAGECUBEARRAY = 562,
|
||||
IMAGE2DMS = 563,
|
||||
IIMAGE2DMS = 564,
|
||||
UIMAGE2DMS = 565,
|
||||
IMAGE2DMSARRAY = 566,
|
||||
IIMAGE2DMSARRAY = 567,
|
||||
UIMAGE2DMSARRAY = 568,
|
||||
F16IMAGE1D = 569,
|
||||
F16IMAGE2D = 570,
|
||||
F16IMAGE3D = 571,
|
||||
F16IMAGE2DRECT = 572,
|
||||
F16IMAGECUBE = 573,
|
||||
F16IMAGE1DARRAY = 574,
|
||||
F16IMAGE2DARRAY = 575,
|
||||
F16IMAGECUBEARRAY = 576,
|
||||
F16IMAGEBUFFER = 577,
|
||||
F16IMAGE2DMS = 578,
|
||||
F16IMAGE2DMSARRAY = 579,
|
||||
STRUCT = 580,
|
||||
VOID = 581,
|
||||
WHILE = 582,
|
||||
IDENTIFIER = 583,
|
||||
TYPE_NAME = 584,
|
||||
FLOATCONSTANT = 585,
|
||||
DOUBLECONSTANT = 586,
|
||||
INT16CONSTANT = 587,
|
||||
UINT16CONSTANT = 588,
|
||||
INT32CONSTANT = 589,
|
||||
UINT32CONSTANT = 590,
|
||||
INTCONSTANT = 591,
|
||||
UINTCONSTANT = 592,
|
||||
INT64CONSTANT = 593,
|
||||
UINT64CONSTANT = 594,
|
||||
BOOLCONSTANT = 595,
|
||||
FLOAT16CONSTANT = 596,
|
||||
LEFT_OP = 597,
|
||||
RIGHT_OP = 598,
|
||||
INC_OP = 599,
|
||||
DEC_OP = 600,
|
||||
LE_OP = 601,
|
||||
GE_OP = 602,
|
||||
EQ_OP = 603,
|
||||
NE_OP = 604,
|
||||
AND_OP = 605,
|
||||
OR_OP = 606,
|
||||
XOR_OP = 607,
|
||||
MUL_ASSIGN = 608,
|
||||
DIV_ASSIGN = 609,
|
||||
ADD_ASSIGN = 610,
|
||||
MOD_ASSIGN = 611,
|
||||
LEFT_ASSIGN = 612,
|
||||
RIGHT_ASSIGN = 613,
|
||||
AND_ASSIGN = 614,
|
||||
XOR_ASSIGN = 615,
|
||||
OR_ASSIGN = 616,
|
||||
SUB_ASSIGN = 617,
|
||||
LEFT_PAREN = 618,
|
||||
RIGHT_PAREN = 619,
|
||||
LEFT_BRACKET = 620,
|
||||
RIGHT_BRACKET = 621,
|
||||
LEFT_BRACE = 622,
|
||||
RIGHT_BRACE = 623,
|
||||
DOT = 624,
|
||||
COMMA = 625,
|
||||
COLON = 626,
|
||||
EQUAL = 627,
|
||||
SEMICOLON = 628,
|
||||
BANG = 629,
|
||||
DASH = 630,
|
||||
TILDE = 631,
|
||||
PLUS = 632,
|
||||
STAR = 633,
|
||||
SLASH = 634,
|
||||
PERCENT = 635,
|
||||
LEFT_ANGLE = 636,
|
||||
RIGHT_ANGLE = 637,
|
||||
VERTICAL_BAR = 638,
|
||||
CARET = 639,
|
||||
AMPERSAND = 640,
|
||||
QUESTION = 641,
|
||||
INVARIANT = 642,
|
||||
PRECISE = 643,
|
||||
HIGH_PRECISION = 644,
|
||||
MEDIUM_PRECISION = 645,
|
||||
LOW_PRECISION = 646,
|
||||
PRECISION = 647,
|
||||
PACKED = 648,
|
||||
RESOURCE = 649,
|
||||
SUPERP = 650
|
||||
PAYLOADNV = 338,
|
||||
PAYLOADINNV = 339,
|
||||
HITATTRNV = 340,
|
||||
COHERENT = 341,
|
||||
VOLATILE = 342,
|
||||
RESTRICT = 343,
|
||||
READONLY = 344,
|
||||
WRITEONLY = 345,
|
||||
DEVICECOHERENT = 346,
|
||||
QUEUEFAMILYCOHERENT = 347,
|
||||
WORKGROUPCOHERENT = 348,
|
||||
SUBGROUPCOHERENT = 349,
|
||||
NONPRIVATE = 350,
|
||||
DVEC2 = 351,
|
||||
DVEC3 = 352,
|
||||
DVEC4 = 353,
|
||||
DMAT2 = 354,
|
||||
DMAT3 = 355,
|
||||
DMAT4 = 356,
|
||||
F16VEC2 = 357,
|
||||
F16VEC3 = 358,
|
||||
F16VEC4 = 359,
|
||||
F16MAT2 = 360,
|
||||
F16MAT3 = 361,
|
||||
F16MAT4 = 362,
|
||||
F32VEC2 = 363,
|
||||
F32VEC3 = 364,
|
||||
F32VEC4 = 365,
|
||||
F32MAT2 = 366,
|
||||
F32MAT3 = 367,
|
||||
F32MAT4 = 368,
|
||||
F64VEC2 = 369,
|
||||
F64VEC3 = 370,
|
||||
F64VEC4 = 371,
|
||||
F64MAT2 = 372,
|
||||
F64MAT3 = 373,
|
||||
F64MAT4 = 374,
|
||||
NOPERSPECTIVE = 375,
|
||||
FLAT = 376,
|
||||
SMOOTH = 377,
|
||||
LAYOUT = 378,
|
||||
EXPLICITINTERPAMD = 379,
|
||||
PERVERTEXNV = 380,
|
||||
PERPRIMITIVENV = 381,
|
||||
PERVIEWNV = 382,
|
||||
PERTASKNV = 383,
|
||||
MAT2X2 = 384,
|
||||
MAT2X3 = 385,
|
||||
MAT2X4 = 386,
|
||||
MAT3X2 = 387,
|
||||
MAT3X3 = 388,
|
||||
MAT3X4 = 389,
|
||||
MAT4X2 = 390,
|
||||
MAT4X3 = 391,
|
||||
MAT4X4 = 392,
|
||||
DMAT2X2 = 393,
|
||||
DMAT2X3 = 394,
|
||||
DMAT2X4 = 395,
|
||||
DMAT3X2 = 396,
|
||||
DMAT3X3 = 397,
|
||||
DMAT3X4 = 398,
|
||||
DMAT4X2 = 399,
|
||||
DMAT4X3 = 400,
|
||||
DMAT4X4 = 401,
|
||||
F16MAT2X2 = 402,
|
||||
F16MAT2X3 = 403,
|
||||
F16MAT2X4 = 404,
|
||||
F16MAT3X2 = 405,
|
||||
F16MAT3X3 = 406,
|
||||
F16MAT3X4 = 407,
|
||||
F16MAT4X2 = 408,
|
||||
F16MAT4X3 = 409,
|
||||
F16MAT4X4 = 410,
|
||||
F32MAT2X2 = 411,
|
||||
F32MAT2X3 = 412,
|
||||
F32MAT2X4 = 413,
|
||||
F32MAT3X2 = 414,
|
||||
F32MAT3X3 = 415,
|
||||
F32MAT3X4 = 416,
|
||||
F32MAT4X2 = 417,
|
||||
F32MAT4X3 = 418,
|
||||
F32MAT4X4 = 419,
|
||||
F64MAT2X2 = 420,
|
||||
F64MAT2X3 = 421,
|
||||
F64MAT2X4 = 422,
|
||||
F64MAT3X2 = 423,
|
||||
F64MAT3X3 = 424,
|
||||
F64MAT3X4 = 425,
|
||||
F64MAT4X2 = 426,
|
||||
F64MAT4X3 = 427,
|
||||
F64MAT4X4 = 428,
|
||||
ATOMIC_UINT = 429,
|
||||
ACCSTRUCTNV = 430,
|
||||
SAMPLER1D = 431,
|
||||
SAMPLER2D = 432,
|
||||
SAMPLER3D = 433,
|
||||
SAMPLERCUBE = 434,
|
||||
SAMPLER1DSHADOW = 435,
|
||||
SAMPLER2DSHADOW = 436,
|
||||
SAMPLERCUBESHADOW = 437,
|
||||
SAMPLER1DARRAY = 438,
|
||||
SAMPLER2DARRAY = 439,
|
||||
SAMPLER1DARRAYSHADOW = 440,
|
||||
SAMPLER2DARRAYSHADOW = 441,
|
||||
ISAMPLER1D = 442,
|
||||
ISAMPLER2D = 443,
|
||||
ISAMPLER3D = 444,
|
||||
ISAMPLERCUBE = 445,
|
||||
ISAMPLER1DARRAY = 446,
|
||||
ISAMPLER2DARRAY = 447,
|
||||
USAMPLER1D = 448,
|
||||
USAMPLER2D = 449,
|
||||
USAMPLER3D = 450,
|
||||
USAMPLERCUBE = 451,
|
||||
USAMPLER1DARRAY = 452,
|
||||
USAMPLER2DARRAY = 453,
|
||||
SAMPLER2DRECT = 454,
|
||||
SAMPLER2DRECTSHADOW = 455,
|
||||
ISAMPLER2DRECT = 456,
|
||||
USAMPLER2DRECT = 457,
|
||||
SAMPLERBUFFER = 458,
|
||||
ISAMPLERBUFFER = 459,
|
||||
USAMPLERBUFFER = 460,
|
||||
SAMPLERCUBEARRAY = 461,
|
||||
SAMPLERCUBEARRAYSHADOW = 462,
|
||||
ISAMPLERCUBEARRAY = 463,
|
||||
USAMPLERCUBEARRAY = 464,
|
||||
SAMPLER2DMS = 465,
|
||||
ISAMPLER2DMS = 466,
|
||||
USAMPLER2DMS = 467,
|
||||
SAMPLER2DMSARRAY = 468,
|
||||
ISAMPLER2DMSARRAY = 469,
|
||||
USAMPLER2DMSARRAY = 470,
|
||||
SAMPLEREXTERNALOES = 471,
|
||||
F16SAMPLER1D = 472,
|
||||
F16SAMPLER2D = 473,
|
||||
F16SAMPLER3D = 474,
|
||||
F16SAMPLER2DRECT = 475,
|
||||
F16SAMPLERCUBE = 476,
|
||||
F16SAMPLER1DARRAY = 477,
|
||||
F16SAMPLER2DARRAY = 478,
|
||||
F16SAMPLERCUBEARRAY = 479,
|
||||
F16SAMPLERBUFFER = 480,
|
||||
F16SAMPLER2DMS = 481,
|
||||
F16SAMPLER2DMSARRAY = 482,
|
||||
F16SAMPLER1DSHADOW = 483,
|
||||
F16SAMPLER2DSHADOW = 484,
|
||||
F16SAMPLER1DARRAYSHADOW = 485,
|
||||
F16SAMPLER2DARRAYSHADOW = 486,
|
||||
F16SAMPLER2DRECTSHADOW = 487,
|
||||
F16SAMPLERCUBESHADOW = 488,
|
||||
F16SAMPLERCUBEARRAYSHADOW = 489,
|
||||
SAMPLER = 490,
|
||||
SAMPLERSHADOW = 491,
|
||||
TEXTURE1D = 492,
|
||||
TEXTURE2D = 493,
|
||||
TEXTURE3D = 494,
|
||||
TEXTURECUBE = 495,
|
||||
TEXTURE1DARRAY = 496,
|
||||
TEXTURE2DARRAY = 497,
|
||||
ITEXTURE1D = 498,
|
||||
ITEXTURE2D = 499,
|
||||
ITEXTURE3D = 500,
|
||||
ITEXTURECUBE = 501,
|
||||
ITEXTURE1DARRAY = 502,
|
||||
ITEXTURE2DARRAY = 503,
|
||||
UTEXTURE1D = 504,
|
||||
UTEXTURE2D = 505,
|
||||
UTEXTURE3D = 506,
|
||||
UTEXTURECUBE = 507,
|
||||
UTEXTURE1DARRAY = 508,
|
||||
UTEXTURE2DARRAY = 509,
|
||||
TEXTURE2DRECT = 510,
|
||||
ITEXTURE2DRECT = 511,
|
||||
UTEXTURE2DRECT = 512,
|
||||
TEXTUREBUFFER = 513,
|
||||
ITEXTUREBUFFER = 514,
|
||||
UTEXTUREBUFFER = 515,
|
||||
TEXTURECUBEARRAY = 516,
|
||||
ITEXTURECUBEARRAY = 517,
|
||||
UTEXTURECUBEARRAY = 518,
|
||||
TEXTURE2DMS = 519,
|
||||
ITEXTURE2DMS = 520,
|
||||
UTEXTURE2DMS = 521,
|
||||
TEXTURE2DMSARRAY = 522,
|
||||
ITEXTURE2DMSARRAY = 523,
|
||||
UTEXTURE2DMSARRAY = 524,
|
||||
F16TEXTURE1D = 525,
|
||||
F16TEXTURE2D = 526,
|
||||
F16TEXTURE3D = 527,
|
||||
F16TEXTURE2DRECT = 528,
|
||||
F16TEXTURECUBE = 529,
|
||||
F16TEXTURE1DARRAY = 530,
|
||||
F16TEXTURE2DARRAY = 531,
|
||||
F16TEXTURECUBEARRAY = 532,
|
||||
F16TEXTUREBUFFER = 533,
|
||||
F16TEXTURE2DMS = 534,
|
||||
F16TEXTURE2DMSARRAY = 535,
|
||||
SUBPASSINPUT = 536,
|
||||
SUBPASSINPUTMS = 537,
|
||||
ISUBPASSINPUT = 538,
|
||||
ISUBPASSINPUTMS = 539,
|
||||
USUBPASSINPUT = 540,
|
||||
USUBPASSINPUTMS = 541,
|
||||
F16SUBPASSINPUT = 542,
|
||||
F16SUBPASSINPUTMS = 543,
|
||||
IMAGE1D = 544,
|
||||
IIMAGE1D = 545,
|
||||
UIMAGE1D = 546,
|
||||
IMAGE2D = 547,
|
||||
IIMAGE2D = 548,
|
||||
UIMAGE2D = 549,
|
||||
IMAGE3D = 550,
|
||||
IIMAGE3D = 551,
|
||||
UIMAGE3D = 552,
|
||||
IMAGE2DRECT = 553,
|
||||
IIMAGE2DRECT = 554,
|
||||
UIMAGE2DRECT = 555,
|
||||
IMAGECUBE = 556,
|
||||
IIMAGECUBE = 557,
|
||||
UIMAGECUBE = 558,
|
||||
IMAGEBUFFER = 559,
|
||||
IIMAGEBUFFER = 560,
|
||||
UIMAGEBUFFER = 561,
|
||||
IMAGE1DARRAY = 562,
|
||||
IIMAGE1DARRAY = 563,
|
||||
UIMAGE1DARRAY = 564,
|
||||
IMAGE2DARRAY = 565,
|
||||
IIMAGE2DARRAY = 566,
|
||||
UIMAGE2DARRAY = 567,
|
||||
IMAGECUBEARRAY = 568,
|
||||
IIMAGECUBEARRAY = 569,
|
||||
UIMAGECUBEARRAY = 570,
|
||||
IMAGE2DMS = 571,
|
||||
IIMAGE2DMS = 572,
|
||||
UIMAGE2DMS = 573,
|
||||
IMAGE2DMSARRAY = 574,
|
||||
IIMAGE2DMSARRAY = 575,
|
||||
UIMAGE2DMSARRAY = 576,
|
||||
F16IMAGE1D = 577,
|
||||
F16IMAGE2D = 578,
|
||||
F16IMAGE3D = 579,
|
||||
F16IMAGE2DRECT = 580,
|
||||
F16IMAGECUBE = 581,
|
||||
F16IMAGE1DARRAY = 582,
|
||||
F16IMAGE2DARRAY = 583,
|
||||
F16IMAGECUBEARRAY = 584,
|
||||
F16IMAGEBUFFER = 585,
|
||||
F16IMAGE2DMS = 586,
|
||||
F16IMAGE2DMSARRAY = 587,
|
||||
STRUCT = 588,
|
||||
VOID = 589,
|
||||
WHILE = 590,
|
||||
IDENTIFIER = 591,
|
||||
TYPE_NAME = 592,
|
||||
FLOATCONSTANT = 593,
|
||||
DOUBLECONSTANT = 594,
|
||||
INT16CONSTANT = 595,
|
||||
UINT16CONSTANT = 596,
|
||||
INT32CONSTANT = 597,
|
||||
UINT32CONSTANT = 598,
|
||||
INTCONSTANT = 599,
|
||||
UINTCONSTANT = 600,
|
||||
INT64CONSTANT = 601,
|
||||
UINT64CONSTANT = 602,
|
||||
BOOLCONSTANT = 603,
|
||||
FLOAT16CONSTANT = 604,
|
||||
LEFT_OP = 605,
|
||||
RIGHT_OP = 606,
|
||||
INC_OP = 607,
|
||||
DEC_OP = 608,
|
||||
LE_OP = 609,
|
||||
GE_OP = 610,
|
||||
EQ_OP = 611,
|
||||
NE_OP = 612,
|
||||
AND_OP = 613,
|
||||
OR_OP = 614,
|
||||
XOR_OP = 615,
|
||||
MUL_ASSIGN = 616,
|
||||
DIV_ASSIGN = 617,
|
||||
ADD_ASSIGN = 618,
|
||||
MOD_ASSIGN = 619,
|
||||
LEFT_ASSIGN = 620,
|
||||
RIGHT_ASSIGN = 621,
|
||||
AND_ASSIGN = 622,
|
||||
XOR_ASSIGN = 623,
|
||||
OR_ASSIGN = 624,
|
||||
SUB_ASSIGN = 625,
|
||||
LEFT_PAREN = 626,
|
||||
RIGHT_PAREN = 627,
|
||||
LEFT_BRACKET = 628,
|
||||
RIGHT_BRACKET = 629,
|
||||
LEFT_BRACE = 630,
|
||||
RIGHT_BRACE = 631,
|
||||
DOT = 632,
|
||||
COMMA = 633,
|
||||
COLON = 634,
|
||||
EQUAL = 635,
|
||||
SEMICOLON = 636,
|
||||
BANG = 637,
|
||||
DASH = 638,
|
||||
TILDE = 639,
|
||||
PLUS = 640,
|
||||
STAR = 641,
|
||||
SLASH = 642,
|
||||
PERCENT = 643,
|
||||
LEFT_ANGLE = 644,
|
||||
RIGHT_ANGLE = 645,
|
||||
VERTICAL_BAR = 646,
|
||||
CARET = 647,
|
||||
AMPERSAND = 648,
|
||||
QUESTION = 649,
|
||||
INVARIANT = 650,
|
||||
PRECISE = 651,
|
||||
HIGH_PRECISION = 652,
|
||||
MEDIUM_PRECISION = 653,
|
||||
LOW_PRECISION = 654,
|
||||
PRECISION = 655,
|
||||
PACKED = 656,
|
||||
RESOURCE = 657,
|
||||
SUPERP = 658
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -481,7 +489,7 @@ union YYSTYPE
|
|||
};
|
||||
} interm;
|
||||
|
||||
#line 485 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
|
||||
#line 493 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
|
||||
};
|
||||
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
|
|
|
@ -956,7 +956,13 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
|||
case EOpSparseTextureGatherLodOffsets: out.debug << "sparseTextureGatherLodOffsets"; break;
|
||||
case EOpSparseImageLoadLod: out.debug << "sparseImageLoadLod"; break;
|
||||
#endif
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EOpImageSampleFootprintNV: out.debug << "imageSampleFootprintNV"; break;
|
||||
case EOpImageSampleFootprintClampNV: out.debug << "imageSampleFootprintClampNV"; break;
|
||||
case EOpImageSampleFootprintLodNV: out.debug << "imageSampleFootprintLodNV"; break;
|
||||
case EOpImageSampleFootprintGradNV: out.debug << "imageSampleFootprintGradNV"; break;
|
||||
case EOpImageSampleFootprintGradClampNV: out.debug << "mageSampleFootprintGradClampNV"; break;
|
||||
#endif
|
||||
case EOpAddCarry: out.debug << "addCarry"; break;
|
||||
case EOpSubBorrow: out.debug << "subBorrow"; break;
|
||||
case EOpUMulExtended: out.debug << "uMulExtended"; break;
|
||||
|
@ -1042,6 +1048,14 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
|||
case EOpSubpassLoad: out.debug << "subpassLoad"; break;
|
||||
case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EOpTraceNV: out.debug << "traceNVX"; break;
|
||||
case EOpReportIntersectionNV: out.debug << "reportIntersectionNVX"; break;
|
||||
case EOpIgnoreIntersectionNV: out.debug << "ignoreIntersectionNVX"; break;
|
||||
case EOpTerminateRayNV: out.debug << "terminateRayNVX"; break;
|
||||
case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; break;
|
||||
#endif
|
||||
|
||||
default: out.debug.message(EPrefixError, "Bad aggregation op");
|
||||
}
|
||||
|
||||
|
@ -1445,6 +1459,16 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
|
|||
}
|
||||
break;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EShLangMeshNV:
|
||||
infoSink.debug << "max_vertices = " << vertices << "\n";
|
||||
infoSink.debug << "max_primitives = " << primitives << "\n";
|
||||
infoSink.debug << "output primitive = " << TQualifier::getGeometryString(outputPrimitive) << "\n";
|
||||
// Fall through
|
||||
|
||||
case EShLangTaskNV:
|
||||
// Fall through
|
||||
#endif
|
||||
case EShLangCompute:
|
||||
infoSink.debug << "local_size = (" << localSize[0] << ", " << localSize[1] << ", " << localSize[2] << ")\n";
|
||||
{
|
||||
|
|
|
@ -141,13 +141,27 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
|
|||
if (vertices == TQualifier::layoutNotSet)
|
||||
vertices = unit.vertices;
|
||||
else if (vertices != unit.vertices) {
|
||||
if (language == EShLangGeometry)
|
||||
if (language == EShLangGeometry
|
||||
#ifdef NV_EXTENSIONS
|
||||
|| language == EShLangMeshNV
|
||||
#endif
|
||||
)
|
||||
error(infoSink, "Contradictory layout max_vertices values");
|
||||
else if (language == EShLangTessControl)
|
||||
error(infoSink, "Contradictory layout vertices values");
|
||||
else
|
||||
assert(0);
|
||||
}
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (primitives == TQualifier::layoutNotSet)
|
||||
primitives = unit.primitives;
|
||||
else if (primitives != unit.primitives) {
|
||||
if (language == EShLangMeshNV)
|
||||
error(infoSink, "Contradictory layout max_primitives values");
|
||||
else
|
||||
assert(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (inputPrimitive == ElgNone)
|
||||
inputPrimitive = unit.inputPrimitive;
|
||||
|
@ -265,6 +279,13 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit)
|
|||
}
|
||||
|
||||
// Getting this far means we have two existing trees to merge...
|
||||
#ifdef NV_EXTENSIONS
|
||||
numShaderRecordNVBlocks += unit.numShaderRecordNVBlocks;
|
||||
#endif
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
numTaskNVBlocks += unit.numTaskNVBlocks;
|
||||
#endif
|
||||
|
||||
// Get the top-level globals of each unit
|
||||
TIntermSequence& globals = treeRoot->getAsAggregate()->getSequence();
|
||||
|
@ -690,6 +711,31 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
|
|||
break;
|
||||
case EShLangCompute:
|
||||
break;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EShLangRayGenNV:
|
||||
case EShLangIntersectNV:
|
||||
case EShLangAnyHitNV:
|
||||
case EShLangClosestHitNV:
|
||||
case EShLangMissNV:
|
||||
case EShLangCallableNV:
|
||||
if (numShaderRecordNVBlocks > 1)
|
||||
error(infoSink, "Only one shaderRecordNVX buffer block is allowed per stage");
|
||||
break;
|
||||
case EShLangMeshNV:
|
||||
if (outputPrimitive == ElgNone)
|
||||
error(infoSink, "At least one shader must specify an output layout primitive");
|
||||
if (vertices == TQualifier::layoutNotSet)
|
||||
error(infoSink, "At least one shader must specify a layout(max_vertices = value)");
|
||||
if (primitives == TQualifier::layoutNotSet)
|
||||
error(infoSink, "At least one shader must specify a layout(max_primitives = value)");
|
||||
// fall through
|
||||
case EShLangTaskNV:
|
||||
if (numTaskNVBlocks > 1)
|
||||
error(infoSink, "Only one taskNV interface block is allowed per shader");
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
error(infoSink, "Unknown Stage.");
|
||||
break;
|
||||
|
@ -960,7 +1006,7 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
|
|||
return -1;
|
||||
|
||||
int size;
|
||||
if (qualifier.isUniformOrBuffer()) {
|
||||
if (qualifier.isUniformOrBuffer() || qualifier.isTaskMemory()) {
|
||||
if (type.isSizedArray())
|
||||
size = type.getCumulativeArraySize();
|
||||
else
|
||||
|
@ -1111,10 +1157,19 @@ int TIntermediate::computeTypeLocationSize(const TType& type, EShLanguage stage)
|
|||
// TODO: perf: this can be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness
|
||||
// TODO: are there valid cases of having an unsized array with a location? If so, running this code too early.
|
||||
TType elementType(type, 0);
|
||||
if (type.isSizedArray())
|
||||
if (type.isSizedArray()
|
||||
#ifdef NV_EXTENSIONS
|
||||
&& !type.getQualifier().isPerView()
|
||||
#endif
|
||||
)
|
||||
return type.getOuterArraySize() * computeTypeLocationSize(elementType, stage);
|
||||
else
|
||||
else {
|
||||
#ifdef NV_EXTENSIONS
|
||||
// unset perViewNV attributes for arrayed per-view outputs: "perviewNV vec4 v[MAX_VIEWS][3];"
|
||||
elementType.getQualifier().perViewNV = false;
|
||||
#endif
|
||||
return computeTypeLocationSize(elementType, stage);
|
||||
}
|
||||
}
|
||||
|
||||
// "The locations consumed by block and structure members are determined by applying the rules above
|
||||
|
|
|
@ -206,6 +206,17 @@ class TSymbolTable;
|
|||
class TSymbol;
|
||||
class TVariable;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
//
|
||||
// Texture and Sampler transformation mode.
|
||||
//
|
||||
enum ComputeDerivativeMode {
|
||||
LayoutDerivativeNone, // default layout as SPV_NV_compute_shader_derivatives not enabled
|
||||
LayoutDerivativeGroupQuads, // derivative_group_quadsNV
|
||||
LayoutDerivativeGroupLinear, // derivative_group_linearNV
|
||||
};
|
||||
#endif
|
||||
|
||||
//
|
||||
// Set of helper functions to help parse and build the tree.
|
||||
//
|
||||
|
@ -225,6 +236,10 @@ public:
|
|||
#ifdef NV_EXTENSIONS
|
||||
layoutOverrideCoverage(false),
|
||||
geoPassthroughEXT(false),
|
||||
numShaderRecordNVBlocks(0),
|
||||
computeDerivativeMode(LayoutDerivativeNone),
|
||||
primitives(TQualifier::layoutNotSet),
|
||||
numTaskNVBlocks(0),
|
||||
#endif
|
||||
autoMapBindings(false),
|
||||
autoMapLocations(false),
|
||||
|
@ -415,6 +430,11 @@ public:
|
|||
int getNumEntryPoints() const { return numEntryPoints; }
|
||||
int getNumErrors() const { return numErrors; }
|
||||
void addPushConstantCount() { ++numPushConstants; }
|
||||
#ifdef NV_EXTENSIONS
|
||||
void addShaderRecordNVCount() { ++numShaderRecordNVBlocks; }
|
||||
void addTaskNVCount() { ++numTaskNVBlocks; }
|
||||
#endif
|
||||
|
||||
bool isRecursive() const { return recursive; }
|
||||
|
||||
TIntermSymbol* addSymbol(const TVariable&);
|
||||
|
@ -622,6 +642,16 @@ public:
|
|||
bool getLayoutOverrideCoverage() const { return layoutOverrideCoverage; }
|
||||
void setGeoPassthroughEXT() { geoPassthroughEXT = true; }
|
||||
bool getGeoPassthroughEXT() const { return geoPassthroughEXT; }
|
||||
void setLayoutDerivativeMode(ComputeDerivativeMode mode) { computeDerivativeMode = mode; }
|
||||
ComputeDerivativeMode getLayoutDerivativeModeNone() const { return computeDerivativeMode; }
|
||||
bool setPrimitives(int m)
|
||||
{
|
||||
if (primitives != TQualifier::layoutNotSet)
|
||||
return primitives == m;
|
||||
primitives = m;
|
||||
return true;
|
||||
}
|
||||
int getPrimitives() const { return primitives; }
|
||||
#endif
|
||||
|
||||
const char* addSemanticName(const TString& name)
|
||||
|
@ -725,6 +755,10 @@ protected:
|
|||
#ifdef NV_EXTENSIONS
|
||||
bool layoutOverrideCoverage;
|
||||
bool geoPassthroughEXT;
|
||||
int numShaderRecordNVBlocks;
|
||||
ComputeDerivativeMode computeDerivativeMode;
|
||||
int primitives;
|
||||
int numTaskNVBlocks;
|
||||
#endif
|
||||
|
||||
// Base shift values
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
// This should always increase, as some paths to do not consume
|
||||
// a more major number.
|
||||
// It should increment by one when new functionality is added.
|
||||
#define GLSLANG_MINOR_VERSION 9
|
||||
#define GLSLANG_MINOR_VERSION 10
|
||||
|
||||
//
|
||||
// Call before doing any other compiler/linker operations.
|
||||
|
@ -94,6 +94,16 @@ typedef enum {
|
|||
EShLangGeometry,
|
||||
EShLangFragment,
|
||||
EShLangCompute,
|
||||
#ifdef NV_EXTENSIONS
|
||||
EShLangRayGenNV,
|
||||
EShLangIntersectNV,
|
||||
EShLangAnyHitNV,
|
||||
EShLangClosestHitNV,
|
||||
EShLangMissNV,
|
||||
EShLangCallableNV,
|
||||
EShLangTaskNV,
|
||||
EShLangMeshNV,
|
||||
#endif
|
||||
EShLangCount,
|
||||
} EShLanguage; // would be better as stage, but this is ancient now
|
||||
|
||||
|
@ -104,6 +114,16 @@ typedef enum {
|
|||
EShLangGeometryMask = (1 << EShLangGeometry),
|
||||
EShLangFragmentMask = (1 << EShLangFragment),
|
||||
EShLangComputeMask = (1 << EShLangCompute),
|
||||
#ifdef NV_EXTENSIONS
|
||||
EShLangRayGenNVMask = (1 << EShLangRayGenNV),
|
||||
EShLangIntersectNVMask = (1 << EShLangIntersectNV),
|
||||
EShLangAnyHitNVMask = (1 << EShLangAnyHitNV),
|
||||
EShLangClosestHitNVMask = (1 << EShLangClosestHitNV),
|
||||
EShLangMissNVMask = (1 << EShLangMissNV),
|
||||
EShLangCallableNVMask = (1 << EShLangCallableNV),
|
||||
EShLangTaskNVMask = (1 << EShLangTaskNV),
|
||||
EShLangMeshNVMask = (1 << EShLangMeshNV),
|
||||
#endif
|
||||
} EShLanguageMask;
|
||||
|
||||
namespace glslang {
|
||||
|
|
|
@ -501,6 +501,30 @@ INSTANTIATE_TEST_CASE_P(
|
|||
"spv.multiviewPerViewAttributes.vert",
|
||||
"spv.multiviewPerViewAttributes.tesc",
|
||||
"spv.atomicInt64.comp",
|
||||
"spv.shadingRate.frag",
|
||||
"spv.RayGenShader.rgen",
|
||||
"spv.RayGenShader_Errors.rgen",
|
||||
"spv.RayConstants.rgen",
|
||||
"spv.IntersectShader.rint",
|
||||
"spv.IntersectShader_Errors.rint",
|
||||
"spv.AnyHitShader.rahit",
|
||||
"spv.AnyHitShader_Errors.rahit",
|
||||
"spv.ClosestHitShader.rchit",
|
||||
"spv.ClosestHitShader_Errors.rchit",
|
||||
"spv.MissShader.rmiss",
|
||||
"spv.MissShader_Errors.rmiss",
|
||||
"spv.fragmentShaderBarycentric.frag",
|
||||
"spv.fragmentShaderBarycentric2.frag",
|
||||
"spv.computeShaderDerivatives.comp",
|
||||
"spv.computeShaderDerivatives2.comp",
|
||||
"spv.shaderImageFootprint.frag",
|
||||
"spv.meshShaderBuiltins.mesh",
|
||||
"spv.meshShaderUserDefined.mesh",
|
||||
"spv.meshShaderPerViewBuiltins.mesh",
|
||||
"spv.meshShaderPerViewUserDefined.mesh",
|
||||
"spv.meshShaderSharedMem.mesh",
|
||||
"spv.meshShaderTaskMem.mesh",
|
||||
"spv.meshTaskShader.task",
|
||||
})),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
|
|
@ -60,6 +60,24 @@ EShLanguage GetShaderStage(const std::string& stage)
|
|||
return EShLangFragment;
|
||||
} else if (stage == "comp") {
|
||||
return EShLangCompute;
|
||||
#ifdef NV_EXTENSIONS
|
||||
} else if (stage == "rgen") {
|
||||
return EShLangRayGenNV;
|
||||
} else if (stage == "rint") {
|
||||
return EShLangIntersectNV;
|
||||
} else if (stage == "rahit") {
|
||||
return EShLangAnyHitNV;
|
||||
} else if (stage == "rchit") {
|
||||
return EShLangClosestHitNV;
|
||||
} else if (stage == "rmiss") {
|
||||
return EShLangMissNV;
|
||||
} else if (stage == "rcall") {
|
||||
return EShLangCallableNV;
|
||||
} else if (stage == "task") {
|
||||
return EShLangTaskNV;
|
||||
} else if (stage == "mesh") {
|
||||
return EShLangMeshNV;
|
||||
#endif
|
||||
} else {
|
||||
assert(0 && "Unknown shader stage");
|
||||
return EShLangCount;
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
"site" : "github",
|
||||
"subrepo" : "KhronosGroup/SPIRV-Tools",
|
||||
"subdir" : "External/spirv-tools",
|
||||
"commit" : "7600fc0e19c3a99bd3ef2c24515cc508ca1d3cfb"
|
||||
"commit" : "9bfe0eb25e3dfdf4f3fd86ab6c0cda009c9bd661"
|
||||
},
|
||||
{
|
||||
"name" : "spirv-tools/external/spirv-headers",
|
||||
"site" : "github",
|
||||
"subrepo" : "KhronosGroup/SPIRV-Headers",
|
||||
"subdir" : "External/spirv-tools/external/spirv-headers",
|
||||
"commit" : "dcf23bdabacc3c54b83b1f9367e7a8adb27f8d87"
|
||||
"commit" : "d5b2e1255f706ce1f88812217e9a554f299848af"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue