Merge pull request #3014 from pmistryNV/GL_EXT_mesh_shader
GL_EXT_mesh_shader/SPV_EXT_mesh_shader implementation
This commit is contained in:
commit
a53aa3e94f
@ -71,10 +71,10 @@ static EShLanguage c_shader_stage(glslang_stage_t stage)
|
||||
return EShLangMiss;
|
||||
case GLSLANG_STAGE_CALLABLE_NV:
|
||||
return EShLangCallable;
|
||||
case GLSLANG_STAGE_TASK_NV:
|
||||
return EShLangTaskNV;
|
||||
case GLSLANG_STAGE_MESH_NV:
|
||||
return EShLangMeshNV;
|
||||
case GLSLANG_STAGE_TASK:
|
||||
return EShLangTask;
|
||||
case GLSLANG_STAGE_MESH:
|
||||
return EShLangMesh;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -39,5 +39,6 @@ static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_ato
|
||||
static const char* const E_SPV_EXT_shader_atomic_float16_add = "SPV_EXT_shader_atomic_float16_add";
|
||||
static const char* const E_SPV_EXT_shader_atomic_float_min_max = "SPV_EXT_shader_atomic_float_min_max";
|
||||
static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64";
|
||||
static const char* const E_SPV_EXT_mesh_shader = "SPV_EXT_mesh_shader";
|
||||
|
||||
#endif // #ifndef GLSLextEXT_H
|
||||
|
@ -280,6 +280,9 @@ protected:
|
||||
|
||||
// Used later for generating OpTraceKHR/OpExecuteCallableKHR
|
||||
std::unordered_map<unsigned int, glslang::TIntermSymbol *> locationToSymbol[2];
|
||||
|
||||
// Used by Task shader while generating opearnds for OpEmitMeshTasksEXT
|
||||
spv::Id taskPayloadID;
|
||||
};
|
||||
|
||||
//
|
||||
@ -315,7 +318,7 @@ spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile
|
||||
}
|
||||
|
||||
// Translate glslang language (stage) to SPIR-V execution model.
|
||||
spv::ExecutionModel TranslateExecutionModel(EShLanguage stage)
|
||||
spv::ExecutionModel TranslateExecutionModel(EShLanguage stage, bool isMeshShaderEXT = false)
|
||||
{
|
||||
switch (stage) {
|
||||
case EShLangVertex: return spv::ExecutionModelVertex;
|
||||
@ -331,8 +334,8 @@ spv::ExecutionModel TranslateExecutionModel(EShLanguage stage)
|
||||
case EShLangClosestHit: return spv::ExecutionModelClosestHitKHR;
|
||||
case EShLangMiss: return spv::ExecutionModelMissKHR;
|
||||
case EShLangCallable: return spv::ExecutionModelCallableKHR;
|
||||
case EShLangTaskNV: return spv::ExecutionModelTaskNV;
|
||||
case EShLangMeshNV: return spv::ExecutionModelMeshNV;
|
||||
case EShLangTask: return (isMeshShaderEXT)? spv::ExecutionModelTaskEXT : spv::ExecutionModelTaskNV;
|
||||
case EShLangMesh: return (isMeshShaderEXT)? spv::ExecutionModelMeshEXT: spv::ExecutionModelMeshNV;
|
||||
#endif
|
||||
default:
|
||||
assert(0);
|
||||
@ -763,7 +766,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
||||
return spv::BuiltInSampleMask;
|
||||
|
||||
case glslang::EbvLayer:
|
||||
if (glslangIntermediate->getStage() == EShLangMeshNV) {
|
||||
if (glslangIntermediate->getStage() == EShLangMesh) {
|
||||
return spv::BuiltInLayer;
|
||||
}
|
||||
if (glslangIntermediate->getStage() == EShLangGeometry ||
|
||||
@ -1078,6 +1081,16 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
||||
case glslang::EbvMeshViewIndicesNV:
|
||||
return spv::BuiltInMeshViewIndicesNV;
|
||||
|
||||
// SPV_EXT_mesh_shader
|
||||
case glslang::EbvPrimitivePointIndicesEXT:
|
||||
return spv::BuiltInPrimitivePointIndicesEXT;
|
||||
case glslang::EbvPrimitiveLineIndicesEXT:
|
||||
return spv::BuiltInPrimitiveLineIndicesEXT;
|
||||
case glslang::EbvPrimitiveTriangleIndicesEXT:
|
||||
return spv::BuiltInPrimitiveTriangleIndicesEXT;
|
||||
case glslang::EbvCullPrimitiveEXT:
|
||||
return spv::BuiltInCullPrimitiveEXT;
|
||||
|
||||
// sm builtins
|
||||
case glslang::EbvWarpsPerSM:
|
||||
builder.addExtension(spv::E_SPV_NV_shader_sm_builtins);
|
||||
@ -1321,6 +1334,7 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
||||
case glslang::EvqHitAttr: return spv::StorageClassHitAttributeKHR;
|
||||
case glslang::EvqCallableData: return spv::StorageClassCallableDataKHR;
|
||||
case glslang::EvqCallableDataIn: return spv::StorageClassIncomingCallableDataKHR;
|
||||
case glslang::EvqtaskPayloadSharedEXT : return spv::StorageClassTaskPayloadWorkgroupEXT;
|
||||
case glslang::EvqSpirvStorageClass: return static_cast<spv::StorageClass>(type.getQualifier().spirvStorageClass);
|
||||
#endif
|
||||
default:
|
||||
@ -1466,6 +1480,8 @@ void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& pa
|
||||
child.perViewNV = true;
|
||||
if (parent.perTaskNV)
|
||||
child.perTaskNV = true;
|
||||
if (parent.storage == glslang::EvqtaskPayloadSharedEXT)
|
||||
child.storage = glslang::EvqtaskPayloadSharedEXT;
|
||||
if (parent.patch)
|
||||
child.patch = true;
|
||||
if (parent.sample)
|
||||
@ -1525,9 +1541,12 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
||||
inEntryPoint(false), entryPointTerminated(false), linkageOnly(false),
|
||||
glslangIntermediate(glslangIntermediate),
|
||||
nanMinMaxClamp(glslangIntermediate->getNanMinMaxClamp()),
|
||||
nonSemanticDebugPrintf(0)
|
||||
nonSemanticDebugPrintf(0),
|
||||
taskPayloadID(0)
|
||||
{
|
||||
spv::ExecutionModel executionModel = TranslateExecutionModel(glslangIntermediate->getStage());
|
||||
bool isMeshShaderExt = (glslangIntermediate->getRequestedExtensions().find(glslang::E_GL_EXT_mesh_shader) !=
|
||||
glslangIntermediate->getRequestedExtensions().end());
|
||||
spv::ExecutionModel executionModel = TranslateExecutionModel(glslangIntermediate->getStage(), isMeshShaderExt);
|
||||
|
||||
builder.clearAccessChain();
|
||||
builder.setSource(TranslateSourceLanguage(glslangIntermediate->getSource(), glslangIntermediate->getProfile()),
|
||||
@ -1803,7 +1822,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
||||
case EShLangAnyHit:
|
||||
case EShLangClosestHit:
|
||||
case EShLangMiss:
|
||||
case EShLangCallable:
|
||||
case EShLangCallable:
|
||||
{
|
||||
auto& extensions = glslangIntermediate->getRequestedExtensions();
|
||||
if (extensions.find("GL_NV_ray_tracing") == extensions.end()) {
|
||||
@ -1823,10 +1842,15 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EShLangTaskNV:
|
||||
case EShLangMeshNV:
|
||||
builder.addCapability(spv::CapabilityMeshShadingNV);
|
||||
builder.addExtension(spv::E_SPV_NV_mesh_shader);
|
||||
case EShLangTask:
|
||||
case EShLangMesh:
|
||||
if(isMeshShaderExt) {
|
||||
builder.addCapability(spv::CapabilityMeshShadingEXT);
|
||||
builder.addExtension(spv::E_SPV_EXT_mesh_shader);
|
||||
} else {
|
||||
builder.addCapability(spv::CapabilityMeshShadingNV);
|
||||
builder.addExtension(spv::E_SPV_NV_mesh_shader);
|
||||
}
|
||||
if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) {
|
||||
std::vector<spv::Id> dimConstId;
|
||||
for (int dim = 0; dim < 3; ++dim) {
|
||||
@ -1843,7 +1867,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
||||
glslangIntermediate->getLocalSize(1),
|
||||
glslangIntermediate->getLocalSize(2));
|
||||
}
|
||||
if (glslangIntermediate->getStage() == EShLangMeshNV) {
|
||||
if (glslangIntermediate->getStage() == EShLangMesh) {
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices,
|
||||
glslangIntermediate->getVertices());
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputPrimitivesNV,
|
||||
@ -1962,7 +1986,6 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
|
||||
|
||||
if (symbol->getType().getQualifier().isSpecConstant())
|
||||
spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
|
||||
|
||||
#ifdef ENABLE_HLSL
|
||||
// Skip symbol handling if it is string-typed
|
||||
if (symbol->getBasicType() == glslang::EbtString)
|
||||
@ -1973,6 +1996,9 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
|
||||
// Formal function parameters were mapped during makeFunctions().
|
||||
spv::Id id = getSymbolId(symbol);
|
||||
|
||||
if (symbol->getType().getQualifier().isTaskPayload())
|
||||
taskPayloadID = id; // cache the taskPayloadID to be used it as operand for OpEmitMeshTasksEXT
|
||||
|
||||
if (builder.isPointer(id)) {
|
||||
if (!symbol->getType().getQualifier().isParamInput() &&
|
||||
!symbol->getType().getQualifier().isParamOutput()) {
|
||||
@ -2516,7 +2542,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
|
||||
operandNode = node->getOperand()->getAsBinaryNode()->getLeft();
|
||||
else
|
||||
operandNode = node->getOperand();
|
||||
|
||||
|
||||
operandNode->traverse(this);
|
||||
|
||||
spv::Id operand = spv::NoResult;
|
||||
@ -3111,6 +3137,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
case glslang::EOpExecuteCallableNV:
|
||||
case glslang::EOpExecuteCallableKHR:
|
||||
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
||||
case glslang::EOpEmitMeshTasksEXT:
|
||||
case glslang::EOpSetMeshOutputsEXT:
|
||||
noReturnValue = true;
|
||||
break;
|
||||
case glslang::EOpRayQueryInitialize:
|
||||
@ -3505,7 +3533,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
OpDecorations decorations = { precision,
|
||||
OpDecorations decorations = { precision,
|
||||
TranslateNoContractionDecoration(node->getType().getQualifier()),
|
||||
TranslateNonUniformDecoration(node->getType().getQualifier()) };
|
||||
result = createUnaryOperation(
|
||||
@ -3627,7 +3655,7 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
|
||||
// smear condition to vector, if necessary (AST is always scalar)
|
||||
// Before 1.4, smear like for mix(), starting with 1.4, keep it scalar
|
||||
if (glslangIntermediate->getSpv().spv < glslang::EShTargetSpv_1_4 && builder.isVector(trueValue)) {
|
||||
condition = builder.smearScalar(spv::NoPrecision, condition,
|
||||
condition = builder.smearScalar(spv::NoPrecision, condition,
|
||||
builder.makeVectorType(builder.makeBoolType(),
|
||||
builder.getNumComponents(trueValue)));
|
||||
}
|
||||
@ -4206,7 +4234,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
||||
spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler),
|
||||
sampler.isShadow(), sampler.isArrayed(), sampler.isMultiSample(),
|
||||
sampler.isImageClass() ? 2 : 1, TranslateImageFormat(type));
|
||||
if (sampler.isCombined() &&
|
||||
if (sampler.isCombined() &&
|
||||
(!sampler.isBuffer() || glslangIntermediate->getSpv().spv < glslang::EShTargetSpv_1_6)) {
|
||||
// Already has both image and sampler, make the combined type. Only combine sampler to
|
||||
// buffer if before SPIR-V 1.6.
|
||||
@ -4396,7 +4424,7 @@ bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member)
|
||||
extensions.find("GL_NV_stereo_view_rendering") == extensions.end())
|
||||
return true;
|
||||
|
||||
if (glslangIntermediate->getStage() != EShLangMeshNV) {
|
||||
if (glslangIntermediate->getStage() != EShLangMesh) {
|
||||
if (member.getFieldName() == "gl_ViewportMask" &&
|
||||
extensions.find("GL_NV_viewport_array2") == extensions.end())
|
||||
return true;
|
||||
@ -5831,10 +5859,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
||||
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 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;
|
||||
@ -5847,7 +5875,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
||||
//call ImageFootprintNV
|
||||
spv::Id res = builder.createTextureCall(precision, resType, sparse, cracked.fetch, cracked.proj,
|
||||
cracked.gather, noImplicitLod, params, signExtensionMask());
|
||||
|
||||
|
||||
//copy resType (SPIR-V type) to resultStructType(OpenGL type)
|
||||
for (int i = 0; i < 5; i++) {
|
||||
builder.clearAccessChain();
|
||||
@ -5900,7 +5928,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
||||
}
|
||||
#endif
|
||||
|
||||
std::vector<spv::Id> result( 1,
|
||||
std::vector<spv::Id> result( 1,
|
||||
builder.createTextureCall(precision, resultType(), sparse, cracked.fetch, cracked.proj, cracked.gather,
|
||||
noImplicitLod, params, signExtensionMask())
|
||||
);
|
||||
@ -7423,7 +7451,7 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
|
||||
} else {
|
||||
scopeId = builder.makeUintConstant(spv::ScopeDevice);
|
||||
}
|
||||
// semantics default to relaxed
|
||||
// semantics default to relaxed
|
||||
spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.isVolatile() &&
|
||||
glslangIntermediate->usingVulkanMemoryModel() ?
|
||||
spv::MemorySemanticsVolatileMask :
|
||||
@ -8527,6 +8555,14 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
||||
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
||||
builder.createNoResultOp(spv::OpWritePackedPrimitiveIndices4x8NV, operands);
|
||||
return 0;
|
||||
case glslang::EOpEmitMeshTasksEXT:
|
||||
if(taskPayloadID)
|
||||
operands.push_back(taskPayloadID);
|
||||
builder.createNoResultOp(spv::OpEmitMeshTasksEXT, operands);
|
||||
return 0;
|
||||
case glslang::EOpSetMeshOutputsEXT:
|
||||
builder.createNoResultOp(spv::OpSetMeshOutputsEXT, operands);
|
||||
return 0;
|
||||
case glslang::EOpCooperativeMatrixMulAdd:
|
||||
opCode = spv::OpCooperativeMatrixMulAddNV;
|
||||
break;
|
||||
@ -9011,13 +9047,21 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
||||
// 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)
|
||||
{
|
||||
bool isMeshShaderExt = (glslangIntermediate->getRequestedExtensions().find(glslang::E_GL_EXT_mesh_shader) !=
|
||||
glslangIntermediate->getRequestedExtensions().end());
|
||||
|
||||
if (member >= 0) {
|
||||
if (qualifier.perPrimitiveNV) {
|
||||
// Need to add capability/extension for fragment shader.
|
||||
// Mesh shader already adds this by default.
|
||||
if (glslangIntermediate->getStage() == EShLangFragment) {
|
||||
builder.addCapability(spv::CapabilityMeshShadingNV);
|
||||
builder.addExtension(spv::E_SPV_NV_mesh_shader);
|
||||
if(isMeshShaderExt) {
|
||||
builder.addCapability(spv::CapabilityMeshShadingEXT);
|
||||
builder.addExtension(spv::E_SPV_EXT_mesh_shader);
|
||||
} else {
|
||||
builder.addCapability(spv::CapabilityMeshShadingNV);
|
||||
builder.addExtension(spv::E_SPV_NV_mesh_shader);
|
||||
}
|
||||
}
|
||||
builder.addMemberDecoration(id, (unsigned)member, spv::DecorationPerPrimitiveNV);
|
||||
}
|
||||
@ -9030,8 +9074,13 @@ void TGlslangToSpvTraverser::addMeshNVDecoration(spv::Id id, int member, const g
|
||||
// Need to add capability/extension for fragment shader.
|
||||
// Mesh shader already adds this by default.
|
||||
if (glslangIntermediate->getStage() == EShLangFragment) {
|
||||
builder.addCapability(spv::CapabilityMeshShadingNV);
|
||||
builder.addExtension(spv::E_SPV_NV_mesh_shader);
|
||||
if(isMeshShaderExt) {
|
||||
builder.addCapability(spv::CapabilityMeshShadingEXT);
|
||||
builder.addExtension(spv::E_SPV_EXT_mesh_shader);
|
||||
} else {
|
||||
builder.addCapability(spv::CapabilityMeshShadingNV);
|
||||
builder.addExtension(spv::E_SPV_NV_mesh_shader);
|
||||
}
|
||||
}
|
||||
builder.addDecoration(id, spv::DecorationPerPrimitiveNV);
|
||||
}
|
||||
|
@ -97,6 +97,8 @@ const char* ExecutionModelString(int model)
|
||||
case 6: return "Kernel";
|
||||
case ExecutionModelTaskNV: return "TaskNV";
|
||||
case ExecutionModelMeshNV: return "MeshNV";
|
||||
case ExecutionModelTaskEXT: return "TaskEXT";
|
||||
case ExecutionModelMeshEXT: return "MeshEXT";
|
||||
|
||||
default: return "Bad";
|
||||
|
||||
@ -242,7 +244,7 @@ const char* StorageClassString(int StorageClass)
|
||||
case StorageClassIncomingCallableDataKHR: return "IncomingCallableDataKHR";
|
||||
|
||||
case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
|
||||
|
||||
case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT";
|
||||
default: return "Bad";
|
||||
}
|
||||
}
|
||||
@ -433,6 +435,10 @@ const char* BuiltInString(int builtIn)
|
||||
case BuiltInWarpIDNV: return "WarpIDNV";
|
||||
case BuiltInSMIDNV: return "SMIDNV";
|
||||
case BuiltInCurrentRayTimeNV: return "CurrentRayTimeNV";
|
||||
case BuiltInPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT";
|
||||
case BuiltInPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT";
|
||||
case BuiltInPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT";
|
||||
case BuiltInCullPrimitiveEXT: return "CullPrimitiveEXT";
|
||||
|
||||
default: return "Bad";
|
||||
}
|
||||
@ -940,6 +946,7 @@ const char* CapabilityString(int info)
|
||||
case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR";
|
||||
case CapabilityMeshShadingNV: return "MeshShadingNV";
|
||||
case CapabilityImageFootprintNV: return "ImageFootprintNV";
|
||||
case CapabilityMeshShadingEXT: return "MeshShadingEXT";
|
||||
// case CapabilityShadingRateNV: return "ShadingRateNV"; // superseded by FragmentDensityEXT
|
||||
case CapabilitySampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV";
|
||||
case CapabilityFragmentDensityEXT: return "FragmentDensityEXT";
|
||||
@ -1407,6 +1414,8 @@ const char* OpcodeString(int op)
|
||||
case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV";
|
||||
case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV";
|
||||
case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
|
||||
case OpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT";
|
||||
case OpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT";
|
||||
|
||||
case OpTypeRayQueryKHR: return "OpTypeRayQueryKHR";
|
||||
case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR";
|
||||
@ -2981,6 +2990,17 @@ void Parameterize()
|
||||
InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Index Offset'");
|
||||
InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Packed Indices'");
|
||||
|
||||
InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountX'");
|
||||
InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountY'");
|
||||
InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountZ'");
|
||||
InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'Payload'");
|
||||
InstructionDesc[OpEmitMeshTasksEXT].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpSetMeshOutputsEXT].operands.push(OperandId, "'vertexCount'");
|
||||
InstructionDesc[OpSetMeshOutputsEXT].operands.push(OperandId, "'primitiveCount'");
|
||||
InstructionDesc[OpSetMeshOutputsEXT].setResultAndType(false, false);
|
||||
|
||||
|
||||
InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Component Type'");
|
||||
InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Scope'");
|
||||
InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Rows'");
|
||||
|
@ -1,19 +1,19 @@
|
||||
// Copyright (c) 2014-2020 The Khronos Group Inc.
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and/or associated documentation files (the "Materials"),
|
||||
// to deal in the Materials without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Materials, and to permit persons to whom the
|
||||
// Materials are furnished to do so, subject to the following conditions:
|
||||
//
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Materials.
|
||||
//
|
||||
//
|
||||
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
|
||||
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
|
||||
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
|
||||
//
|
||||
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
|
||||
//
|
||||
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
// Enumeration tokens for SPIR-V, in various styles:
|
||||
// C, C++, C++11, JSON, Lua, Python, C#, D
|
||||
//
|
||||
//
|
||||
// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
|
||||
// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
|
||||
// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
|
||||
@ -36,7 +36,7 @@
|
||||
// - C# will use enum classes in the Specification class located in the "Spv" namespace,
|
||||
// e.g.: Spv.Specification.SourceLanguage.GLSL
|
||||
// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL
|
||||
//
|
||||
//
|
||||
// Some tokens act like mask values, which can be OR'd together,
|
||||
// while others are mutually exclusive. The mask-like ones have
|
||||
// "Mask" in their name, and a parallel enum that has the shift
|
||||
@ -91,6 +91,8 @@ enum ExecutionModel {
|
||||
ExecutionModelMissNV = 5317,
|
||||
ExecutionModelCallableKHR = 5318,
|
||||
ExecutionModelCallableNV = 5318,
|
||||
ExecutionModelTaskEXT = 5364,
|
||||
ExecutionModelMeshEXT = 5365,
|
||||
ExecutionModelMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
@ -166,10 +168,13 @@ enum ExecutionMode {
|
||||
ExecutionModeStencilRefUnchangedBackAMD = 5082,
|
||||
ExecutionModeStencilRefGreaterBackAMD = 5083,
|
||||
ExecutionModeStencilRefLessBackAMD = 5084,
|
||||
ExecutionModeOutputLinesEXT = 5269,
|
||||
ExecutionModeOutputLinesNV = 5269,
|
||||
ExecutionModeOutputPrimitivesEXT = 5270,
|
||||
ExecutionModeOutputPrimitivesNV = 5270,
|
||||
ExecutionModeDerivativeGroupQuadsNV = 5289,
|
||||
ExecutionModeDerivativeGroupLinearNV = 5290,
|
||||
ExecutionModeOutputTrianglesEXT = 5298,
|
||||
ExecutionModeOutputTrianglesNV = 5298,
|
||||
ExecutionModePixelInterlockOrderedEXT = 5366,
|
||||
ExecutionModePixelInterlockUnorderedEXT = 5367,
|
||||
@ -218,6 +223,7 @@ enum StorageClass {
|
||||
StorageClassShaderRecordBufferNV = 5343,
|
||||
StorageClassPhysicalStorageBuffer = 5349,
|
||||
StorageClassPhysicalStorageBufferEXT = 5349,
|
||||
StorageClassTaskPayloadWorkgroupEXT = 5402,
|
||||
StorageClassCodeSectionINTEL = 5605,
|
||||
StorageClassDeviceOnlyINTEL = 5936,
|
||||
StorageClassHostOnlyINTEL = 5937,
|
||||
@ -500,6 +506,7 @@ enum Decoration {
|
||||
DecorationPassthroughNV = 5250,
|
||||
DecorationViewportRelativeNV = 5252,
|
||||
DecorationSecondaryViewportRelativeNV = 5256,
|
||||
DecorationPerPrimitiveEXT = 5271,
|
||||
DecorationPerPrimitiveNV = 5271,
|
||||
DecorationPerViewNV = 5272,
|
||||
DecorationPerTaskNV = 5273,
|
||||
@ -647,6 +654,10 @@ enum BuiltIn {
|
||||
BuiltInFragmentSizeNV = 5292,
|
||||
BuiltInFragInvocationCountEXT = 5293,
|
||||
BuiltInInvocationsPerPixelNV = 5293,
|
||||
BuiltInPrimitivePointIndicesEXT = 5294,
|
||||
BuiltInPrimitiveLineIndicesEXT = 5295,
|
||||
BuiltInPrimitiveTriangleIndicesEXT = 5296,
|
||||
BuiltInCullPrimitiveEXT = 5299,
|
||||
BuiltInLaunchIdKHR = 5319,
|
||||
BuiltInLaunchIdNV = 5319,
|
||||
BuiltInLaunchSizeKHR = 5320,
|
||||
@ -983,7 +994,8 @@ enum Capability {
|
||||
CapabilityFragmentFullyCoveredEXT = 5265,
|
||||
CapabilityMeshShadingNV = 5266,
|
||||
CapabilityImageFootprintNV = 5282,
|
||||
CapabilityFragmentBarycentricKHR = 5284,
|
||||
CapabilityMeshShadingEXT = 5283,
|
||||
CapabilityFragmentBarycentricKHR = 5284,
|
||||
CapabilityFragmentBarycentricNV = 5284,
|
||||
CapabilityComputeDerivativeGroupQuadsNV = 5288,
|
||||
CapabilityFragmentDensityEXT = 5291,
|
||||
@ -1577,6 +1589,8 @@ enum Op {
|
||||
OpFragmentFetchAMD = 5012,
|
||||
OpReadClockKHR = 5056,
|
||||
OpImageSampleFootprintNV = 5283,
|
||||
OpEmitMeshTasksEXT = 5294,
|
||||
OpSetMeshOutputsEXT = 5295,
|
||||
OpGroupNonUniformPartitionNV = 5296,
|
||||
OpWritePackedPrimitiveIndices4x8NV = 5299,
|
||||
OpReportIntersectionKHR = 5334,
|
||||
@ -2234,6 +2248,8 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||
case OpReadClockKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break;
|
||||
case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break;
|
||||
case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
|
||||
@ -2515,4 +2531,3 @@ inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShad
|
||||
} // end namespace spv
|
||||
|
||||
#endif // #ifndef spirv_HPP
|
||||
|
||||
|
@ -134,6 +134,15 @@ const TBuiltInResource DefaultTBuiltInResource = {
|
||||
/* .maxTaskWorkGroupSizeY_NV = */ 1,
|
||||
/* .maxTaskWorkGroupSizeZ_NV = */ 1,
|
||||
/* .maxMeshViewCountNV = */ 4,
|
||||
/* .maxMeshOutputVerticesEXT = */ 256,
|
||||
/* .maxMeshOutputPrimitivesEXT = */ 256,
|
||||
/* .maxMeshWorkGroupSizeX_EXT = */ 128,
|
||||
/* .maxMeshWorkGroupSizeY_EXT = */ 128,
|
||||
/* .maxMeshWorkGroupSizeZ_EXT = */ 128,
|
||||
/* .maxTaskWorkGroupSizeX_EXT = */ 128,
|
||||
/* .maxTaskWorkGroupSizeY_EXT = */ 128,
|
||||
/* .maxTaskWorkGroupSizeZ_EXT = */ 128,
|
||||
/* .maxMeshViewCountEXT = */ 4,
|
||||
/* .maxDualSourceDrawBuffersEXT = */ 1,
|
||||
|
||||
/* .limits = */ {
|
||||
@ -244,6 +253,15 @@ std::string GetDefaultTBuiltInResourceString()
|
||||
<< "MaxTaskWorkGroupSizeY_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_NV << "\n"
|
||||
<< "MaxTaskWorkGroupSizeZ_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_NV << "\n"
|
||||
<< "MaxMeshViewCountNV " << DefaultTBuiltInResource.maxMeshViewCountNV << "\n"
|
||||
<< "MaxMeshOutputVerticesEXT " << DefaultTBuiltInResource.maxMeshOutputVerticesEXT << "\n"
|
||||
<< "MaxMeshOutputPrimitivesEXT " << DefaultTBuiltInResource.maxMeshOutputPrimitivesEXT << "\n"
|
||||
<< "MaxMeshWorkGroupSizeX_EXT " << DefaultTBuiltInResource.maxMeshWorkGroupSizeX_EXT << "\n"
|
||||
<< "MaxMeshWorkGroupSizeY_EXT " << DefaultTBuiltInResource.maxMeshWorkGroupSizeY_EXT << "\n"
|
||||
<< "MaxMeshWorkGroupSizeZ_EXT " << DefaultTBuiltInResource.maxMeshWorkGroupSizeZ_EXT << "\n"
|
||||
<< "MaxTaskWorkGroupSizeX_EXT " << DefaultTBuiltInResource.maxTaskWorkGroupSizeX_EXT << "\n"
|
||||
<< "MaxTaskWorkGroupSizeY_EXT " << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_EXT << "\n"
|
||||
<< "MaxTaskWorkGroupSizeZ_EXT " << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_EXT << "\n"
|
||||
<< "MaxMeshViewCountEXT " << DefaultTBuiltInResource.maxMeshViewCountEXT << "\n"
|
||||
<< "MaxDualSourceDrawBuffersEXT " << DefaultTBuiltInResource.maxDualSourceDrawBuffersEXT << "\n"
|
||||
<< "nonInductiveForLoops " << DefaultTBuiltInResource.limits.nonInductiveForLoops << "\n"
|
||||
<< "whileLoops " << DefaultTBuiltInResource.limits.whileLoops << "\n"
|
||||
@ -469,6 +487,24 @@ void DecodeResourceLimits(TBuiltInResource* resources, char* config)
|
||||
resources->maxTaskWorkGroupSizeZ_NV = value;
|
||||
else if (tokenStr == "MaxMeshViewCountNV")
|
||||
resources->maxMeshViewCountNV = value;
|
||||
else if (tokenStr == "MaxMeshOutputVerticesEXT")
|
||||
resources->maxMeshOutputVerticesEXT = value;
|
||||
else if (tokenStr == "MaxMeshOutputPrimitivesEXT")
|
||||
resources->maxMeshOutputPrimitivesEXT = value;
|
||||
else if (tokenStr == "MaxMeshWorkGroupSizeX_EXT")
|
||||
resources->maxMeshWorkGroupSizeX_EXT = value;
|
||||
else if (tokenStr == "MaxMeshWorkGroupSizeY_EXT")
|
||||
resources->maxMeshWorkGroupSizeY_EXT = value;
|
||||
else if (tokenStr == "MaxMeshWorkGroupSizeZ_EXT")
|
||||
resources->maxMeshWorkGroupSizeZ_EXT = value;
|
||||
else if (tokenStr == "MaxTaskWorkGroupSizeX_EXT")
|
||||
resources->maxTaskWorkGroupSizeX_EXT = value;
|
||||
else if (tokenStr == "MaxTaskWorkGroupSizeY_EXT")
|
||||
resources->maxTaskWorkGroupSizeY_EXT = value;
|
||||
else if (tokenStr == "MaxTaskWorkGroupSizeZ_EXT")
|
||||
resources->maxTaskWorkGroupSizeZ_EXT = value;
|
||||
else if (tokenStr == "MaxMeshViewCountEXT")
|
||||
resources->maxMeshViewCountEXT = value;
|
||||
else if (tokenStr == "nonInductiveForLoops")
|
||||
resources->limits.nonInductiveForLoops = (value != 0);
|
||||
else if (tokenStr == "whileLoops")
|
||||
|
@ -293,8 +293,8 @@ const char* GetBinaryName(EShLanguage stage)
|
||||
case EShLangClosestHit: name = "rchit.spv"; break;
|
||||
case EShLangMiss: name = "rmiss.spv"; break;
|
||||
case EShLangCallable: name = "rcall.spv"; break;
|
||||
case EShLangMeshNV: name = "mesh.spv"; break;
|
||||
case EShLangTaskNV: name = "task.spv"; break;
|
||||
case EShLangMesh : name = "mesh.spv"; break;
|
||||
case EShLangTask : name = "task.spv"; break;
|
||||
default: name = "unknown"; break;
|
||||
}
|
||||
} else
|
||||
@ -1780,9 +1780,9 @@ EShLanguage FindLanguage(const std::string& name, bool parseStageName)
|
||||
else if (stageName == "rcall")
|
||||
return EShLangCallable;
|
||||
else if (stageName == "mesh")
|
||||
return EShLangMeshNV;
|
||||
return EShLangMesh;
|
||||
else if (stageName == "task")
|
||||
return EShLangTaskNV;
|
||||
return EShLangTask;
|
||||
|
||||
usage();
|
||||
return EShLangVertex;
|
||||
|
1039
Test/baseResults/glsl.460.subgroupEXT.mesh.out
Normal file
1039
Test/baseResults/glsl.460.subgroupEXT.mesh.out
Normal file
File diff suppressed because it is too large
Load Diff
707
Test/baseResults/glsl.460.subgroupEXT.task.out
Normal file
707
Test/baseResults/glsl.460.subgroupEXT.task.out
Normal file
@ -0,0 +1,707 @@
|
||||
glsl.460.subgroupEXT.task
|
||||
ERROR: 0:6: 'gl_SubgroupSize' : required extension not requested: GL_KHR_shader_subgroup_basic
|
||||
ERROR: 0:7: 'gl_SubgroupInvocationID' : required extension not requested: GL_KHR_shader_subgroup_basic
|
||||
ERROR: 0:8: 'subgroupBarrier' : required extension not requested: GL_KHR_shader_subgroup_basic
|
||||
ERROR: 0:9: 'subgroupMemoryBarrier' : required extension not requested: GL_KHR_shader_subgroup_basic
|
||||
ERROR: 0:10: 'subgroupMemoryBarrierBuffer' : required extension not requested: GL_KHR_shader_subgroup_basic
|
||||
ERROR: 0:11: 'subgroupMemoryBarrierImage' : required extension not requested: GL_KHR_shader_subgroup_basic
|
||||
ERROR: 0:12: 'subgroupElect' : required extension not requested: GL_KHR_shader_subgroup_basic
|
||||
ERROR: 0:13: 'gl_NumSubgroups' : required extension not requested: GL_KHR_shader_subgroup_basic
|
||||
ERROR: 0:14: 'gl_SubgroupID' : required extension not requested: GL_KHR_shader_subgroup_basic
|
||||
ERROR: 0:15: 'subgroupMemoryBarrierShared' : required extension not requested: GL_KHR_shader_subgroup_basic
|
||||
ERROR: 0:17: 'subgroupAll' : required extension not requested: GL_KHR_shader_subgroup_vote
|
||||
ERROR: 0:18: 'subgroupAny' : required extension not requested: GL_KHR_shader_subgroup_vote
|
||||
ERROR: 0:19: 'subgroupAllEqual' : required extension not requested: GL_KHR_shader_subgroup_vote
|
||||
ERROR: 0:21: 'gl_SubgroupEqMask' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:22: 'gl_SubgroupGeMask' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:23: 'gl_SubgroupGtMask' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:24: 'gl_SubgroupLeMask' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:25: 'gl_SubgroupLtMask' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:26: 'subgroupBroadcast' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:27: 'subgroupBroadcastFirst' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:28: 'subgroupBallot' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:29: 'subgroupInverseBallot' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:30: 'subgroupBallotBitExtract' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:31: 'subgroupBallotBitCount' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:32: 'subgroupBallotInclusiveBitCount' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:33: 'subgroupBallotExclusiveBitCount' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:34: 'subgroupBallotFindLSB' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:35: 'subgroupBallotFindMSB' : required extension not requested: GL_KHR_shader_subgroup_ballot
|
||||
ERROR: 0:37: 'subgroupShuffle' : required extension not requested: GL_KHR_shader_subgroup_shuffle
|
||||
ERROR: 0:38: 'subgroupShuffleXor' : required extension not requested: GL_KHR_shader_subgroup_shuffle
|
||||
ERROR: 0:39: 'subgroupShuffleUp' : required extension not requested: GL_KHR_shader_subgroup_shuffle_relative
|
||||
ERROR: 0:40: 'subgroupShuffleDown' : required extension not requested: GL_KHR_shader_subgroup_shuffle_relative
|
||||
ERROR: 0:42: 'subgroupAdd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:43: 'subgroupMul' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:44: 'subgroupMin' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:45: 'subgroupMax' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:46: 'subgroupAnd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:47: 'subgroupOr' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:48: 'subgroupXor' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:49: 'subgroupInclusiveAdd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:50: 'subgroupInclusiveMul' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:51: 'subgroupInclusiveMin' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:52: 'subgroupInclusiveMax' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:53: 'subgroupInclusiveAnd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:54: 'subgroupInclusiveOr' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:55: 'subgroupInclusiveXor' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:56: 'subgroupExclusiveAdd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:57: 'subgroupExclusiveMul' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:58: 'subgroupExclusiveMin' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:59: 'subgroupExclusiveMax' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:60: 'subgroupExclusiveAnd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:61: 'subgroupExclusiveOr' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:62: 'subgroupExclusiveXor' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
|
||||
ERROR: 0:64: 'subgroupClusteredAdd' : required extension not requested: GL_KHR_shader_subgroup_clustered
|
||||
ERROR: 0:65: 'subgroupClusteredMul' : required extension not requested: GL_KHR_shader_subgroup_clustered
|
||||
ERROR: 0:66: 'subgroupClusteredMin' : required extension not requested: GL_KHR_shader_subgroup_clustered
|
||||
ERROR: 0:67: 'subgroupClusteredMax' : required extension not requested: GL_KHR_shader_subgroup_clustered
|
||||
ERROR: 0:68: 'subgroupClusteredAnd' : required extension not requested: GL_KHR_shader_subgroup_clustered
|
||||
ERROR: 0:69: 'subgroupClusteredOr' : required extension not requested: GL_KHR_shader_subgroup_clustered
|
||||
ERROR: 0:70: 'subgroupClusteredXor' : required extension not requested: GL_KHR_shader_subgroup_clustered
|
||||
ERROR: 0:72: 'subgroupQuadBroadcast' : required extension not requested: GL_KHR_shader_subgroup_quad
|
||||
ERROR: 0:73: 'subgroupQuadSwapHorizontal' : required extension not requested: GL_KHR_shader_subgroup_quad
|
||||
ERROR: 0:74: 'subgroupQuadSwapVertical' : required extension not requested: GL_KHR_shader_subgroup_quad
|
||||
ERROR: 0:75: 'subgroupQuadSwapDiagonal' : required extension not requested: GL_KHR_shader_subgroup_quad
|
||||
ERROR: 64 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 460
|
||||
Requested GL_EXT_mesh_shader
|
||||
Requested GL_KHR_shader_subgroup_arithmetic
|
||||
Requested GL_KHR_shader_subgroup_ballot
|
||||
Requested GL_KHR_shader_subgroup_basic
|
||||
Requested GL_KHR_shader_subgroup_clustered
|
||||
Requested GL_KHR_shader_subgroup_quad
|
||||
Requested GL_KHR_shader_subgroup_shuffle
|
||||
Requested GL_KHR_shader_subgroup_shuffle_relative
|
||||
Requested GL_KHR_shader_subgroup_vote
|
||||
local_size = (32, 1, 1)
|
||||
ERROR: node is still EOpNull!
|
||||
0:3 Function Definition: undeclared_errors(vf4; ( global 4-component vector of float)
|
||||
0:3 Function Parameters:
|
||||
0:3 'f4' ( in 4-component vector of float)
|
||||
0:? Sequence
|
||||
0:6 'gl_SubgroupSize' ( in uint SubgroupSize)
|
||||
0:7 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID)
|
||||
0:8 subgroupBarrier ( global void)
|
||||
0:9 subgroupMemoryBarrier ( global void)
|
||||
0:10 subgroupMemoryBarrierBuffer ( global void)
|
||||
0:11 subgroupMemoryBarrierImage ( global void)
|
||||
0:12 subgroupElect ( global bool)
|
||||
0:13 'gl_NumSubgroups' ( in uint NumSubgroups)
|
||||
0:14 'gl_SubgroupID' ( in uint SubgroupID)
|
||||
0:15 subgroupMemoryBarrierShared ( global void)
|
||||
0:17 subgroupAll ( global bool)
|
||||
0:17 Constant:
|
||||
0:17 true (const bool)
|
||||
0:18 subgroupAny ( global bool)
|
||||
0:18 Constant:
|
||||
0:18 false (const bool)
|
||||
0:19 subgroupAllEqual ( global bool)
|
||||
0:19 'f4' ( in 4-component vector of float)
|
||||
0:21 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask)
|
||||
0:22 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask)
|
||||
0:23 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask)
|
||||
0:24 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask)
|
||||
0:25 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask)
|
||||
0:26 subgroupBroadcast ( global 4-component vector of float)
|
||||
0:26 'f4' ( in 4-component vector of float)
|
||||
0:26 Constant:
|
||||
0:26 0 (const uint)
|
||||
0:27 subgroupBroadcastFirst ( global 4-component vector of float)
|
||||
0:27 'f4' ( in 4-component vector of float)
|
||||
0:28 Sequence
|
||||
0:28 move second child to first child ( temp 4-component vector of uint)
|
||||
0:28 'ballot' ( temp 4-component vector of uint)
|
||||
0:28 subgroupBallot ( global 4-component vector of uint)
|
||||
0:28 Constant:
|
||||
0:28 false (const bool)
|
||||
0:29 subgroupInverseBallot ( global bool)
|
||||
0:29 Constant:
|
||||
0:29 1 (const uint)
|
||||
0:29 1 (const uint)
|
||||
0:29 1 (const uint)
|
||||
0:29 1 (const uint)
|
||||
0:30 subgroupBallotBitExtract ( global bool)
|
||||
0:30 'ballot' ( temp 4-component vector of uint)
|
||||
0:30 Constant:
|
||||
0:30 0 (const uint)
|
||||
0:31 subgroupBallotBitCount ( global uint)
|
||||
0:31 'ballot' ( temp 4-component vector of uint)
|
||||
0:32 subgroupBallotInclusiveBitCount ( global uint)
|
||||
0:32 'ballot' ( temp 4-component vector of uint)
|
||||
0:33 subgroupBallotExclusiveBitCount ( global uint)
|
||||
0:33 'ballot' ( temp 4-component vector of uint)
|
||||
0:34 subgroupBallotFindLSB ( global uint)
|
||||
0:34 'ballot' ( temp 4-component vector of uint)
|
||||
0:35 subgroupBallotFindMSB ( global uint)
|
||||
0:35 'ballot' ( temp 4-component vector of uint)
|
||||
0:37 subgroupShuffle ( global 4-component vector of float)
|
||||
0:37 'f4' ( in 4-component vector of float)
|
||||
0:37 Constant:
|
||||
0:37 0 (const uint)
|
||||
0:38 subgroupShuffleXor ( global 4-component vector of float)
|
||||
0:38 'f4' ( in 4-component vector of float)
|
||||
0:38 Constant:
|
||||
0:38 1 (const uint)
|
||||
0:39 subgroupShuffleUp ( global 4-component vector of float)
|
||||
0:39 'f4' ( in 4-component vector of float)
|
||||
0:39 Constant:
|
||||
0:39 1 (const uint)
|
||||
0:40 subgroupShuffleDown ( global 4-component vector of float)
|
||||
0:40 'f4' ( in 4-component vector of float)
|
||||
0:40 Constant:
|
||||
0:40 1 (const uint)
|
||||
0:42 move second child to first child ( temp 4-component vector of float)
|
||||
0:42 'result' ( temp 4-component vector of float)
|
||||
0:42 subgroupAdd ( global 4-component vector of float)
|
||||
0:42 'f4' ( in 4-component vector of float)
|
||||
0:43 subgroupMul ( global 4-component vector of float)
|
||||
0:43 'f4' ( in 4-component vector of float)
|
||||
0:44 subgroupMin ( global 4-component vector of float)
|
||||
0:44 'f4' ( in 4-component vector of float)
|
||||
0:45 subgroupMax ( global 4-component vector of float)
|
||||
0:45 'f4' ( in 4-component vector of float)
|
||||
0:46 subgroupAnd ( global 4-component vector of uint)
|
||||
0:46 'ballot' ( temp 4-component vector of uint)
|
||||
0:47 subgroupOr ( global 4-component vector of uint)
|
||||
0:47 'ballot' ( temp 4-component vector of uint)
|
||||
0:48 subgroupXor ( global 4-component vector of uint)
|
||||
0:48 'ballot' ( temp 4-component vector of uint)
|
||||
0:49 subgroupInclusiveAdd ( global 4-component vector of float)
|
||||
0:49 'f4' ( in 4-component vector of float)
|
||||
0:50 subgroupInclusiveMul ( global 4-component vector of float)
|
||||
0:50 'f4' ( in 4-component vector of float)
|
||||
0:51 subgroupInclusiveMin ( global 4-component vector of float)
|
||||
0:51 'f4' ( in 4-component vector of float)
|
||||
0:52 subgroupInclusiveMax ( global 4-component vector of float)
|
||||
0:52 'f4' ( in 4-component vector of float)
|
||||
0:53 subgroupInclusiveAnd ( global 4-component vector of uint)
|
||||
0:53 'ballot' ( temp 4-component vector of uint)
|
||||
0:54 subgroupInclusiveOr ( global 4-component vector of uint)
|
||||
0:54 'ballot' ( temp 4-component vector of uint)
|
||||
0:55 subgroupInclusiveXor ( global 4-component vector of uint)
|
||||
0:55 'ballot' ( temp 4-component vector of uint)
|
||||
0:56 subgroupExclusiveAdd ( global 4-component vector of float)
|
||||
0:56 'f4' ( in 4-component vector of float)
|
||||
0:57 subgroupExclusiveMul ( global 4-component vector of float)
|
||||
0:57 'f4' ( in 4-component vector of float)
|
||||
0:58 subgroupExclusiveMin ( global 4-component vector of float)
|
||||
0:58 'f4' ( in 4-component vector of float)
|
||||
0:59 subgroupExclusiveMax ( global 4-component vector of float)
|
||||
0:59 'f4' ( in 4-component vector of float)
|
||||
0:60 subgroupExclusiveAnd ( global 4-component vector of uint)
|
||||
0:60 'ballot' ( temp 4-component vector of uint)
|
||||
0:61 subgroupExclusiveOr ( global 4-component vector of uint)
|
||||
0:61 'ballot' ( temp 4-component vector of uint)
|
||||
0:62 subgroupExclusiveXor ( global 4-component vector of uint)
|
||||
0:62 'ballot' ( temp 4-component vector of uint)
|
||||
0:64 subgroupClusteredAdd ( global 4-component vector of float)
|
||||
0:64 'f4' ( in 4-component vector of float)
|
||||
0:64 Constant:
|
||||
0:64 2 (const uint)
|
||||
0:65 subgroupClusteredMul ( global 4-component vector of float)
|
||||
0:65 'f4' ( in 4-component vector of float)
|
||||
0:65 Constant:
|
||||
0:65 2 (const uint)
|
||||
0:66 subgroupClusteredMin ( global 4-component vector of float)
|
||||
0:66 'f4' ( in 4-component vector of float)
|
||||
0:66 Constant:
|
||||
0:66 2 (const uint)
|
||||
0:67 subgroupClusteredMax ( global 4-component vector of float)
|
||||
0:67 'f4' ( in 4-component vector of float)
|
||||
0:67 Constant:
|
||||
0:67 2 (const uint)
|
||||
0:68 subgroupClusteredAnd ( global 4-component vector of uint)
|
||||
0:68 'ballot' ( temp 4-component vector of uint)
|
||||
0:68 Constant:
|
||||
0:68 2 (const uint)
|
||||
0:69 subgroupClusteredOr ( global 4-component vector of uint)
|
||||
0:69 'ballot' ( temp 4-component vector of uint)
|
||||
0:69 Constant:
|
||||
0:69 2 (const uint)
|
||||
0:70 subgroupClusteredXor ( global 4-component vector of uint)
|
||||
0:70 'ballot' ( temp 4-component vector of uint)
|
||||
0:70 Constant:
|
||||
0:70 2 (const uint)
|
||||
0:72 subgroupQuadBroadcast ( global 4-component vector of float)
|
||||
0:72 'f4' ( in 4-component vector of float)
|
||||
0:72 Constant:
|
||||
0:72 0 (const uint)
|
||||
0:73 subgroupQuadSwapHorizontal ( global 4-component vector of float)
|
||||
0:73 'f4' ( in 4-component vector of float)
|
||||
0:74 subgroupQuadSwapVertical ( global 4-component vector of float)
|
||||
0:74 'f4' ( in 4-component vector of float)
|
||||
0:75 subgroupQuadSwapDiagonal ( global 4-component vector of float)
|
||||
0:75 'f4' ( in 4-component vector of float)
|
||||
0:77 Branch: Return with expression
|
||||
0:77 'result' ( temp 4-component vector of float)
|
||||
0:102 Function Definition: main( ( global void)
|
||||
0:102 Function Parameters:
|
||||
0:104 Sequence
|
||||
0:104 Sequence
|
||||
0:104 move second child to first child ( temp uint)
|
||||
0:104 'iid' ( temp uint)
|
||||
0:104 direct index ( temp uint)
|
||||
0:104 'gl_LocalInvocationID' ( in 3-component vector of uint LocalInvocationID)
|
||||
0:104 Constant:
|
||||
0:104 0 (const int)
|
||||
0:105 Sequence
|
||||
0:105 move second child to first child ( temp uint)
|
||||
0:105 'gid' ( temp uint)
|
||||
0:105 direct index ( temp uint)
|
||||
0:105 'gl_WorkGroupID' ( in 3-component vector of uint WorkGroupID)
|
||||
0:105 Constant:
|
||||
0:105 0 (const int)
|
||||
0:108 Sequence
|
||||
0:108 Sequence
|
||||
0:108 move second child to first child ( temp uint)
|
||||
0:108 'i' ( temp uint)
|
||||
0:108 Constant:
|
||||
0:108 0 (const uint)
|
||||
0:108 Loop with condition tested first
|
||||
0:108 Loop Condition
|
||||
0:108 Compare Less Than ( temp bool)
|
||||
0:108 'i' ( temp uint)
|
||||
0:108 Constant:
|
||||
0:108 10 (const uint)
|
||||
0:108 Loop Body
|
||||
0:109 Sequence
|
||||
0:109 move second child to first child ( temp 4-component vector of float)
|
||||
0:109 indirect index ( temp 4-component vector of float)
|
||||
0:109 'mem' ( shared 10-element array of 4-component vector of float)
|
||||
0:109 'i' ( temp uint)
|
||||
0:109 Construct vec4 ( temp 4-component vector of float)
|
||||
0:109 Convert uint to float ( temp float)
|
||||
0:109 add ( temp uint)
|
||||
0:109 'i' ( temp uint)
|
||||
0:109 uni_value: direct index for structure (layout( column_major shared) uniform uint)
|
||||
0:109 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared) uniform uint uni_value})
|
||||
0:109 Constant:
|
||||
0:109 0 (const uint)
|
||||
0:108 Loop Terminal Expression
|
||||
0:108 Pre-Increment ( temp uint)
|
||||
0:108 'i' ( temp uint)
|
||||
0:111 imageStore ( global void)
|
||||
0:111 'uni_image' (layout( binding=0) writeonly uniform image2D)
|
||||
0:111 Construct ivec2 ( temp 2-component vector of int)
|
||||
0:111 Convert uint to int ( temp int)
|
||||
0:111 'iid' ( temp uint)
|
||||
0:111 indirect index ( temp 4-component vector of float)
|
||||
0:111 'mem' ( shared 10-element array of 4-component vector of float)
|
||||
0:111 'gid' ( temp uint)
|
||||
0:112 imageStore ( global void)
|
||||
0:112 'uni_image' (layout( binding=0) writeonly uniform image2D)
|
||||
0:112 Construct ivec2 ( temp 2-component vector of int)
|
||||
0:112 Convert uint to int ( temp int)
|
||||
0:112 'iid' ( temp uint)
|
||||
0:112 indirect index ( temp 4-component vector of float)
|
||||
0:112 'mem' ( shared 10-element array of 4-component vector of float)
|
||||
0:112 add ( temp uint)
|
||||
0:112 'gid' ( temp uint)
|
||||
0:112 Constant:
|
||||
0:112 1 (const uint)
|
||||
0:114 MemoryBarrierShared ( global void)
|
||||
0:114 Barrier ( global void)
|
||||
0:118 move second child to first child ( temp 2-component vector of float)
|
||||
0:118 dummy: direct index for structure ( global 2-component vector of float)
|
||||
0:118 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh})
|
||||
0:118 Constant:
|
||||
0:118 0 (const int)
|
||||
0:118 Constant:
|
||||
0:118 30.000000
|
||||
0:118 31.000000
|
||||
0:119 move second child to first child ( temp 2-component vector of float)
|
||||
0:119 direct index ( temp 2-component vector of float)
|
||||
0:119 submesh: direct index for structure ( global 3-element array of 2-component vector of float)
|
||||
0:119 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh})
|
||||
0:119 Constant:
|
||||
0:119 1 (const int)
|
||||
0:119 Constant:
|
||||
0:119 0 (const int)
|
||||
0:119 Constant:
|
||||
0:119 32.000000
|
||||
0:119 33.000000
|
||||
0:120 move second child to first child ( temp 2-component vector of float)
|
||||
0:120 direct index ( temp 2-component vector of float)
|
||||
0:120 submesh: direct index for structure ( global 3-element array of 2-component vector of float)
|
||||
0:120 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh})
|
||||
0:120 Constant:
|
||||
0:120 1 (const int)
|
||||
0:120 Constant:
|
||||
0:120 1 (const int)
|
||||
0:120 Constant:
|
||||
0:120 34.000000
|
||||
0:120 35.000000
|
||||
0:121 move second child to first child ( temp 2-component vector of float)
|
||||
0:121 direct index ( temp 2-component vector of float)
|
||||
0:121 submesh: direct index for structure ( global 3-element array of 2-component vector of float)
|
||||
0:121 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh})
|
||||
0:121 Constant:
|
||||
0:121 1 (const int)
|
||||
0:121 Constant:
|
||||
0:121 2 (const int)
|
||||
0:121 indirect index ( temp 2-component vector of float)
|
||||
0:121 submesh: direct index for structure ( global 3-element array of 2-component vector of float)
|
||||
0:121 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh})
|
||||
0:121 Constant:
|
||||
0:121 1 (const int)
|
||||
0:121 mod ( temp uint)
|
||||
0:121 'gid' ( temp uint)
|
||||
0:121 Constant:
|
||||
0:121 2 (const uint)
|
||||
0:123 MemoryBarrierShared ( global void)
|
||||
0:123 Barrier ( global void)
|
||||
0:126 EmitMeshTasksEXT ( global void)
|
||||
0:126 Constant:
|
||||
0:126 3 (const uint)
|
||||
0:126 Constant:
|
||||
0:126 1 (const uint)
|
||||
0:126 Constant:
|
||||
0:126 1 (const uint)
|
||||
0:130 Function Definition: basic_works( ( global void)
|
||||
0:130 Function Parameters:
|
||||
0:132 Sequence
|
||||
0:132 'gl_SubgroupSize' ( in uint SubgroupSize)
|
||||
0:133 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID)
|
||||
0:134 subgroupBarrier ( global void)
|
||||
0:135 subgroupMemoryBarrier ( global void)
|
||||
0:136 subgroupMemoryBarrierBuffer ( global void)
|
||||
0:137 subgroupMemoryBarrierImage ( global void)
|
||||
0:138 subgroupElect ( global bool)
|
||||
0:139 'gl_NumSubgroups' ( in uint NumSubgroups)
|
||||
0:140 'gl_SubgroupID' ( in uint SubgroupID)
|
||||
0:141 subgroupMemoryBarrierShared ( global void)
|
||||
0:145 Function Definition: ballot_works(vf4; ( global void)
|
||||
0:145 Function Parameters:
|
||||
0:145 'f4' ( in 4-component vector of float)
|
||||
0:146 Sequence
|
||||
0:146 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask)
|
||||
0:147 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask)
|
||||
0:148 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask)
|
||||
0:149 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask)
|
||||
0:150 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask)
|
||||
0:151 subgroupBroadcast ( global 4-component vector of float)
|
||||
0:151 'f4' ( in 4-component vector of float)
|
||||
0:151 Constant:
|
||||
0:151 0 (const uint)
|
||||
0:152 subgroupBroadcastFirst ( global 4-component vector of float)
|
||||
0:152 'f4' ( in 4-component vector of float)
|
||||
0:153 Sequence
|
||||
0:153 move second child to first child ( temp 4-component vector of uint)
|
||||
0:153 'ballot' ( temp 4-component vector of uint)
|
||||
0:153 subgroupBallot ( global 4-component vector of uint)
|
||||
0:153 Constant:
|
||||
0:153 false (const bool)
|
||||
0:154 subgroupInverseBallot ( global bool)
|
||||
0:154 Constant:
|
||||
0:154 1 (const uint)
|
||||
0:154 1 (const uint)
|
||||
0:154 1 (const uint)
|
||||
0:154 1 (const uint)
|
||||
0:155 subgroupBallotBitExtract ( global bool)
|
||||
0:155 'ballot' ( temp 4-component vector of uint)
|
||||
0:155 Constant:
|
||||
0:155 0 (const uint)
|
||||
0:156 subgroupBallotBitCount ( global uint)
|
||||
0:156 'ballot' ( temp 4-component vector of uint)
|
||||
0:157 subgroupBallotInclusiveBitCount ( global uint)
|
||||
0:157 'ballot' ( temp 4-component vector of uint)
|
||||
0:158 subgroupBallotExclusiveBitCount ( global uint)
|
||||
0:158 'ballot' ( temp 4-component vector of uint)
|
||||
0:159 subgroupBallotFindLSB ( global uint)
|
||||
0:159 'ballot' ( temp 4-component vector of uint)
|
||||
0:160 subgroupBallotFindMSB ( global uint)
|
||||
0:160 'ballot' ( temp 4-component vector of uint)
|
||||
0:164 Function Definition: vote_works(vf4; ( global void)
|
||||
0:164 Function Parameters:
|
||||
0:164 'f4' ( in 4-component vector of float)
|
||||
0:166 Sequence
|
||||
0:166 subgroupAll ( global bool)
|
||||
0:166 Constant:
|
||||
0:166 true (const bool)
|
||||
0:167 subgroupAny ( global bool)
|
||||
0:167 Constant:
|
||||
0:167 false (const bool)
|
||||
0:168 subgroupAllEqual ( global bool)
|
||||
0:168 'f4' ( in 4-component vector of float)
|
||||
0:173 Function Definition: shuffle_works(vf4; ( global void)
|
||||
0:173 Function Parameters:
|
||||
0:173 'f4' ( in 4-component vector of float)
|
||||
0:175 Sequence
|
||||
0:175 subgroupShuffle ( global 4-component vector of float)
|
||||
0:175 'f4' ( in 4-component vector of float)
|
||||
0:175 Constant:
|
||||
0:175 0 (const uint)
|
||||
0:176 subgroupShuffleXor ( global 4-component vector of float)
|
||||
0:176 'f4' ( in 4-component vector of float)
|
||||
0:176 Constant:
|
||||
0:176 1 (const uint)
|
||||
0:177 subgroupShuffleUp ( global 4-component vector of float)
|
||||
0:177 'f4' ( in 4-component vector of float)
|
||||
0:177 Constant:
|
||||
0:177 1 (const uint)
|
||||
0:178 subgroupShuffleDown ( global 4-component vector of float)
|
||||
0:178 'f4' ( in 4-component vector of float)
|
||||
0:178 Constant:
|
||||
0:178 1 (const uint)
|
||||
0:182 Function Definition: arith_works(vf4; ( global void)
|
||||
0:182 Function Parameters:
|
||||
0:182 'f4' ( in 4-component vector of float)
|
||||
0:? Sequence
|
||||
0:185 subgroupAdd ( global 4-component vector of float)
|
||||
0:185 'f4' ( in 4-component vector of float)
|
||||
0:186 subgroupMul ( global 4-component vector of float)
|
||||
0:186 'f4' ( in 4-component vector of float)
|
||||
0:187 subgroupMin ( global 4-component vector of float)
|
||||
0:187 'f4' ( in 4-component vector of float)
|
||||
0:188 subgroupMax ( global 4-component vector of float)
|
||||
0:188 'f4' ( in 4-component vector of float)
|
||||
0:189 subgroupAnd ( global 4-component vector of uint)
|
||||
0:189 'ballot' ( temp 4-component vector of uint)
|
||||
0:190 subgroupOr ( global 4-component vector of uint)
|
||||
0:190 'ballot' ( temp 4-component vector of uint)
|
||||
0:191 subgroupXor ( global 4-component vector of uint)
|
||||
0:191 'ballot' ( temp 4-component vector of uint)
|
||||
0:192 subgroupInclusiveAdd ( global 4-component vector of float)
|
||||
0:192 'f4' ( in 4-component vector of float)
|
||||
0:193 subgroupInclusiveMul ( global 4-component vector of float)
|
||||
0:193 'f4' ( in 4-component vector of float)
|
||||
0:194 subgroupInclusiveMin ( global 4-component vector of float)
|
||||
0:194 'f4' ( in 4-component vector of float)
|
||||
0:195 subgroupInclusiveMax ( global 4-component vector of float)
|
||||
0:195 'f4' ( in 4-component vector of float)
|
||||
0:196 subgroupInclusiveAnd ( global 4-component vector of uint)
|
||||
0:196 'ballot' ( temp 4-component vector of uint)
|
||||
0:197 subgroupInclusiveOr ( global 4-component vector of uint)
|
||||
0:197 'ballot' ( temp 4-component vector of uint)
|
||||
0:198 subgroupInclusiveXor ( global 4-component vector of uint)
|
||||
0:198 'ballot' ( temp 4-component vector of uint)
|
||||
0:199 subgroupExclusiveAdd ( global 4-component vector of float)
|
||||
0:199 'f4' ( in 4-component vector of float)
|
||||
0:200 subgroupExclusiveMul ( global 4-component vector of float)
|
||||
0:200 'f4' ( in 4-component vector of float)
|
||||
0:201 subgroupExclusiveMin ( global 4-component vector of float)
|
||||
0:201 'f4' ( in 4-component vector of float)
|
||||
0:202 subgroupExclusiveMax ( global 4-component vector of float)
|
||||
0:202 'f4' ( in 4-component vector of float)
|
||||
0:203 subgroupExclusiveAnd ( global 4-component vector of uint)
|
||||
0:203 'ballot' ( temp 4-component vector of uint)
|
||||
0:204 subgroupExclusiveOr ( global 4-component vector of uint)
|
||||
0:204 'ballot' ( temp 4-component vector of uint)
|
||||
0:205 subgroupExclusiveXor ( global 4-component vector of uint)
|
||||
0:205 'ballot' ( temp 4-component vector of uint)
|
||||
0:209 Function Definition: clustered_works(vf4; ( global void)
|
||||
0:209 Function Parameters:
|
||||
0:209 'f4' ( in 4-component vector of float)
|
||||
0:211 Sequence
|
||||
0:211 Sequence
|
||||
0:211 move second child to first child ( temp 4-component vector of uint)
|
||||
0:211 'ballot' ( temp 4-component vector of uint)
|
||||
0:211 Constant:
|
||||
0:211 85 (const uint)
|
||||
0:211 0 (const uint)
|
||||
0:211 0 (const uint)
|
||||
0:211 0 (const uint)
|
||||
0:212 subgroupClusteredAdd ( global 4-component vector of float)
|
||||
0:212 'f4' ( in 4-component vector of float)
|
||||
0:212 Constant:
|
||||
0:212 2 (const uint)
|
||||
0:213 subgroupClusteredMul ( global 4-component vector of float)
|
||||
0:213 'f4' ( in 4-component vector of float)
|
||||
0:213 Constant:
|
||||
0:213 2 (const uint)
|
||||
0:214 subgroupClusteredMin ( global 4-component vector of float)
|
||||
0:214 'f4' ( in 4-component vector of float)
|
||||
0:214 Constant:
|
||||
0:214 2 (const uint)
|
||||
0:215 subgroupClusteredMax ( global 4-component vector of float)
|
||||
0:215 'f4' ( in 4-component vector of float)
|
||||
0:215 Constant:
|
||||
0:215 2 (const uint)
|
||||
0:216 subgroupClusteredAnd ( global 4-component vector of uint)
|
||||
0:216 'ballot' ( temp 4-component vector of uint)
|
||||
0:216 Constant:
|
||||
0:216 2 (const uint)
|
||||
0:217 subgroupClusteredOr ( global 4-component vector of uint)
|
||||
0:217 'ballot' ( temp 4-component vector of uint)
|
||||
0:217 Constant:
|
||||
0:217 2 (const uint)
|
||||
0:218 subgroupClusteredXor ( global 4-component vector of uint)
|
||||
0:218 'ballot' ( temp 4-component vector of uint)
|
||||
0:218 Constant:
|
||||
0:218 2 (const uint)
|
||||
0:222 Function Definition: quad_works(vf4; ( global void)
|
||||
0:222 Function Parameters:
|
||||
0:222 'f4' ( in 4-component vector of float)
|
||||
0:224 Sequence
|
||||
0:224 subgroupQuadBroadcast ( global 4-component vector of float)
|
||||
0:224 'f4' ( in 4-component vector of float)
|
||||
0:224 Constant:
|
||||
0:224 0 (const uint)
|
||||
0:225 subgroupQuadSwapHorizontal ( global 4-component vector of float)
|
||||
0:225 'f4' ( in 4-component vector of float)
|
||||
0:226 subgroupQuadSwapVertical ( global 4-component vector of float)
|
||||
0:226 'f4' ( in 4-component vector of float)
|
||||
0:227 subgroupQuadSwapDiagonal ( global 4-component vector of float)
|
||||
0:227 'f4' ( in 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'gl_WorkGroupSize' ( const 3-component vector of uint WorkGroupSize)
|
||||
0:? 32 (const uint)
|
||||
0:? 1 (const uint)
|
||||
0:? 1 (const uint)
|
||||
0:? 'uni_image' (layout( binding=0) writeonly uniform image2D)
|
||||
0:? 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared) uniform uint uni_value})
|
||||
0:? 'mem' ( shared 10-element array of 4-component vector of float)
|
||||
0:? 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh})
|
||||
|
||||
|
||||
Linked task stage:
|
||||
|
||||
|
||||
Shader version: 460
|
||||
Requested GL_EXT_mesh_shader
|
||||
Requested GL_KHR_shader_subgroup_arithmetic
|
||||
Requested GL_KHR_shader_subgroup_ballot
|
||||
Requested GL_KHR_shader_subgroup_basic
|
||||
Requested GL_KHR_shader_subgroup_clustered
|
||||
Requested GL_KHR_shader_subgroup_quad
|
||||
Requested GL_KHR_shader_subgroup_shuffle
|
||||
Requested GL_KHR_shader_subgroup_shuffle_relative
|
||||
Requested GL_KHR_shader_subgroup_vote
|
||||
local_size = (32, 1, 1)
|
||||
ERROR: node is still EOpNull!
|
||||
0:102 Function Definition: main( ( global void)
|
||||
0:102 Function Parameters:
|
||||
0:104 Sequence
|
||||
0:104 Sequence
|
||||
0:104 move second child to first child ( temp uint)
|
||||
0:104 'iid' ( temp uint)
|
||||
0:104 direct index ( temp uint)
|
||||
0:104 'gl_LocalInvocationID' ( in 3-component vector of uint LocalInvocationID)
|
||||
0:104 Constant:
|
||||
0:104 0 (const int)
|
||||
0:105 Sequence
|
||||
0:105 move second child to first child ( temp uint)
|
||||
0:105 'gid' ( temp uint)
|
||||
0:105 direct index ( temp uint)
|
||||
0:105 'gl_WorkGroupID' ( in 3-component vector of uint WorkGroupID)
|
||||
0:105 Constant:
|
||||
0:105 0 (const int)
|
||||
0:108 Sequence
|
||||
0:108 Sequence
|
||||
0:108 move second child to first child ( temp uint)
|
||||
0:108 'i' ( temp uint)
|
||||
0:108 Constant:
|
||||
0:108 0 (const uint)
|
||||
0:108 Loop with condition tested first
|
||||
0:108 Loop Condition
|
||||
0:108 Compare Less Than ( temp bool)
|
||||
0:108 'i' ( temp uint)
|
||||
0:108 Constant:
|
||||
0:108 10 (const uint)
|
||||
0:108 Loop Body
|
||||
0:109 Sequence
|
||||
0:109 move second child to first child ( temp 4-component vector of float)
|
||||
0:109 indirect index ( temp 4-component vector of float)
|
||||
0:109 'mem' ( shared 10-element array of 4-component vector of float)
|
||||
0:109 'i' ( temp uint)
|
||||
0:109 Construct vec4 ( temp 4-component vector of float)
|
||||
0:109 Convert uint to float ( temp float)
|
||||
0:109 add ( temp uint)
|
||||
0:109 'i' ( temp uint)
|
||||
0:109 uni_value: direct index for structure (layout( column_major shared) uniform uint)
|
||||
0:109 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared) uniform uint uni_value})
|
||||
0:109 Constant:
|
||||
0:109 0 (const uint)
|
||||
0:108 Loop Terminal Expression
|
||||
0:108 Pre-Increment ( temp uint)
|
||||
0:108 'i' ( temp uint)
|
||||
0:111 imageStore ( global void)
|
||||
0:111 'uni_image' (layout( binding=0) writeonly uniform image2D)
|
||||
0:111 Construct ivec2 ( temp 2-component vector of int)
|
||||
0:111 Convert uint to int ( temp int)
|
||||
0:111 'iid' ( temp uint)
|
||||
0:111 indirect index ( temp 4-component vector of float)
|
||||
0:111 'mem' ( shared 10-element array of 4-component vector of float)
|
||||
0:111 'gid' ( temp uint)
|
||||
0:112 imageStore ( global void)
|
||||
0:112 'uni_image' (layout( binding=0) writeonly uniform image2D)
|
||||
0:112 Construct ivec2 ( temp 2-component vector of int)
|
||||
0:112 Convert uint to int ( temp int)
|
||||
0:112 'iid' ( temp uint)
|
||||
0:112 indirect index ( temp 4-component vector of float)
|
||||
0:112 'mem' ( shared 10-element array of 4-component vector of float)
|
||||
0:112 add ( temp uint)
|
||||
0:112 'gid' ( temp uint)
|
||||
0:112 Constant:
|
||||
0:112 1 (const uint)
|
||||
0:114 MemoryBarrierShared ( global void)
|
||||
0:114 Barrier ( global void)
|
||||
0:118 move second child to first child ( temp 2-component vector of float)
|
||||
0:118 dummy: direct index for structure ( global 2-component vector of float)
|
||||
0:118 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh})
|
||||
0:118 Constant:
|
||||
0:118 0 (const int)
|
||||
0:118 Constant:
|
||||
0:118 30.000000
|
||||
0:118 31.000000
|
||||
0:119 move second child to first child ( temp 2-component vector of float)
|
||||
0:119 direct index ( temp 2-component vector of float)
|
||||
0:119 submesh: direct index for structure ( global 3-element array of 2-component vector of float)
|
||||
0:119 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh})
|
||||
0:119 Constant:
|
||||
0:119 1 (const int)
|
||||
0:119 Constant:
|
||||
0:119 0 (const int)
|
||||
0:119 Constant:
|
||||
0:119 32.000000
|
||||
0:119 33.000000
|
||||
0:120 move second child to first child ( temp 2-component vector of float)
|
||||
0:120 direct index ( temp 2-component vector of float)
|
||||
0:120 submesh: direct index for structure ( global 3-element array of 2-component vector of float)
|
||||
0:120 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh})
|
||||
0:120 Constant:
|
||||
0:120 1 (const int)
|
||||
0:120 Constant:
|
||||
0:120 1 (const int)
|
||||
0:120 Constant:
|
||||
0:120 34.000000
|
||||
0:120 35.000000
|
||||
0:121 move second child to first child ( temp 2-component vector of float)
|
||||
0:121 direct index ( temp 2-component vector of float)
|
||||
0:121 submesh: direct index for structure ( global 3-element array of 2-component vector of float)
|
||||
0:121 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh})
|
||||
0:121 Constant:
|
||||
0:121 1 (const int)
|
||||
0:121 Constant:
|
||||
0:121 2 (const int)
|
||||
0:121 indirect index ( temp 2-component vector of float)
|
||||
0:121 submesh: direct index for structure ( global 3-element array of 2-component vector of float)
|
||||
0:121 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh})
|
||||
0:121 Constant:
|
||||
0:121 1 (const int)
|
||||
0:121 mod ( temp uint)
|
||||
0:121 'gid' ( temp uint)
|
||||
0:121 Constant:
|
||||
0:121 2 (const uint)
|
||||
0:123 MemoryBarrierShared ( global void)
|
||||
0:123 Barrier ( global void)
|
||||
0:126 EmitMeshTasksEXT ( global void)
|
||||
0:126 Constant:
|
||||
0:126 3 (const uint)
|
||||
0:126 Constant:
|
||||
0:126 1 (const uint)
|
||||
0:126 Constant:
|
||||
0:126 1 (const uint)
|
||||
0:? Linker Objects
|
||||
0:? 'gl_WorkGroupSize' ( const 3-component vector of uint WorkGroupSize)
|
||||
0:? 32 (const uint)
|
||||
0:? 1 (const uint)
|
||||
0:? 1 (const uint)
|
||||
0:? 'uni_image' (layout( binding=0) writeonly uniform image2D)
|
||||
0:? 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared) uniform uint uni_value})
|
||||
0:? 'mem' ( shared 10-element array of 4-component vector of float)
|
||||
0:? 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh})
|
||||
|
448
Test/baseResults/spv.460.subgroupEXT.mesh.out
Normal file
448
Test/baseResults/spv.460.subgroupEXT.mesh.out
Normal file
@ -0,0 +1,448 @@
|
||||
spv.460.subgroupEXT.mesh
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 280
|
||||
|
||||
Capability ClipDistance
|
||||
Capability CullDistance
|
||||
Capability GroupNonUniform
|
||||
Capability GroupNonUniformVote
|
||||
Capability GroupNonUniformArithmetic
|
||||
Capability GroupNonUniformBallot
|
||||
Capability GroupNonUniformShuffle
|
||||
Capability GroupNonUniformShuffleRelative
|
||||
Capability GroupNonUniformClustered
|
||||
Capability GroupNonUniformQuad
|
||||
Capability FragmentShadingRateKHR
|
||||
Capability MeshShadingEXT
|
||||
Extension "SPV_EXT_mesh_shader"
|
||||
Extension "SPV_KHR_fragment_shading_rate"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MeshEXT 4 "main" 35 41 57 109 148 162 163 168 169 172 173 174 175 176
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
ExecutionMode 4 OutputVertices 81
|
||||
ExecutionMode 4 OutputPrimitivesNV 32
|
||||
ExecutionMode 4 OutputTrianglesNV
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_mesh_shader"
|
||||
SourceExtension "GL_KHR_shader_subgroup_arithmetic"
|
||||
SourceExtension "GL_KHR_shader_subgroup_ballot"
|
||||
SourceExtension "GL_KHR_shader_subgroup_basic"
|
||||
SourceExtension "GL_KHR_shader_subgroup_clustered"
|
||||
SourceExtension "GL_KHR_shader_subgroup_quad"
|
||||
SourceExtension "GL_KHR_shader_subgroup_shuffle"
|
||||
SourceExtension "GL_KHR_shader_subgroup_shuffle_relative"
|
||||
SourceExtension "GL_KHR_shader_subgroup_vote"
|
||||
Name 4 "main"
|
||||
Name 6 "basic_works("
|
||||
Name 13 "ballot_works(vf4;"
|
||||
Name 12 "f4"
|
||||
Name 16 "vote_works(vf4;"
|
||||
Name 15 "f4"
|
||||
Name 19 "shuffle_works(vf4;"
|
||||
Name 18 "f4"
|
||||
Name 22 "arith_works(vf4;"
|
||||
Name 21 "f4"
|
||||
Name 25 "clustered_works(vf4;"
|
||||
Name 24 "f4"
|
||||
Name 28 "quad_works(vf4;"
|
||||
Name 27 "f4"
|
||||
Name 32 "iid"
|
||||
Name 35 "gl_LocalInvocationID"
|
||||
Name 40 "gid"
|
||||
Name 41 "gl_WorkGroupID"
|
||||
Name 44 "vertexCount"
|
||||
Name 46 "primitiveCount"
|
||||
Name 54 "gl_MeshPerVertexEXT"
|
||||
MemberName 54(gl_MeshPerVertexEXT) 0 "gl_Position"
|
||||
MemberName 54(gl_MeshPerVertexEXT) 1 "gl_PointSize"
|
||||
MemberName 54(gl_MeshPerVertexEXT) 2 "gl_ClipDistance"
|
||||
MemberName 54(gl_MeshPerVertexEXT) 3 "gl_CullDistance"
|
||||
Name 57 "gl_MeshVerticesEXT"
|
||||
Name 106 "gl_MeshPerPrimitiveEXT"
|
||||
MemberName 106(gl_MeshPerPrimitiveEXT) 0 "gl_PrimitiveID"
|
||||
MemberName 106(gl_MeshPerPrimitiveEXT) 1 "gl_Layer"
|
||||
MemberName 106(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex"
|
||||
MemberName 106(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT"
|
||||
MemberName 106(gl_MeshPerPrimitiveEXT) 4 "gl_PrimitiveShadingRateEXT"
|
||||
Name 109 "gl_MeshPrimitivesEXT"
|
||||
Name 148 "gl_PrimitiveTriangleIndicesEXT"
|
||||
Name 162 "gl_SubgroupSize"
|
||||
Name 163 "gl_SubgroupInvocationID"
|
||||
Name 168 "gl_NumSubgroups"
|
||||
Name 169 "gl_SubgroupID"
|
||||
Name 172 "gl_SubgroupEqMask"
|
||||
Name 173 "gl_SubgroupGeMask"
|
||||
Name 174 "gl_SubgroupGtMask"
|
||||
Name 175 "gl_SubgroupLeMask"
|
||||
Name 176 "gl_SubgroupLtMask"
|
||||
Name 182 "ballot"
|
||||
Name 219 "ballot"
|
||||
Name 254 "ballot"
|
||||
Decorate 35(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||
Decorate 41(gl_WorkGroupID) BuiltIn WorkgroupId
|
||||
MemberDecorate 54(gl_MeshPerVertexEXT) 0 BuiltIn Position
|
||||
MemberDecorate 54(gl_MeshPerVertexEXT) 1 BuiltIn PointSize
|
||||
MemberDecorate 54(gl_MeshPerVertexEXT) 2 BuiltIn ClipDistance
|
||||
MemberDecorate 54(gl_MeshPerVertexEXT) 3 BuiltIn CullDistance
|
||||
Decorate 54(gl_MeshPerVertexEXT) Block
|
||||
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 0 PerPrimitiveNV
|
||||
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 0 BuiltIn PrimitiveId
|
||||
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 1 PerPrimitiveNV
|
||||
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 1 BuiltIn Layer
|
||||
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 2 PerPrimitiveNV
|
||||
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex
|
||||
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV
|
||||
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT
|
||||
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 4 PerPrimitiveNV
|
||||
MemberDecorate 106(gl_MeshPerPrimitiveEXT) 4 BuiltIn PrimitiveShadingRateKHR
|
||||
Decorate 106(gl_MeshPerPrimitiveEXT) Block
|
||||
Decorate 148(gl_PrimitiveTriangleIndicesEXT) BuiltIn PrimitiveTriangleIndicesEXT
|
||||
Decorate 162(gl_SubgroupSize) RelaxedPrecision
|
||||
Decorate 162(gl_SubgroupSize) BuiltIn SubgroupSize
|
||||
Decorate 163(gl_SubgroupInvocationID) RelaxedPrecision
|
||||
Decorate 163(gl_SubgroupInvocationID) BuiltIn SubgroupLocalInvocationId
|
||||
Decorate 168(gl_NumSubgroups) BuiltIn NumSubgroups
|
||||
Decorate 169(gl_SubgroupID) BuiltIn SubgroupId
|
||||
Decorate 172(gl_SubgroupEqMask) BuiltIn SubgroupEqMaskKHR
|
||||
Decorate 173(gl_SubgroupGeMask) BuiltIn SubgroupGeMaskKHR
|
||||
Decorate 174(gl_SubgroupGtMask) BuiltIn SubgroupGtMaskKHR
|
||||
Decorate 175(gl_SubgroupLeMask) BuiltIn SubgroupLeMaskKHR
|
||||
Decorate 176(gl_SubgroupLtMask) BuiltIn SubgroupLtMaskKHR
|
||||
Decorate 279 BuiltIn WorkgroupSize
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
8: TypeFloat 32
|
||||
9: TypeVector 8(float) 4
|
||||
10: TypePointer Function 9(fvec4)
|
||||
11: TypeFunction 2 10(ptr)
|
||||
30: TypeInt 32 0
|
||||
31: TypePointer Function 30(int)
|
||||
33: TypeVector 30(int) 3
|
||||
34: TypePointer Input 33(ivec3)
|
||||
35(gl_LocalInvocationID): 34(ptr) Variable Input
|
||||
36: 30(int) Constant 0
|
||||
37: TypePointer Input 30(int)
|
||||
41(gl_WorkGroupID): 34(ptr) Variable Input
|
||||
45: 30(int) Constant 81
|
||||
47: 30(int) Constant 32
|
||||
50: 30(int) Constant 4
|
||||
51: TypeArray 8(float) 50
|
||||
52: 30(int) Constant 3
|
||||
53: TypeArray 8(float) 52
|
||||
54(gl_MeshPerVertexEXT): TypeStruct 9(fvec4) 8(float) 51 53
|
||||
55: TypeArray 54(gl_MeshPerVertexEXT) 45
|
||||
56: TypePointer Output 55
|
||||
57(gl_MeshVerticesEXT): 56(ptr) Variable Output
|
||||
59: TypeInt 32 1
|
||||
60: 59(int) Constant 0
|
||||
61: 8(float) Constant 1065353216
|
||||
62: 9(fvec4) ConstantComposite 61 61 61 61
|
||||
63: TypePointer Output 9(fvec4)
|
||||
66: 59(int) Constant 1
|
||||
67: 8(float) Constant 1073741824
|
||||
68: TypePointer Output 8(float)
|
||||
71: 59(int) Constant 2
|
||||
72: 59(int) Constant 3
|
||||
73: 8(float) Constant 1077936128
|
||||
76: 8(float) Constant 1082130432
|
||||
78: 30(int) Constant 1
|
||||
79: 30(int) Constant 264
|
||||
80: 30(int) Constant 2
|
||||
105: TypeBool
|
||||
106(gl_MeshPerPrimitiveEXT): TypeStruct 59(int) 59(int) 59(int) 105(bool) 59(int)
|
||||
107: TypeArray 106(gl_MeshPerPrimitiveEXT) 47
|
||||
108: TypePointer Output 107
|
||||
109(gl_MeshPrimitivesEXT): 108(ptr) Variable Output
|
||||
111: 59(int) Constant 6
|
||||
112: TypePointer Output 59(int)
|
||||
115: 59(int) Constant 7
|
||||
118: 59(int) Constant 8
|
||||
121: 105(bool) ConstantFalse
|
||||
122: TypePointer Output 105(bool)
|
||||
145: 30(int) Constant 96
|
||||
146: TypeArray 33(ivec3) 145
|
||||
147: TypePointer Output 146
|
||||
148(gl_PrimitiveTriangleIndicesEXT): 147(ptr) Variable Output
|
||||
149: 33(ivec3) ConstantComposite 78 78 78
|
||||
150: TypePointer Output 33(ivec3)
|
||||
154: 33(ivec3) ConstantComposite 80 80 80
|
||||
162(gl_SubgroupSize): 37(ptr) Variable Input
|
||||
163(gl_SubgroupInvocationID): 37(ptr) Variable Input
|
||||
164: 30(int) Constant 3400
|
||||
165: 30(int) Constant 72
|
||||
166: 30(int) Constant 2056
|
||||
168(gl_NumSubgroups): 37(ptr) Variable Input
|
||||
169(gl_SubgroupID): 37(ptr) Variable Input
|
||||
170: TypeVector 30(int) 4
|
||||
171: TypePointer Input 170(ivec4)
|
||||
172(gl_SubgroupEqMask): 171(ptr) Variable Input
|
||||
173(gl_SubgroupGeMask): 171(ptr) Variable Input
|
||||
174(gl_SubgroupGtMask): 171(ptr) Variable Input
|
||||
175(gl_SubgroupLeMask): 171(ptr) Variable Input
|
||||
176(gl_SubgroupLtMask): 171(ptr) Variable Input
|
||||
181: TypePointer Function 170(ivec4)
|
||||
184: 170(ivec4) ConstantComposite 78 78 78 78
|
||||
198: 105(bool) ConstantTrue
|
||||
255: 30(int) Constant 85
|
||||
256: 170(ivec4) ConstantComposite 255 36 36 36
|
||||
279: 33(ivec3) ConstantComposite 47 78 78
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
32(iid): 31(ptr) Variable Function
|
||||
40(gid): 31(ptr) Variable Function
|
||||
44(vertexCount): 31(ptr) Variable Function
|
||||
46(primitiveCount): 31(ptr) Variable Function
|
||||
38: 37(ptr) AccessChain 35(gl_LocalInvocationID) 36
|
||||
39: 30(int) Load 38
|
||||
Store 32(iid) 39
|
||||
42: 37(ptr) AccessChain 41(gl_WorkGroupID) 36
|
||||
43: 30(int) Load 42
|
||||
Store 40(gid) 43
|
||||
Store 44(vertexCount) 45
|
||||
Store 46(primitiveCount) 47
|
||||
48: 30(int) Load 44(vertexCount)
|
||||
49: 30(int) Load 46(primitiveCount)
|
||||
SetMeshOutputsEXT 48 49
|
||||
58: 30(int) Load 32(iid)
|
||||
64: 63(ptr) AccessChain 57(gl_MeshVerticesEXT) 58 60
|
||||
Store 64 62
|
||||
65: 30(int) Load 32(iid)
|
||||
69: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 65 66
|
||||
Store 69 67
|
||||
70: 30(int) Load 32(iid)
|
||||
74: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 70 71 72
|
||||
Store 74 73
|
||||
75: 30(int) Load 32(iid)
|
||||
77: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 75 72 71
|
||||
Store 77 76
|
||||
MemoryBarrier 78 79
|
||||
ControlBarrier 80 80 79
|
||||
81: 30(int) Load 32(iid)
|
||||
82: 30(int) IAdd 81 78
|
||||
83: 30(int) Load 32(iid)
|
||||
84: 63(ptr) AccessChain 57(gl_MeshVerticesEXT) 83 60
|
||||
85: 9(fvec4) Load 84
|
||||
86: 63(ptr) AccessChain 57(gl_MeshVerticesEXT) 82 60
|
||||
Store 86 85
|
||||
87: 30(int) Load 32(iid)
|
||||
88: 30(int) IAdd 87 78
|
||||
89: 30(int) Load 32(iid)
|
||||
90: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 89 66
|
||||
91: 8(float) Load 90
|
||||
92: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 88 66
|
||||
Store 92 91
|
||||
93: 30(int) Load 32(iid)
|
||||
94: 30(int) IAdd 93 78
|
||||
95: 30(int) Load 32(iid)
|
||||
96: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 95 71 72
|
||||
97: 8(float) Load 96
|
||||
98: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 94 71 72
|
||||
Store 98 97
|
||||
99: 30(int) Load 32(iid)
|
||||
100: 30(int) IAdd 99 78
|
||||
101: 30(int) Load 32(iid)
|
||||
102: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 101 72 71
|
||||
103: 8(float) Load 102
|
||||
104: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 100 72 71
|
||||
Store 104 103
|
||||
MemoryBarrier 78 79
|
||||
ControlBarrier 80 80 79
|
||||
110: 30(int) Load 32(iid)
|
||||
113: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 110 60
|
||||
Store 113 111
|
||||
114: 30(int) Load 32(iid)
|
||||
116: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 114 66
|
||||
Store 116 115
|
||||
117: 30(int) Load 32(iid)
|
||||
119: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 117 71
|
||||
Store 119 118
|
||||
120: 30(int) Load 32(iid)
|
||||
123: 122(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 120 72
|
||||
Store 123 121
|
||||
MemoryBarrier 78 79
|
||||
ControlBarrier 80 80 79
|
||||
124: 30(int) Load 32(iid)
|
||||
125: 30(int) IAdd 124 78
|
||||
126: 30(int) Load 32(iid)
|
||||
127: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 126 60
|
||||
128: 59(int) Load 127
|
||||
129: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 125 60
|
||||
Store 129 128
|
||||
130: 30(int) Load 32(iid)
|
||||
131: 30(int) IAdd 130 78
|
||||
132: 30(int) Load 32(iid)
|
||||
133: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 132 66
|
||||
134: 59(int) Load 133
|
||||
135: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 131 66
|
||||
Store 135 134
|
||||
136: 30(int) Load 32(iid)
|
||||
137: 30(int) IAdd 136 78
|
||||
138: 30(int) Load 32(iid)
|
||||
139: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 138 71
|
||||
140: 59(int) Load 139
|
||||
141: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 137 71
|
||||
Store 141 140
|
||||
142: 30(int) Load 32(iid)
|
||||
143: 30(int) IAdd 142 78
|
||||
144: 122(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 143 72
|
||||
Store 144 121
|
||||
MemoryBarrier 78 79
|
||||
ControlBarrier 80 80 79
|
||||
151: 150(ptr) AccessChain 148(gl_PrimitiveTriangleIndicesEXT) 60
|
||||
Store 151 149
|
||||
152: 30(int) Load 46(primitiveCount)
|
||||
153: 30(int) ISub 152 78
|
||||
155: 150(ptr) AccessChain 148(gl_PrimitiveTriangleIndicesEXT) 153
|
||||
Store 155 154
|
||||
156: 30(int) Load 40(gid)
|
||||
157: 30(int) Load 40(gid)
|
||||
158: 30(int) ISub 157 78
|
||||
159: 150(ptr) AccessChain 148(gl_PrimitiveTriangleIndicesEXT) 158
|
||||
160: 33(ivec3) Load 159
|
||||
161: 150(ptr) AccessChain 148(gl_PrimitiveTriangleIndicesEXT) 156
|
||||
Store 161 160
|
||||
MemoryBarrier 78 79
|
||||
ControlBarrier 80 80 79
|
||||
Return
|
||||
FunctionEnd
|
||||
6(basic_works(): 2 Function None 3
|
||||
7: Label
|
||||
ControlBarrier 52 52 164
|
||||
MemoryBarrier 52 164
|
||||
MemoryBarrier 52 165
|
||||
MemoryBarrier 52 166
|
||||
167: 105(bool) GroupNonUniformElect 52
|
||||
MemoryBarrier 52 79
|
||||
Return
|
||||
FunctionEnd
|
||||
13(ballot_works(vf4;): 2 Function None 11
|
||||
12(f4): 10(ptr) FunctionParameter
|
||||
14: Label
|
||||
182(ballot): 181(ptr) Variable Function
|
||||
177: 9(fvec4) Load 12(f4)
|
||||
178: 9(fvec4) GroupNonUniformBroadcast 52 177 36
|
||||
179: 9(fvec4) Load 12(f4)
|
||||
180: 9(fvec4) GroupNonUniformBroadcastFirst 52 179
|
||||
183: 170(ivec4) GroupNonUniformBallot 52 121
|
||||
Store 182(ballot) 183
|
||||
185: 105(bool) GroupNonUniformInverseBallot 52 184
|
||||
186: 170(ivec4) Load 182(ballot)
|
||||
187: 105(bool) GroupNonUniformBallotBitExtract 52 186 36
|
||||
188: 170(ivec4) Load 182(ballot)
|
||||
189: 30(int) GroupNonUniformBallotBitCount 52 Reduce 188
|
||||
190: 170(ivec4) Load 182(ballot)
|
||||
191: 30(int) GroupNonUniformBallotBitCount 52 InclusiveScan 190
|
||||
192: 170(ivec4) Load 182(ballot)
|
||||
193: 30(int) GroupNonUniformBallotBitCount 52 ExclusiveScan 192
|
||||
194: 170(ivec4) Load 182(ballot)
|
||||
195: 30(int) GroupNonUniformBallotFindLSB 52 194
|
||||
196: 170(ivec4) Load 182(ballot)
|
||||
197: 30(int) GroupNonUniformBallotFindMSB 52 196
|
||||
Return
|
||||
FunctionEnd
|
||||
16(vote_works(vf4;): 2 Function None 11
|
||||
15(f4): 10(ptr) FunctionParameter
|
||||
17: Label
|
||||
199: 105(bool) GroupNonUniformAll 52 198
|
||||
200: 105(bool) GroupNonUniformAny 52 121
|
||||
201: 9(fvec4) Load 15(f4)
|
||||
202: 105(bool) GroupNonUniformAllEqual 52 201
|
||||
Return
|
||||
FunctionEnd
|
||||
19(shuffle_works(vf4;): 2 Function None 11
|
||||
18(f4): 10(ptr) FunctionParameter
|
||||
20: Label
|
||||
203: 9(fvec4) Load 18(f4)
|
||||
204: 9(fvec4) GroupNonUniformShuffle 52 203 36
|
||||
205: 9(fvec4) Load 18(f4)
|
||||
206: 9(fvec4) GroupNonUniformShuffleXor 52 205 78
|
||||
207: 9(fvec4) Load 18(f4)
|
||||
208: 9(fvec4) GroupNonUniformShuffleUp 52 207 78
|
||||
209: 9(fvec4) Load 18(f4)
|
||||
210: 9(fvec4) GroupNonUniformShuffleDown 52 209 78
|
||||
Return
|
||||
FunctionEnd
|
||||
22(arith_works(vf4;): 2 Function None 11
|
||||
21(f4): 10(ptr) FunctionParameter
|
||||
23: Label
|
||||
219(ballot): 181(ptr) Variable Function
|
||||
211: 9(fvec4) Load 21(f4)
|
||||
212: 9(fvec4) GroupNonUniformFAdd 52 Reduce 211
|
||||
213: 9(fvec4) Load 21(f4)
|
||||
214: 9(fvec4) GroupNonUniformFMul 52 Reduce 213
|
||||
215: 9(fvec4) Load 21(f4)
|
||||
216: 9(fvec4) GroupNonUniformFMin 52 Reduce 215
|
||||
217: 9(fvec4) Load 21(f4)
|
||||
218: 9(fvec4) GroupNonUniformFMax 52 Reduce 217
|
||||
220: 170(ivec4) Load 219(ballot)
|
||||
221: 170(ivec4) GroupNonUniformBitwiseAnd 52 Reduce 220
|
||||
222: 170(ivec4) Load 219(ballot)
|
||||
223: 170(ivec4) GroupNonUniformBitwiseOr 52 Reduce 222
|
||||
224: 170(ivec4) Load 219(ballot)
|
||||
225: 170(ivec4) GroupNonUniformBitwiseXor 52 Reduce 224
|
||||
226: 9(fvec4) Load 21(f4)
|
||||
227: 9(fvec4) GroupNonUniformFAdd 52 InclusiveScan 226
|
||||
228: 9(fvec4) Load 21(f4)
|
||||
229: 9(fvec4) GroupNonUniformFMul 52 InclusiveScan 228
|
||||
230: 9(fvec4) Load 21(f4)
|
||||
231: 9(fvec4) GroupNonUniformFMin 52 InclusiveScan 230
|
||||
232: 9(fvec4) Load 21(f4)
|
||||
233: 9(fvec4) GroupNonUniformFMax 52 InclusiveScan 232
|
||||
234: 170(ivec4) Load 219(ballot)
|
||||
235: 170(ivec4) GroupNonUniformBitwiseAnd 52 InclusiveScan 234
|
||||
236: 170(ivec4) Load 219(ballot)
|
||||
237: 170(ivec4) GroupNonUniformBitwiseOr 52 InclusiveScan 236
|
||||
238: 170(ivec4) Load 219(ballot)
|
||||
239: 170(ivec4) GroupNonUniformBitwiseXor 52 InclusiveScan 238
|
||||
240: 9(fvec4) Load 21(f4)
|
||||
241: 9(fvec4) GroupNonUniformFAdd 52 ExclusiveScan 240
|
||||
242: 9(fvec4) Load 21(f4)
|
||||
243: 9(fvec4) GroupNonUniformFMul 52 ExclusiveScan 242
|
||||
244: 9(fvec4) Load 21(f4)
|
||||
245: 9(fvec4) GroupNonUniformFMin 52 ExclusiveScan 244
|
||||
246: 9(fvec4) Load 21(f4)
|
||||
247: 9(fvec4) GroupNonUniformFMax 52 ExclusiveScan 246
|
||||
248: 170(ivec4) Load 219(ballot)
|
||||
249: 170(ivec4) GroupNonUniformBitwiseAnd 52 ExclusiveScan 248
|
||||
250: 170(ivec4) Load 219(ballot)
|
||||
251: 170(ivec4) GroupNonUniformBitwiseOr 52 ExclusiveScan 250
|
||||
252: 170(ivec4) Load 219(ballot)
|
||||
253: 170(ivec4) GroupNonUniformBitwiseXor 52 ExclusiveScan 252
|
||||
Return
|
||||
FunctionEnd
|
||||
25(clustered_works(vf4;): 2 Function None 11
|
||||
24(f4): 10(ptr) FunctionParameter
|
||||
26: Label
|
||||
254(ballot): 181(ptr) Variable Function
|
||||
Store 254(ballot) 256
|
||||
257: 9(fvec4) Load 24(f4)
|
||||
258: 9(fvec4) GroupNonUniformFAdd 52 ClusteredReduce 257 80
|
||||
259: 9(fvec4) Load 24(f4)
|
||||
260: 9(fvec4) GroupNonUniformFMul 52 ClusteredReduce 259 80
|
||||
261: 9(fvec4) Load 24(f4)
|
||||
262: 9(fvec4) GroupNonUniformFMin 52 ClusteredReduce 261 80
|
||||
263: 9(fvec4) Load 24(f4)
|
||||
264: 9(fvec4) GroupNonUniformFMax 52 ClusteredReduce 263 80
|
||||
265: 170(ivec4) Load 254(ballot)
|
||||
266: 170(ivec4) GroupNonUniformBitwiseAnd 52 ClusteredReduce 265 80
|
||||
267: 170(ivec4) Load 254(ballot)
|
||||
268: 170(ivec4) GroupNonUniformBitwiseOr 52 ClusteredReduce 267 80
|
||||
269: 170(ivec4) Load 254(ballot)
|
||||
270: 170(ivec4) GroupNonUniformBitwiseXor 52 ClusteredReduce 269 80
|
||||
Return
|
||||
FunctionEnd
|
||||
28(quad_works(vf4;): 2 Function None 11
|
||||
27(f4): 10(ptr) FunctionParameter
|
||||
29: Label
|
||||
271: 9(fvec4) Load 27(f4)
|
||||
272: 9(fvec4) GroupNonUniformQuadBroadcast 52 271 36
|
||||
273: 9(fvec4) Load 27(f4)
|
||||
274: 9(fvec4) GroupNonUniformQuadSwap 52 273 36
|
||||
275: 9(fvec4) Load 27(f4)
|
||||
276: 9(fvec4) GroupNonUniformQuadSwap 52 275 78
|
||||
277: 9(fvec4) Load 27(f4)
|
||||
278: 9(fvec4) GroupNonUniformQuadSwap 52 277 80
|
||||
Return
|
||||
FunctionEnd
|
376
Test/baseResults/spv.460.subgroupEXT.task.out
Normal file
376
Test/baseResults/spv.460.subgroupEXT.task.out
Normal file
@ -0,0 +1,376 @@
|
||||
spv.460.subgroupEXT.task
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 242
|
||||
|
||||
Capability StorageImageWriteWithoutFormat
|
||||
Capability GroupNonUniform
|
||||
Capability GroupNonUniformVote
|
||||
Capability GroupNonUniformArithmetic
|
||||
Capability GroupNonUniformBallot
|
||||
Capability GroupNonUniformShuffle
|
||||
Capability GroupNonUniformShuffleRelative
|
||||
Capability GroupNonUniformClustered
|
||||
Capability GroupNonUniformQuad
|
||||
Capability MeshShadingEXT
|
||||
Extension "SPV_EXT_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint TaskEXT 4 "main" 35 41 56 61 77 102 122 123 128 129 132 133 134 135 136
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_mesh_shader"
|
||||
SourceExtension "GL_KHR_shader_subgroup_arithmetic"
|
||||
SourceExtension "GL_KHR_shader_subgroup_ballot"
|
||||
SourceExtension "GL_KHR_shader_subgroup_basic"
|
||||
SourceExtension "GL_KHR_shader_subgroup_clustered"
|
||||
SourceExtension "GL_KHR_shader_subgroup_quad"
|
||||
SourceExtension "GL_KHR_shader_subgroup_shuffle"
|
||||
SourceExtension "GL_KHR_shader_subgroup_shuffle_relative"
|
||||
SourceExtension "GL_KHR_shader_subgroup_vote"
|
||||
Name 4 "main"
|
||||
Name 6 "basic_works("
|
||||
Name 13 "ballot_works(vf4;"
|
||||
Name 12 "f4"
|
||||
Name 16 "vote_works(vf4;"
|
||||
Name 15 "f4"
|
||||
Name 19 "shuffle_works(vf4;"
|
||||
Name 18 "f4"
|
||||
Name 22 "arith_works(vf4;"
|
||||
Name 21 "f4"
|
||||
Name 25 "clustered_works(vf4;"
|
||||
Name 24 "f4"
|
||||
Name 28 "quad_works(vf4;"
|
||||
Name 27 "f4"
|
||||
Name 32 "iid"
|
||||
Name 35 "gl_LocalInvocationID"
|
||||
Name 40 "gid"
|
||||
Name 41 "gl_WorkGroupID"
|
||||
Name 44 "i"
|
||||
Name 56 "mem"
|
||||
Name 59 "block0"
|
||||
MemberName 59(block0) 0 "uni_value"
|
||||
Name 61 ""
|
||||
Name 77 "uni_image"
|
||||
Name 100 "Task"
|
||||
MemberName 100(Task) 0 "dummy"
|
||||
MemberName 100(Task) 1 "submesh"
|
||||
Name 102 "mytask"
|
||||
Name 122 "gl_SubgroupSize"
|
||||
Name 123 "gl_SubgroupInvocationID"
|
||||
Name 128 "gl_NumSubgroups"
|
||||
Name 129 "gl_SubgroupID"
|
||||
Name 132 "gl_SubgroupEqMask"
|
||||
Name 133 "gl_SubgroupGeMask"
|
||||
Name 134 "gl_SubgroupGtMask"
|
||||
Name 135 "gl_SubgroupLeMask"
|
||||
Name 136 "gl_SubgroupLtMask"
|
||||
Name 142 "ballot"
|
||||
Name 180 "ballot"
|
||||
Name 215 "ballot"
|
||||
Decorate 35(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||
Decorate 41(gl_WorkGroupID) BuiltIn WorkgroupId
|
||||
MemberDecorate 59(block0) 0 Offset 0
|
||||
Decorate 59(block0) Block
|
||||
Decorate 61 DescriptorSet 0
|
||||
Decorate 61 Binding 1
|
||||
Decorate 77(uni_image) DescriptorSet 0
|
||||
Decorate 77(uni_image) Binding 0
|
||||
Decorate 77(uni_image) NonReadable
|
||||
Decorate 122(gl_SubgroupSize) RelaxedPrecision
|
||||
Decorate 122(gl_SubgroupSize) BuiltIn SubgroupSize
|
||||
Decorate 123(gl_SubgroupInvocationID) RelaxedPrecision
|
||||
Decorate 123(gl_SubgroupInvocationID) BuiltIn SubgroupLocalInvocationId
|
||||
Decorate 128(gl_NumSubgroups) BuiltIn NumSubgroups
|
||||
Decorate 129(gl_SubgroupID) BuiltIn SubgroupId
|
||||
Decorate 132(gl_SubgroupEqMask) BuiltIn SubgroupEqMaskKHR
|
||||
Decorate 133(gl_SubgroupGeMask) BuiltIn SubgroupGeMaskKHR
|
||||
Decorate 134(gl_SubgroupGtMask) BuiltIn SubgroupGtMaskKHR
|
||||
Decorate 135(gl_SubgroupLeMask) BuiltIn SubgroupLeMaskKHR
|
||||
Decorate 136(gl_SubgroupLtMask) BuiltIn SubgroupLtMaskKHR
|
||||
Decorate 241 BuiltIn WorkgroupSize
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
8: TypeFloat 32
|
||||
9: TypeVector 8(float) 4
|
||||
10: TypePointer Function 9(fvec4)
|
||||
11: TypeFunction 2 10(ptr)
|
||||
30: TypeInt 32 0
|
||||
31: TypePointer Function 30(int)
|
||||
33: TypeVector 30(int) 3
|
||||
34: TypePointer Input 33(ivec3)
|
||||
35(gl_LocalInvocationID): 34(ptr) Variable Input
|
||||
36: 30(int) Constant 0
|
||||
37: TypePointer Input 30(int)
|
||||
41(gl_WorkGroupID): 34(ptr) Variable Input
|
||||
51: 30(int) Constant 10
|
||||
52: TypeBool
|
||||
54: TypeArray 9(fvec4) 51
|
||||
55: TypePointer Workgroup 54
|
||||
56(mem): 55(ptr) Variable Workgroup
|
||||
59(block0): TypeStruct 30(int)
|
||||
60: TypePointer Uniform 59(block0)
|
||||
61: 60(ptr) Variable Uniform
|
||||
62: TypeInt 32 1
|
||||
63: 62(int) Constant 0
|
||||
64: TypePointer Uniform 30(int)
|
||||
70: TypePointer Workgroup 9(fvec4)
|
||||
73: 62(int) Constant 1
|
||||
75: TypeImage 8(float) 2D nonsampled format:Unknown
|
||||
76: TypePointer UniformConstant 75
|
||||
77(uni_image): 76(ptr) Variable UniformConstant
|
||||
81: TypeVector 62(int) 2
|
||||
91: 30(int) Constant 1
|
||||
95: 30(int) Constant 264
|
||||
96: 30(int) Constant 2
|
||||
97: TypeVector 8(float) 2
|
||||
98: 30(int) Constant 3
|
||||
99: TypeArray 97(fvec2) 98
|
||||
100(Task): TypeStruct 97(fvec2) 99
|
||||
101: TypePointer TaskPayloadWorkgroupEXT 100(Task)
|
||||
102(mytask): 101(ptr) Variable TaskPayloadWorkgroupEXT
|
||||
103: 8(float) Constant 1106247680
|
||||
104: 8(float) Constant 1106771968
|
||||
105: 97(fvec2) ConstantComposite 103 104
|
||||
106: TypePointer TaskPayloadWorkgroupEXT 97(fvec2)
|
||||
108: 8(float) Constant 1107296256
|
||||
109: 8(float) Constant 1107558400
|
||||
110: 97(fvec2) ConstantComposite 108 109
|
||||
112: 8(float) Constant 1107820544
|
||||
113: 8(float) Constant 1108082688
|
||||
114: 97(fvec2) ConstantComposite 112 113
|
||||
116: 62(int) Constant 2
|
||||
122(gl_SubgroupSize): 37(ptr) Variable Input
|
||||
123(gl_SubgroupInvocationID): 37(ptr) Variable Input
|
||||
124: 30(int) Constant 3400
|
||||
125: 30(int) Constant 72
|
||||
126: 30(int) Constant 2056
|
||||
128(gl_NumSubgroups): 37(ptr) Variable Input
|
||||
129(gl_SubgroupID): 37(ptr) Variable Input
|
||||
130: TypeVector 30(int) 4
|
||||
131: TypePointer Input 130(ivec4)
|
||||
132(gl_SubgroupEqMask): 131(ptr) Variable Input
|
||||
133(gl_SubgroupGeMask): 131(ptr) Variable Input
|
||||
134(gl_SubgroupGtMask): 131(ptr) Variable Input
|
||||
135(gl_SubgroupLeMask): 131(ptr) Variable Input
|
||||
136(gl_SubgroupLtMask): 131(ptr) Variable Input
|
||||
141: TypePointer Function 130(ivec4)
|
||||
143: 52(bool) ConstantFalse
|
||||
145: 130(ivec4) ConstantComposite 91 91 91 91
|
||||
159: 52(bool) ConstantTrue
|
||||
216: 30(int) Constant 85
|
||||
217: 130(ivec4) ConstantComposite 216 36 36 36
|
||||
240: 30(int) Constant 32
|
||||
241: 33(ivec3) ConstantComposite 240 91 91
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
32(iid): 31(ptr) Variable Function
|
||||
40(gid): 31(ptr) Variable Function
|
||||
44(i): 31(ptr) Variable Function
|
||||
38: 37(ptr) AccessChain 35(gl_LocalInvocationID) 36
|
||||
39: 30(int) Load 38
|
||||
Store 32(iid) 39
|
||||
42: 37(ptr) AccessChain 41(gl_WorkGroupID) 36
|
||||
43: 30(int) Load 42
|
||||
Store 40(gid) 43
|
||||
Store 44(i) 36
|
||||
Branch 45
|
||||
45: Label
|
||||
LoopMerge 47 48 None
|
||||
Branch 49
|
||||
49: Label
|
||||
50: 30(int) Load 44(i)
|
||||
53: 52(bool) ULessThan 50 51
|
||||
BranchConditional 53 46 47
|
||||
46: Label
|
||||
57: 30(int) Load 44(i)
|
||||
58: 30(int) Load 44(i)
|
||||
65: 64(ptr) AccessChain 61 63
|
||||
66: 30(int) Load 65
|
||||
67: 30(int) IAdd 58 66
|
||||
68: 8(float) ConvertUToF 67
|
||||
69: 9(fvec4) CompositeConstruct 68 68 68 68
|
||||
71: 70(ptr) AccessChain 56(mem) 57
|
||||
Store 71 69
|
||||
Branch 48
|
||||
48: Label
|
||||
72: 30(int) Load 44(i)
|
||||
74: 30(int) IAdd 72 73
|
||||
Store 44(i) 74
|
||||
Branch 45
|
||||
47: Label
|
||||
78: 75 Load 77(uni_image)
|
||||
79: 30(int) Load 32(iid)
|
||||
80: 62(int) Bitcast 79
|
||||
82: 81(ivec2) CompositeConstruct 80 80
|
||||
83: 30(int) Load 40(gid)
|
||||
84: 70(ptr) AccessChain 56(mem) 83
|
||||
85: 9(fvec4) Load 84
|
||||
ImageWrite 78 82 85
|
||||
86: 75 Load 77(uni_image)
|
||||
87: 30(int) Load 32(iid)
|
||||
88: 62(int) Bitcast 87
|
||||
89: 81(ivec2) CompositeConstruct 88 88
|
||||
90: 30(int) Load 40(gid)
|
||||
92: 30(int) IAdd 90 91
|
||||
93: 70(ptr) AccessChain 56(mem) 92
|
||||
94: 9(fvec4) Load 93
|
||||
ImageWrite 86 89 94
|
||||
MemoryBarrier 91 95
|
||||
ControlBarrier 96 96 95
|
||||
107: 106(ptr) AccessChain 102(mytask) 63
|
||||
Store 107 105
|
||||
111: 106(ptr) AccessChain 102(mytask) 73 63
|
||||
Store 111 110
|
||||
115: 106(ptr) AccessChain 102(mytask) 73 73
|
||||
Store 115 114
|
||||
117: 30(int) Load 40(gid)
|
||||
118: 30(int) UMod 117 96
|
||||
119: 106(ptr) AccessChain 102(mytask) 73 118
|
||||
120: 97(fvec2) Load 119
|
||||
121: 106(ptr) AccessChain 102(mytask) 73 116
|
||||
Store 121 120
|
||||
MemoryBarrier 91 95
|
||||
ControlBarrier 96 96 95
|
||||
EmitMeshTasksEXT 98 91 91 102(mytask)
|
||||
Return
|
||||
FunctionEnd
|
||||
6(basic_works(): 2 Function None 3
|
||||
7: Label
|
||||
ControlBarrier 98 98 124
|
||||
MemoryBarrier 98 124
|
||||
MemoryBarrier 98 125
|
||||
MemoryBarrier 98 126
|
||||
127: 52(bool) GroupNonUniformElect 98
|
||||
MemoryBarrier 98 95
|
||||
Return
|
||||
FunctionEnd
|
||||
13(ballot_works(vf4;): 2 Function None 11
|
||||
12(f4): 10(ptr) FunctionParameter
|
||||
14: Label
|
||||
142(ballot): 141(ptr) Variable Function
|
||||
137: 9(fvec4) Load 12(f4)
|
||||
138: 9(fvec4) GroupNonUniformBroadcast 98 137 36
|
||||
139: 9(fvec4) Load 12(f4)
|
||||
140: 9(fvec4) GroupNonUniformBroadcastFirst 98 139
|
||||
144: 130(ivec4) GroupNonUniformBallot 98 143
|
||||
Store 142(ballot) 144
|
||||
146: 52(bool) GroupNonUniformInverseBallot 98 145
|
||||
147: 130(ivec4) Load 142(ballot)
|
||||
148: 52(bool) GroupNonUniformBallotBitExtract 98 147 36
|
||||
149: 130(ivec4) Load 142(ballot)
|
||||
150: 30(int) GroupNonUniformBallotBitCount 98 Reduce 149
|
||||
151: 130(ivec4) Load 142(ballot)
|
||||
152: 30(int) GroupNonUniformBallotBitCount 98 InclusiveScan 151
|
||||
153: 130(ivec4) Load 142(ballot)
|
||||
154: 30(int) GroupNonUniformBallotBitCount 98 ExclusiveScan 153
|
||||
155: 130(ivec4) Load 142(ballot)
|
||||
156: 30(int) GroupNonUniformBallotFindLSB 98 155
|
||||
157: 130(ivec4) Load 142(ballot)
|
||||
158: 30(int) GroupNonUniformBallotFindMSB 98 157
|
||||
Return
|
||||
FunctionEnd
|
||||
16(vote_works(vf4;): 2 Function None 11
|
||||
15(f4): 10(ptr) FunctionParameter
|
||||
17: Label
|
||||
160: 52(bool) GroupNonUniformAll 98 159
|
||||
161: 52(bool) GroupNonUniformAny 98 143
|
||||
162: 9(fvec4) Load 15(f4)
|
||||
163: 52(bool) GroupNonUniformAllEqual 98 162
|
||||
Return
|
||||
FunctionEnd
|
||||
19(shuffle_works(vf4;): 2 Function None 11
|
||||
18(f4): 10(ptr) FunctionParameter
|
||||
20: Label
|
||||
164: 9(fvec4) Load 18(f4)
|
||||
165: 9(fvec4) GroupNonUniformShuffle 98 164 36
|
||||
166: 9(fvec4) Load 18(f4)
|
||||
167: 9(fvec4) GroupNonUniformShuffleXor 98 166 91
|
||||
168: 9(fvec4) Load 18(f4)
|
||||
169: 9(fvec4) GroupNonUniformShuffleUp 98 168 91
|
||||
170: 9(fvec4) Load 18(f4)
|
||||
171: 9(fvec4) GroupNonUniformShuffleDown 98 170 91
|
||||
Return
|
||||
FunctionEnd
|
||||
22(arith_works(vf4;): 2 Function None 11
|
||||
21(f4): 10(ptr) FunctionParameter
|
||||
23: Label
|
||||
180(ballot): 141(ptr) Variable Function
|
||||
172: 9(fvec4) Load 21(f4)
|
||||
173: 9(fvec4) GroupNonUniformFAdd 98 Reduce 172
|
||||
174: 9(fvec4) Load 21(f4)
|
||||
175: 9(fvec4) GroupNonUniformFMul 98 Reduce 174
|
||||
176: 9(fvec4) Load 21(f4)
|
||||
177: 9(fvec4) GroupNonUniformFMin 98 Reduce 176
|
||||
178: 9(fvec4) Load 21(f4)
|
||||
179: 9(fvec4) GroupNonUniformFMax 98 Reduce 178
|
||||
181: 130(ivec4) Load 180(ballot)
|
||||
182: 130(ivec4) GroupNonUniformBitwiseAnd 98 Reduce 181
|
||||
183: 130(ivec4) Load 180(ballot)
|
||||
184: 130(ivec4) GroupNonUniformBitwiseOr 98 Reduce 183
|
||||
185: 130(ivec4) Load 180(ballot)
|
||||
186: 130(ivec4) GroupNonUniformBitwiseXor 98 Reduce 185
|
||||
187: 9(fvec4) Load 21(f4)
|
||||
188: 9(fvec4) GroupNonUniformFAdd 98 InclusiveScan 187
|
||||
189: 9(fvec4) Load 21(f4)
|
||||
190: 9(fvec4) GroupNonUniformFMul 98 InclusiveScan 189
|
||||
191: 9(fvec4) Load 21(f4)
|
||||
192: 9(fvec4) GroupNonUniformFMin 98 InclusiveScan 191
|
||||
193: 9(fvec4) Load 21(f4)
|
||||
194: 9(fvec4) GroupNonUniformFMax 98 InclusiveScan 193
|
||||
195: 130(ivec4) Load 180(ballot)
|
||||
196: 130(ivec4) GroupNonUniformBitwiseAnd 98 InclusiveScan 195
|
||||
197: 130(ivec4) Load 180(ballot)
|
||||
198: 130(ivec4) GroupNonUniformBitwiseOr 98 InclusiveScan 197
|
||||
199: 130(ivec4) Load 180(ballot)
|
||||
200: 130(ivec4) GroupNonUniformBitwiseXor 98 InclusiveScan 199
|
||||
201: 9(fvec4) Load 21(f4)
|
||||
202: 9(fvec4) GroupNonUniformFAdd 98 ExclusiveScan 201
|
||||
203: 9(fvec4) Load 21(f4)
|
||||
204: 9(fvec4) GroupNonUniformFMul 98 ExclusiveScan 203
|
||||
205: 9(fvec4) Load 21(f4)
|
||||
206: 9(fvec4) GroupNonUniformFMin 98 ExclusiveScan 205
|
||||
207: 9(fvec4) Load 21(f4)
|
||||
208: 9(fvec4) GroupNonUniformFMax 98 ExclusiveScan 207
|
||||
209: 130(ivec4) Load 180(ballot)
|
||||
210: 130(ivec4) GroupNonUniformBitwiseAnd 98 ExclusiveScan 209
|
||||
211: 130(ivec4) Load 180(ballot)
|
||||
212: 130(ivec4) GroupNonUniformBitwiseOr 98 ExclusiveScan 211
|
||||
213: 130(ivec4) Load 180(ballot)
|
||||
214: 130(ivec4) GroupNonUniformBitwiseXor 98 ExclusiveScan 213
|
||||
Return
|
||||
FunctionEnd
|
||||
25(clustered_works(vf4;): 2 Function None 11
|
||||
24(f4): 10(ptr) FunctionParameter
|
||||
26: Label
|
||||
215(ballot): 141(ptr) Variable Function
|
||||
Store 215(ballot) 217
|
||||
218: 9(fvec4) Load 24(f4)
|
||||
219: 9(fvec4) GroupNonUniformFAdd 98 ClusteredReduce 218 96
|
||||
220: 9(fvec4) Load 24(f4)
|
||||
221: 9(fvec4) GroupNonUniformFMul 98 ClusteredReduce 220 96
|
||||
222: 9(fvec4) Load 24(f4)
|
||||
223: 9(fvec4) GroupNonUniformFMin 98 ClusteredReduce 222 96
|
||||
224: 9(fvec4) Load 24(f4)
|
||||
225: 9(fvec4) GroupNonUniformFMax 98 ClusteredReduce 224 96
|
||||
226: 130(ivec4) Load 215(ballot)
|
||||
227: 130(ivec4) GroupNonUniformBitwiseAnd 98 ClusteredReduce 226 96
|
||||
228: 130(ivec4) Load 215(ballot)
|
||||
229: 130(ivec4) GroupNonUniformBitwiseOr 98 ClusteredReduce 228 96
|
||||
230: 130(ivec4) Load 215(ballot)
|
||||
231: 130(ivec4) GroupNonUniformBitwiseXor 98 ClusteredReduce 230 96
|
||||
Return
|
||||
FunctionEnd
|
||||
28(quad_works(vf4;): 2 Function None 11
|
||||
27(f4): 10(ptr) FunctionParameter
|
||||
29: Label
|
||||
232: 9(fvec4) Load 27(f4)
|
||||
233: 9(fvec4) GroupNonUniformQuadBroadcast 98 232 36
|
||||
234: 9(fvec4) Load 27(f4)
|
||||
235: 9(fvec4) GroupNonUniformQuadSwap 98 234 36
|
||||
236: 9(fvec4) Load 27(f4)
|
||||
237: 9(fvec4) GroupNonUniformQuadSwap 98 236 91
|
||||
238: 9(fvec4) Load 27(f4)
|
||||
239: 9(fvec4) GroupNonUniformQuadSwap 98 238 96
|
||||
Return
|
||||
FunctionEnd
|
7
Test/baseResults/spv.atomiAddEXT.error.mesh.out
Normal file
7
Test/baseResults/spv.atomiAddEXT.error.mesh.out
Normal file
@ -0,0 +1,7 @@
|
||||
spv.atomiAddEXT.error.mesh
|
||||
ERROR: 0:21: 'assign' : l-value required "mytask" (can't modify variable with storage qualifier taskPayloadSharedEXT in mesh shaders)
|
||||
ERROR: 0:21: 'out' : Non-L-value cannot be passed for 'out' or 'inout' parameters.
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
71
Test/baseResults/spv.atomiAddEXT.task.out
Normal file
71
Test/baseResults/spv.atomiAddEXT.task.out
Normal file
@ -0,0 +1,71 @@
|
||||
spv.atomiAddEXT.task
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 34
|
||||
|
||||
Capability MeshShadingEXT
|
||||
Extension "SPV_EXT_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint TaskEXT 4 "main" 9 23 28
|
||||
ExecutionMode 4 LocalSize 1 1 1
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_mesh_shader"
|
||||
Name 4 "main"
|
||||
Name 7 "Buffer"
|
||||
MemberName 7(Buffer) 0 "x"
|
||||
Name 9 ""
|
||||
Name 20 "structType"
|
||||
MemberName 20(structType) 0 "y"
|
||||
Name 21 "t2"
|
||||
MemberName 21(t2) 0 "f"
|
||||
Name 23 "t"
|
||||
Name 26 "taskBlock"
|
||||
MemberName 26(taskBlock) 0 "atom1"
|
||||
Name 28 "mytask"
|
||||
MemberDecorate 7(Buffer) 0 Coherent
|
||||
MemberDecorate 7(Buffer) 0 Offset 0
|
||||
Decorate 7(Buffer) Block
|
||||
Decorate 9 DescriptorSet 0
|
||||
Decorate 9 Binding 1
|
||||
Decorate 19 ArrayStride 4
|
||||
MemberDecorate 20(structType) 0 Offset 0
|
||||
MemberDecorate 21(t2) 0 Offset 0
|
||||
Decorate 21(t2) Block
|
||||
Decorate 23(t) DescriptorSet 0
|
||||
Decorate 23(t) Binding 0
|
||||
Decorate 33 BuiltIn WorkgroupSize
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
7(Buffer): TypeStruct 6(int)
|
||||
8: TypePointer StorageBuffer 7(Buffer)
|
||||
9: 8(ptr) Variable StorageBuffer
|
||||
10: 6(int) Constant 0
|
||||
11: TypePointer StorageBuffer 6(int)
|
||||
13: 6(int) Constant 1
|
||||
14: TypeInt 32 0
|
||||
15: 14(int) Constant 1
|
||||
16: 14(int) Constant 0
|
||||
18: 14(int) Constant 3
|
||||
19: TypeArray 6(int) 18
|
||||
20(structType): TypeStruct 19
|
||||
21(t2): TypeStruct 20(structType)
|
||||
22: TypePointer StorageBuffer 21(t2)
|
||||
23(t): 22(ptr) Variable StorageBuffer
|
||||
26(taskBlock): TypeStruct 6(int)
|
||||
27: TypePointer TaskPayloadWorkgroupEXT 26(taskBlock)
|
||||
28(mytask): 27(ptr) Variable TaskPayloadWorkgroupEXT
|
||||
29: TypePointer TaskPayloadWorkgroupEXT 6(int)
|
||||
32: TypeVector 14(int) 3
|
||||
33: 32(ivec3) ConstantComposite 15 15 15
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
12: 11(ptr) AccessChain 9 10
|
||||
17: 6(int) AtomicIAdd 12 15 16 13
|
||||
24: 11(ptr) AccessChain 23(t) 10 10 13
|
||||
25: 6(int) AtomicIAdd 24 15 16 13
|
||||
30: 29(ptr) AccessChain 28(mytask) 10
|
||||
31: 6(int) AtomicIAdd 30 15 16 13
|
||||
Return
|
||||
FunctionEnd
|
273
Test/baseResults/spv.ext.meshShaderBuiltins.mesh.out
Normal file
273
Test/baseResults/spv.ext.meshShaderBuiltins.mesh.out
Normal file
@ -0,0 +1,273 @@
|
||||
spv.ext.meshShaderBuiltins.mesh
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 159
|
||||
|
||||
Capability ClipDistance
|
||||
Capability CullDistance
|
||||
Capability FragmentShadingRateKHR
|
||||
Capability DrawParameters
|
||||
Capability MultiView
|
||||
Capability MeshShadingEXT
|
||||
Extension "SPV_EXT_mesh_shader"
|
||||
Extension "SPV_KHR_fragment_shading_rate"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MeshEXT 4 "main" 13 19 24 41 93 135 153 156
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
ExecutionMode 4 OutputVertices 81
|
||||
ExecutionMode 4 OutputPrimitivesNV 32
|
||||
ExecutionMode 4 OutputTrianglesNV
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_ARB_shader_draw_parameters"
|
||||
SourceExtension "GL_EXT_mesh_shader"
|
||||
SourceExtension "GL_EXT_multiview"
|
||||
Name 4 "main"
|
||||
Name 6 "testAdditionalBuiltins("
|
||||
Name 10 "iid"
|
||||
Name 13 "gl_LocalInvocationID"
|
||||
Name 18 "gid"
|
||||
Name 19 "gl_WorkGroupID"
|
||||
Name 23 "numWorkGrous"
|
||||
Name 24 "gl_NumWorkGroups"
|
||||
Name 26 "vertexCount"
|
||||
Name 28 "primitiveCount"
|
||||
Name 38 "gl_MeshPerVertexEXT"
|
||||
MemberName 38(gl_MeshPerVertexEXT) 0 "gl_Position"
|
||||
MemberName 38(gl_MeshPerVertexEXT) 1 "gl_PointSize"
|
||||
MemberName 38(gl_MeshPerVertexEXT) 2 "gl_ClipDistance"
|
||||
MemberName 38(gl_MeshPerVertexEXT) 3 "gl_CullDistance"
|
||||
Name 41 "gl_MeshVerticesEXT"
|
||||
Name 90 "gl_MeshPerPrimitiveEXT"
|
||||
MemberName 90(gl_MeshPerPrimitiveEXT) 0 "gl_PrimitiveID"
|
||||
MemberName 90(gl_MeshPerPrimitiveEXT) 1 "gl_Layer"
|
||||
MemberName 90(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex"
|
||||
MemberName 90(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT"
|
||||
MemberName 90(gl_MeshPerPrimitiveEXT) 4 "gl_PrimitiveShadingRateEXT"
|
||||
Name 93 "gl_MeshPrimitivesEXT"
|
||||
Name 135 "gl_PrimitiveTriangleIndicesEXT"
|
||||
Name 151 "id"
|
||||
Name 153 "gl_DrawIDARB"
|
||||
Name 155 "viewIdx"
|
||||
Name 156 "gl_ViewIndex"
|
||||
Decorate 13(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||
Decorate 19(gl_WorkGroupID) BuiltIn WorkgroupId
|
||||
Decorate 24(gl_NumWorkGroups) BuiltIn NumWorkgroups
|
||||
MemberDecorate 38(gl_MeshPerVertexEXT) 0 BuiltIn Position
|
||||
MemberDecorate 38(gl_MeshPerVertexEXT) 1 BuiltIn PointSize
|
||||
MemberDecorate 38(gl_MeshPerVertexEXT) 2 BuiltIn ClipDistance
|
||||
MemberDecorate 38(gl_MeshPerVertexEXT) 3 BuiltIn CullDistance
|
||||
Decorate 38(gl_MeshPerVertexEXT) Block
|
||||
MemberDecorate 90(gl_MeshPerPrimitiveEXT) 0 PerPrimitiveNV
|
||||
MemberDecorate 90(gl_MeshPerPrimitiveEXT) 0 BuiltIn PrimitiveId
|
||||
MemberDecorate 90(gl_MeshPerPrimitiveEXT) 1 PerPrimitiveNV
|
||||
MemberDecorate 90(gl_MeshPerPrimitiveEXT) 1 BuiltIn Layer
|
||||
MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 PerPrimitiveNV
|
||||
MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex
|
||||
MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV
|
||||
MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT
|
||||
MemberDecorate 90(gl_MeshPerPrimitiveEXT) 4 PerPrimitiveNV
|
||||
MemberDecorate 90(gl_MeshPerPrimitiveEXT) 4 BuiltIn PrimitiveShadingRateKHR
|
||||
Decorate 90(gl_MeshPerPrimitiveEXT) Block
|
||||
Decorate 135(gl_PrimitiveTriangleIndicesEXT) BuiltIn PrimitiveTriangleIndicesEXT
|
||||
Decorate 153(gl_DrawIDARB) BuiltIn DrawIndex
|
||||
Decorate 156(gl_ViewIndex) BuiltIn ViewIndex
|
||||
Decorate 158 BuiltIn WorkgroupSize
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
8: TypeInt 32 0
|
||||
9: TypePointer Function 8(int)
|
||||
11: TypeVector 8(int) 3
|
||||
12: TypePointer Input 11(ivec3)
|
||||
13(gl_LocalInvocationID): 12(ptr) Variable Input
|
||||
14: 8(int) Constant 0
|
||||
15: TypePointer Input 8(int)
|
||||
19(gl_WorkGroupID): 12(ptr) Variable Input
|
||||
22: TypePointer Function 11(ivec3)
|
||||
24(gl_NumWorkGroups): 12(ptr) Variable Input
|
||||
27: 8(int) Constant 81
|
||||
29: 8(int) Constant 32
|
||||
32: TypeFloat 32
|
||||
33: TypeVector 32(float) 4
|
||||
34: 8(int) Constant 4
|
||||
35: TypeArray 32(float) 34
|
||||
36: 8(int) Constant 3
|
||||
37: TypeArray 32(float) 36
|
||||
38(gl_MeshPerVertexEXT): TypeStruct 33(fvec4) 32(float) 35 37
|
||||
39: TypeArray 38(gl_MeshPerVertexEXT) 27
|
||||
40: TypePointer Output 39
|
||||
41(gl_MeshVerticesEXT): 40(ptr) Variable Output
|
||||
43: TypeInt 32 1
|
||||
44: 43(int) Constant 0
|
||||
45: 32(float) Constant 1065353216
|
||||
46: 33(fvec4) ConstantComposite 45 45 45 45
|
||||
47: TypePointer Output 33(fvec4)
|
||||
50: 43(int) Constant 1
|
||||
51: 32(float) Constant 1073741824
|
||||
52: TypePointer Output 32(float)
|
||||
55: 43(int) Constant 2
|
||||
56: 43(int) Constant 3
|
||||
57: 32(float) Constant 1077936128
|
||||
60: 32(float) Constant 1082130432
|
||||
62: 8(int) Constant 1
|
||||
63: 8(int) Constant 264
|
||||
64: 8(int) Constant 2
|
||||
89: TypeBool
|
||||
90(gl_MeshPerPrimitiveEXT): TypeStruct 43(int) 43(int) 43(int) 89(bool) 43(int)
|
||||
91: TypeArray 90(gl_MeshPerPrimitiveEXT) 29
|
||||
92: TypePointer Output 91
|
||||
93(gl_MeshPrimitivesEXT): 92(ptr) Variable Output
|
||||
95: 43(int) Constant 6
|
||||
96: TypePointer Output 43(int)
|
||||
99: 43(int) Constant 7
|
||||
102: 43(int) Constant 8
|
||||
105: 89(bool) ConstantFalse
|
||||
106: TypePointer Output 89(bool)
|
||||
132: 8(int) Constant 96
|
||||
133: TypeArray 11(ivec3) 132
|
||||
134: TypePointer Output 133
|
||||
135(gl_PrimitiveTriangleIndicesEXT): 134(ptr) Variable Output
|
||||
136: 8(int) Constant 257
|
||||
137: 11(ivec3) ConstantComposite 136 136 136
|
||||
138: TypePointer Output 11(ivec3)
|
||||
142: 11(ivec3) ConstantComposite 64 64 64
|
||||
150: TypePointer Function 43(int)
|
||||
152: TypePointer Input 43(int)
|
||||
153(gl_DrawIDARB): 152(ptr) Variable Input
|
||||
156(gl_ViewIndex): 152(ptr) Variable Input
|
||||
158: 11(ivec3) ConstantComposite 29 62 62
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
10(iid): 9(ptr) Variable Function
|
||||
18(gid): 9(ptr) Variable Function
|
||||
23(numWorkGrous): 22(ptr) Variable Function
|
||||
26(vertexCount): 9(ptr) Variable Function
|
||||
28(primitiveCount): 9(ptr) Variable Function
|
||||
16: 15(ptr) AccessChain 13(gl_LocalInvocationID) 14
|
||||
17: 8(int) Load 16
|
||||
Store 10(iid) 17
|
||||
20: 15(ptr) AccessChain 19(gl_WorkGroupID) 14
|
||||
21: 8(int) Load 20
|
||||
Store 18(gid) 21
|
||||
25: 11(ivec3) Load 24(gl_NumWorkGroups)
|
||||
Store 23(numWorkGrous) 25
|
||||
Store 26(vertexCount) 27
|
||||
Store 28(primitiveCount) 29
|
||||
30: 8(int) Load 26(vertexCount)
|
||||
31: 8(int) Load 28(primitiveCount)
|
||||
SetMeshOutputsEXT 30 31
|
||||
42: 8(int) Load 10(iid)
|
||||
48: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 42 44
|
||||
Store 48 46
|
||||
49: 8(int) Load 10(iid)
|
||||
53: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 49 50
|
||||
Store 53 51
|
||||
54: 8(int) Load 10(iid)
|
||||
58: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 54 55 56
|
||||
Store 58 57
|
||||
59: 8(int) Load 10(iid)
|
||||
61: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 59 56 55
|
||||
Store 61 60
|
||||
MemoryBarrier 62 63
|
||||
ControlBarrier 64 64 63
|
||||
65: 8(int) Load 10(iid)
|
||||
66: 8(int) IAdd 65 62
|
||||
67: 8(int) Load 10(iid)
|
||||
68: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 67 44
|
||||
69: 33(fvec4) Load 68
|
||||
70: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 66 44
|
||||
Store 70 69
|
||||
71: 8(int) Load 10(iid)
|
||||
72: 8(int) IAdd 71 62
|
||||
73: 8(int) Load 10(iid)
|
||||
74: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 73 50
|
||||
75: 32(float) Load 74
|
||||
76: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 72 50
|
||||
Store 76 75
|
||||
77: 8(int) Load 10(iid)
|
||||
78: 8(int) IAdd 77 62
|
||||
79: 8(int) Load 10(iid)
|
||||
80: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 79 55 56
|
||||
81: 32(float) Load 80
|
||||
82: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 78 55 56
|
||||
Store 82 81
|
||||
83: 8(int) Load 10(iid)
|
||||
84: 8(int) IAdd 83 62
|
||||
85: 8(int) Load 10(iid)
|
||||
86: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 85 56 55
|
||||
87: 32(float) Load 86
|
||||
88: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 84 56 55
|
||||
Store 88 87
|
||||
MemoryBarrier 62 63
|
||||
ControlBarrier 64 64 63
|
||||
94: 8(int) Load 10(iid)
|
||||
97: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 94 44
|
||||
Store 97 95
|
||||
98: 8(int) Load 10(iid)
|
||||
100: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 98 50
|
||||
Store 100 99
|
||||
101: 8(int) Load 10(iid)
|
||||
103: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 101 55
|
||||
Store 103 102
|
||||
104: 8(int) Load 10(iid)
|
||||
107: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 104 56
|
||||
Store 107 105
|
||||
MemoryBarrier 62 63
|
||||
ControlBarrier 64 64 63
|
||||
108: 8(int) Load 10(iid)
|
||||
109: 8(int) IAdd 108 62
|
||||
110: 8(int) Load 10(iid)
|
||||
111: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 110 44
|
||||
112: 43(int) Load 111
|
||||
113: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 109 44
|
||||
Store 113 112
|
||||
114: 8(int) Load 10(iid)
|
||||
115: 8(int) IAdd 114 62
|
||||
116: 8(int) Load 10(iid)
|
||||
117: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 116 50
|
||||
118: 43(int) Load 117
|
||||
119: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 115 50
|
||||
Store 119 118
|
||||
120: 8(int) Load 10(iid)
|
||||
121: 8(int) IAdd 120 62
|
||||
122: 8(int) Load 10(iid)
|
||||
123: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 122 55
|
||||
124: 43(int) Load 123
|
||||
125: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 121 55
|
||||
Store 125 124
|
||||
126: 8(int) Load 10(iid)
|
||||
127: 8(int) IAdd 126 62
|
||||
128: 8(int) Load 10(iid)
|
||||
129: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 128 56
|
||||
130: 89(bool) Load 129
|
||||
131: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 127 56
|
||||
Store 131 130
|
||||
MemoryBarrier 62 63
|
||||
ControlBarrier 64 64 63
|
||||
139: 138(ptr) AccessChain 135(gl_PrimitiveTriangleIndicesEXT) 44
|
||||
Store 139 137
|
||||
140: 8(int) Load 28(primitiveCount)
|
||||
141: 8(int) ISub 140 62
|
||||
143: 138(ptr) AccessChain 135(gl_PrimitiveTriangleIndicesEXT) 141
|
||||
Store 143 142
|
||||
144: 8(int) Load 18(gid)
|
||||
145: 8(int) Load 18(gid)
|
||||
146: 8(int) ISub 145 62
|
||||
147: 138(ptr) AccessChain 135(gl_PrimitiveTriangleIndicesEXT) 146
|
||||
148: 11(ivec3) Load 147
|
||||
149: 138(ptr) AccessChain 135(gl_PrimitiveTriangleIndicesEXT) 144
|
||||
Store 149 148
|
||||
MemoryBarrier 62 63
|
||||
ControlBarrier 64 64 63
|
||||
Return
|
||||
FunctionEnd
|
||||
6(testAdditionalBuiltins(): 2 Function None 3
|
||||
7: Label
|
||||
151(id): 150(ptr) Variable Function
|
||||
155(viewIdx): 150(ptr) Variable Function
|
||||
154: 43(int) Load 153(gl_DrawIDARB)
|
||||
Store 151(id) 154
|
||||
157: 43(int) Load 156(gl_ViewIndex)
|
||||
Store 155(viewIdx) 157
|
||||
Return
|
||||
FunctionEnd
|
216
Test/baseResults/spv.ext.meshShaderRedeclBuiltins.mesh.out
Normal file
216
Test/baseResults/spv.ext.meshShaderRedeclBuiltins.mesh.out
Normal file
@ -0,0 +1,216 @@
|
||||
spv.ext.meshShaderRedeclBuiltins.mesh
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 128
|
||||
|
||||
Capability ClipDistance
|
||||
Capability CullDistance
|
||||
Capability FragmentShadingRateKHR
|
||||
Capability MeshShadingEXT
|
||||
Extension "SPV_EXT_mesh_shader"
|
||||
Extension "SPV_KHR_fragment_shading_rate"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MeshEXT 4 "main" 11 17 29 81 122
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
ExecutionMode 4 OutputVertices 81
|
||||
ExecutionMode 4 OutputPrimitivesNV 32
|
||||
ExecutionMode 4 OutputPoints
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_mesh_shader"
|
||||
Name 4 "main"
|
||||
Name 8 "iid"
|
||||
Name 11 "gl_LocalInvocationID"
|
||||
Name 16 "gid"
|
||||
Name 17 "gl_WorkGroupID"
|
||||
Name 26 "gl_MeshPerVertexEXT"
|
||||
MemberName 26(gl_MeshPerVertexEXT) 0 "gl_Position"
|
||||
MemberName 26(gl_MeshPerVertexEXT) 1 "gl_PointSize"
|
||||
MemberName 26(gl_MeshPerVertexEXT) 2 "gl_ClipDistance"
|
||||
MemberName 26(gl_MeshPerVertexEXT) 3 "gl_CullDistance"
|
||||
Name 29 "gl_MeshVerticesEXT"
|
||||
Name 78 "gl_MeshPerPrimitiveEXT"
|
||||
MemberName 78(gl_MeshPerPrimitiveEXT) 0 "gl_PrimitiveID"
|
||||
MemberName 78(gl_MeshPerPrimitiveEXT) 1 "gl_Layer"
|
||||
MemberName 78(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex"
|
||||
MemberName 78(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT"
|
||||
MemberName 78(gl_MeshPerPrimitiveEXT) 4 "gl_PrimitiveShadingRateEXT"
|
||||
Name 81 "gl_MeshPrimitivesEXT"
|
||||
Name 122 "gl_PrimitivePointIndicesEXT"
|
||||
Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId
|
||||
Decorate 17(gl_WorkGroupID) BuiltIn WorkgroupId
|
||||
MemberDecorate 26(gl_MeshPerVertexEXT) 0 BuiltIn Position
|
||||
MemberDecorate 26(gl_MeshPerVertexEXT) 1 BuiltIn PointSize
|
||||
MemberDecorate 26(gl_MeshPerVertexEXT) 2 BuiltIn ClipDistance
|
||||
MemberDecorate 26(gl_MeshPerVertexEXT) 3 BuiltIn CullDistance
|
||||
Decorate 26(gl_MeshPerVertexEXT) Block
|
||||
MemberDecorate 78(gl_MeshPerPrimitiveEXT) 0 PerPrimitiveNV
|
||||
MemberDecorate 78(gl_MeshPerPrimitiveEXT) 0 BuiltIn PrimitiveId
|
||||
MemberDecorate 78(gl_MeshPerPrimitiveEXT) 1 PerPrimitiveNV
|
||||
MemberDecorate 78(gl_MeshPerPrimitiveEXT) 1 BuiltIn Layer
|
||||
MemberDecorate 78(gl_MeshPerPrimitiveEXT) 2 PerPrimitiveNV
|
||||
MemberDecorate 78(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex
|
||||
MemberDecorate 78(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV
|
||||
MemberDecorate 78(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT
|
||||
MemberDecorate 78(gl_MeshPerPrimitiveEXT) 4 PerPrimitiveNV
|
||||
MemberDecorate 78(gl_MeshPerPrimitiveEXT) 4 BuiltIn PrimitiveShadingRateKHR
|
||||
Decorate 78(gl_MeshPerPrimitiveEXT) Block
|
||||
Decorate 122(gl_PrimitivePointIndicesEXT) BuiltIn PrimitivePointIndicesEXT
|
||||
Decorate 127 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: 6(int) Constant 81
|
||||
21: 6(int) Constant 32
|
||||
22: TypeFloat 32
|
||||
23: TypeVector 22(float) 4
|
||||
24: 6(int) Constant 4
|
||||
25: TypeArray 22(float) 24
|
||||
26(gl_MeshPerVertexEXT): TypeStruct 23(fvec4) 22(float) 25 25
|
||||
27: TypeArray 26(gl_MeshPerVertexEXT) 20
|
||||
28: TypePointer Output 27
|
||||
29(gl_MeshVerticesEXT): 28(ptr) Variable Output
|
||||
31: TypeInt 32 1
|
||||
32: 31(int) Constant 0
|
||||
33: 22(float) Constant 1065353216
|
||||
34: 23(fvec4) ConstantComposite 33 33 33 33
|
||||
35: TypePointer Output 23(fvec4)
|
||||
38: 31(int) Constant 1
|
||||
39: 22(float) Constant 1073741824
|
||||
40: TypePointer Output 22(float)
|
||||
43: 31(int) Constant 2
|
||||
44: 31(int) Constant 3
|
||||
45: 22(float) Constant 1077936128
|
||||
48: 22(float) Constant 1082130432
|
||||
50: 6(int) Constant 1
|
||||
51: 6(int) Constant 264
|
||||
52: 6(int) Constant 2
|
||||
77: TypeBool
|
||||
78(gl_MeshPerPrimitiveEXT): TypeStruct 31(int) 31(int) 31(int) 77(bool) 31(int)
|
||||
79: TypeArray 78(gl_MeshPerPrimitiveEXT) 21
|
||||
80: TypePointer Output 79
|
||||
81(gl_MeshPrimitivesEXT): 80(ptr) Variable Output
|
||||
83: 31(int) Constant 6
|
||||
84: TypePointer Output 31(int)
|
||||
87: 31(int) Constant 7
|
||||
90: 31(int) Constant 8
|
||||
93: 77(bool) ConstantFalse
|
||||
94: TypePointer Output 77(bool)
|
||||
120: TypeArray 6(int) 21
|
||||
121: TypePointer Output 120
|
||||
122(gl_PrimitivePointIndicesEXT): 121(ptr) Variable Output
|
||||
123: TypePointer Output 6(int)
|
||||
125: 31(int) Constant 31
|
||||
127: 9(ivec3) ConstantComposite 21 50 50
|
||||
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
|
||||
SetMeshOutputsEXT 20 21
|
||||
30: 6(int) Load 8(iid)
|
||||
36: 35(ptr) AccessChain 29(gl_MeshVerticesEXT) 30 32
|
||||
Store 36 34
|
||||
37: 6(int) Load 8(iid)
|
||||
41: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 37 38
|
||||
Store 41 39
|
||||
42: 6(int) Load 8(iid)
|
||||
46: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 42 43 44
|
||||
Store 46 45
|
||||
47: 6(int) Load 8(iid)
|
||||
49: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 47 44 43
|
||||
Store 49 48
|
||||
MemoryBarrier 50 51
|
||||
ControlBarrier 52 52 51
|
||||
53: 6(int) Load 8(iid)
|
||||
54: 6(int) IAdd 53 50
|
||||
55: 6(int) Load 8(iid)
|
||||
56: 35(ptr) AccessChain 29(gl_MeshVerticesEXT) 55 32
|
||||
57: 23(fvec4) Load 56
|
||||
58: 35(ptr) AccessChain 29(gl_MeshVerticesEXT) 54 32
|
||||
Store 58 57
|
||||
59: 6(int) Load 8(iid)
|
||||
60: 6(int) IAdd 59 50
|
||||
61: 6(int) Load 8(iid)
|
||||
62: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 61 38
|
||||
63: 22(float) Load 62
|
||||
64: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 60 38
|
||||
Store 64 63
|
||||
65: 6(int) Load 8(iid)
|
||||
66: 6(int) IAdd 65 50
|
||||
67: 6(int) Load 8(iid)
|
||||
68: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 67 43 44
|
||||
69: 22(float) Load 68
|
||||
70: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 66 43 44
|
||||
Store 70 69
|
||||
71: 6(int) Load 8(iid)
|
||||
72: 6(int) IAdd 71 50
|
||||
73: 6(int) Load 8(iid)
|
||||
74: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 73 44 43
|
||||
75: 22(float) Load 74
|
||||
76: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 72 44 43
|
||||
Store 76 75
|
||||
MemoryBarrier 50 51
|
||||
ControlBarrier 52 52 51
|
||||
82: 6(int) Load 8(iid)
|
||||
85: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 82 32
|
||||
Store 85 83
|
||||
86: 6(int) Load 8(iid)
|
||||
88: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 86 38
|
||||
Store 88 87
|
||||
89: 6(int) Load 8(iid)
|
||||
91: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 89 43
|
||||
Store 91 90
|
||||
92: 6(int) Load 8(iid)
|
||||
95: 94(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 92 44
|
||||
Store 95 93
|
||||
MemoryBarrier 50 51
|
||||
ControlBarrier 52 52 51
|
||||
96: 6(int) Load 8(iid)
|
||||
97: 6(int) IAdd 96 50
|
||||
98: 6(int) Load 8(iid)
|
||||
99: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 98 32
|
||||
100: 31(int) Load 99
|
||||
101: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 97 32
|
||||
Store 101 100
|
||||
102: 6(int) Load 8(iid)
|
||||
103: 6(int) IAdd 102 50
|
||||
104: 6(int) Load 8(iid)
|
||||
105: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 104 38
|
||||
106: 31(int) Load 105
|
||||
107: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 103 38
|
||||
Store 107 106
|
||||
108: 6(int) Load 8(iid)
|
||||
109: 6(int) IAdd 108 50
|
||||
110: 6(int) Load 8(iid)
|
||||
111: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 110 43
|
||||
112: 31(int) Load 111
|
||||
113: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 109 43
|
||||
Store 113 112
|
||||
114: 6(int) Load 8(iid)
|
||||
115: 6(int) IAdd 114 50
|
||||
116: 6(int) Load 8(iid)
|
||||
117: 94(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 116 44
|
||||
118: 77(bool) Load 117
|
||||
119: 94(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 115 44
|
||||
Store 119 118
|
||||
MemoryBarrier 50 51
|
||||
ControlBarrier 52 52 51
|
||||
124: 123(ptr) AccessChain 122(gl_PrimitivePointIndicesEXT) 32
|
||||
Store 124 50
|
||||
126: 123(ptr) AccessChain 122(gl_PrimitivePointIndicesEXT) 125
|
||||
Store 126 52
|
||||
Return
|
||||
FunctionEnd
|
102
Test/baseResults/spv.ext.meshShaderTaskMem.mesh.out
Normal file
102
Test/baseResults/spv.ext.meshShaderTaskMem.mesh.out
Normal file
@ -0,0 +1,102 @@
|
||||
spv.ext.meshShaderTaskMem.mesh
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 58
|
||||
|
||||
Capability MeshShadingEXT
|
||||
Extension "SPV_EXT_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MeshEXT 4 "main" 11 22 30 38
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
ExecutionMode 4 OutputVertices 81
|
||||
ExecutionMode 4 OutputPrimitivesNV 32
|
||||
ExecutionMode 4 OutputTrianglesNV
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_EXT_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 35 ArrayStride 4
|
||||
MemberDecorate 36(bufferBlock) 0 Offset 0
|
||||
MemberDecorate 36(bufferBlock) 1 Offset 16
|
||||
Decorate 36(bufferBlock) Block
|
||||
Decorate 38(mybuf) DescriptorSet 0
|
||||
Decorate 38(mybuf) Binding 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 TaskPayloadWorkgroupEXT 28(taskBlock)
|
||||
30(mytask): 29(ptr) Variable TaskPayloadWorkgroupEXT
|
||||
31: 24(int) Constant 1
|
||||
32: TypePointer TaskPayloadWorkgroupEXT 16(float)
|
||||
35: TypeArray 16(float) 26
|
||||
36(bufferBlock): TypeStruct 35 17(fvec4)
|
||||
37: TypePointer StorageBuffer 36(bufferBlock)
|
||||
38(mybuf): 37(ptr) Variable StorageBuffer
|
||||
39: TypePointer StorageBuffer 16(float)
|
||||
43: TypePointer Output 16(float)
|
||||
46: TypePointer TaskPayloadWorkgroupEXT 17(fvec4)
|
||||
49: TypePointer StorageBuffer 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
|
208
Test/baseResults/spv.ext.meshShaderUserDefined.mesh.out
Normal file
208
Test/baseResults/spv.ext.meshShaderUserDefined.mesh.out
Normal file
@ -0,0 +1,208 @@
|
||||
spv.ext.meshShaderUserDefined.mesh
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 141
|
||||
|
||||
Capability MeshShadingEXT
|
||||
Extension "SPV_EXT_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MeshEXT 4 "main" 11 17 34 104
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
ExecutionMode 4 OutputVertices 81
|
||||
ExecutionMode 4 OutputPrimitivesNV 32
|
||||
ExecutionMode 4 OutputTrianglesNV
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_EXT_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 100 "myblock2"
|
||||
MemberName 100(myblock2) 0 "f"
|
||||
MemberName 100(myblock2) 1 "pos"
|
||||
MemberName 100(myblock2) 2 "m"
|
||||
Name 104 "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 100(myblock2) Block
|
||||
Decorate 104(blk2) Location 20
|
||||
Decorate 140 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
|
||||
72: 6(int) Constant 3
|
||||
77: 36(int) Constant 4
|
||||
78: 20(float) Constant 1098907648
|
||||
79: 24(fvec4) ConstantComposite 55 53 54 78
|
||||
80: TypePointer Output 24(fvec4)
|
||||
85: 36(int) Constant 5
|
||||
94: 20(float) Constant 1099431936
|
||||
95: 20(float) Constant 1099956224
|
||||
96: 20(float) Constant 1100480512
|
||||
97: 23(fvec3) ConstantComposite 94 95 96
|
||||
99: 6(int) Constant 264
|
||||
100(myblock2): TypeStruct 20(float) 24(fvec4) 26
|
||||
101: 6(int) Constant 81
|
||||
102: TypeArray 100(myblock2) 101
|
||||
103: TypePointer Output 102
|
||||
104(blk2): 103(ptr) Variable Output
|
||||
110: 20(float) Constant 1101004800
|
||||
114: 20(float) Constant 1101529088
|
||||
115: 20(float) Constant 1102053376
|
||||
116: 20(float) Constant 1102577664
|
||||
117: 20(float) Constant 1103101952
|
||||
118: 24(fvec4) ConstantComposite 114 115 116 117
|
||||
130: 20(float) Constant 1105723392
|
||||
140: 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
|
||||
68: 39(ptr) AccessChain 34(blk) 62 63 44 42
|
||||
69: 20(float) CompositeExtract 67 0
|
||||
Store 68 69
|
||||
70: 39(ptr) AccessChain 34(blk) 62 63 44 28
|
||||
71: 20(float) CompositeExtract 67 1
|
||||
Store 70 71
|
||||
73: 39(ptr) AccessChain 34(blk) 62 63 44 72
|
||||
74: 20(float) CompositeExtract 67 2
|
||||
Store 73 74
|
||||
75: 6(int) Load 8(iid)
|
||||
76: 6(int) UDiv 75 21
|
||||
81: 80(ptr) AccessChain 34(blk) 76 77 52
|
||||
82: 24(fvec4) Load 81
|
||||
83: 24(fvec4) VectorShuffle 82 79 7 6 5 4
|
||||
Store 81 83
|
||||
84: 6(int) Load 8(iid)
|
||||
86: 6(int) Load 8(iid)
|
||||
87: 6(int) UDiv 86 21
|
||||
88: 39(ptr) AccessChain 34(blk) 87 77 52 72
|
||||
89: 20(float) Load 88
|
||||
90: 39(ptr) AccessChain 34(blk) 84 85 37 44 42
|
||||
Store 90 89
|
||||
91: 6(int) Load 8(iid)
|
||||
92: 6(int) IMul 91 21
|
||||
93: 6(int) Load 16(gid)
|
||||
98: 57(ptr) AccessChain 34(blk) 92 85 44 93
|
||||
Store 98 97
|
||||
MemoryBarrier 42 99
|
||||
ControlBarrier 28 28 99
|
||||
105: 6(int) Load 8(iid)
|
||||
106: 6(int) Load 8(iid)
|
||||
107: 6(int) ISub 106 42
|
||||
108: 39(ptr) AccessChain 104(blk2) 107 37
|
||||
109: 20(float) Load 108
|
||||
111: 20(float) FAdd 109 110
|
||||
112: 39(ptr) AccessChain 104(blk2) 105 37
|
||||
Store 112 111
|
||||
113: 6(int) Load 8(iid)
|
||||
119: 80(ptr) AccessChain 104(blk2) 113 44
|
||||
Store 119 118
|
||||
120: 6(int) Load 8(iid)
|
||||
121: 6(int) IAdd 120 42
|
||||
122: 6(int) Load 16(gid)
|
||||
123: 6(int) Load 8(iid)
|
||||
124: 80(ptr) AccessChain 104(blk2) 123 44
|
||||
125: 24(fvec4) Load 124
|
||||
126: 80(ptr) AccessChain 104(blk2) 121 52 122
|
||||
Store 126 125
|
||||
127: 6(int) Load 8(iid)
|
||||
128: 6(int) IAdd 127 42
|
||||
129: 6(int) Load 16(gid)
|
||||
131: 39(ptr) AccessChain 104(blk2) 128 52 129 28
|
||||
Store 131 130
|
||||
132: 6(int) Load 8(iid)
|
||||
133: 6(int) IAdd 132 28
|
||||
134: 6(int) Load 8(iid)
|
||||
135: 6(int) IAdd 134 42
|
||||
136: 6(int) Load 16(gid)
|
||||
137: 80(ptr) AccessChain 104(blk2) 135 52 136
|
||||
138: 24(fvec4) Load 137
|
||||
139: 80(ptr) AccessChain 104(blk2) 133 52 63
|
||||
Store 139 138
|
||||
MemoryBarrier 42 99
|
||||
ControlBarrier 28 28 99
|
||||
Return
|
||||
FunctionEnd
|
163
Test/baseResults/spv.ext.meshTaskShader.task.out
Normal file
163
Test/baseResults/spv.ext.meshTaskShader.task.out
Normal file
@ -0,0 +1,163 @@
|
||||
spv.ext.meshTaskShader.task
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 102
|
||||
|
||||
Capability StorageImageWriteWithoutFormat
|
||||
Capability MeshShadingEXT
|
||||
Extension "SPV_EXT_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint TaskEXT 4 "main" 11 17 34 39 55 80
|
||||
ExecutionMode 4 LocalSize 32 1 1
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_EXT_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"
|
||||
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 39 Binding 1
|
||||
Decorate 55(uni_image) DescriptorSet 0
|
||||
Decorate 55(uni_image) Binding 0
|
||||
Decorate 55(uni_image) NonReadable
|
||||
Decorate 101 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 TaskPayloadWorkgroupEXT 78(Task)
|
||||
80(mytask): 79(ptr) Variable TaskPayloadWorkgroupEXT
|
||||
81: 30(float) Constant 1106247680
|
||||
82: 30(float) Constant 1106771968
|
||||
83: 75(fvec2) ConstantComposite 81 82
|
||||
84: TypePointer TaskPayloadWorkgroupEXT 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: 6(int) Constant 32
|
||||
101: 9(ivec3) ConstantComposite 100 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
|
||||
EmitMeshTasksEXT 76 69 69 80(mytask)
|
||||
Return
|
||||
FunctionEnd
|
@ -90,6 +90,15 @@ MaxTaskWorkGroupSizeX_NV 32
|
||||
MaxTaskWorkGroupSizeY_NV 1
|
||||
MaxTaskWorkGroupSizeZ_NV 1
|
||||
MaxMeshViewCountNV 4
|
||||
MaxMeshOutputVerticesEXT 256
|
||||
MaxMeshOutputPrimitivesEXT 256
|
||||
MaxMeshWorkGroupSizeX_EXT 128
|
||||
MaxMeshWorkGroupSizeY_EXT 128
|
||||
MaxMeshWorkGroupSizeZ_EXT 128
|
||||
MaxTaskWorkGroupSizeX_EXT 128
|
||||
MaxTaskWorkGroupSizeY_EXT 128
|
||||
MaxTaskWorkGroupSizeZ_EXT 128
|
||||
MaxMeshViewCountEXT 4
|
||||
MaxDualSourceDrawBuffersEXT 1
|
||||
nonInductiveForLoops 1
|
||||
whileLoops 1
|
||||
|
164
Test/spv.460.subgroupEXT.mesh
Normal file
164
Test/spv.460.subgroupEXT.mesh
Normal file
@ -0,0 +1,164 @@
|
||||
#version 460
|
||||
|
||||
#define MAX_VER 81
|
||||
#define MAX_PRIM 32
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_EXT_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 32, local_size_y=1, local_size_z=1) 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;
|
||||
uint vertexCount = MAX_VER; // vertexCount <= max_vertices
|
||||
uint primitiveCount = MAX_PRIM; // primitiveCount <= max_primtives
|
||||
SetMeshOutputsEXT(vertexCount, primitiveCount);
|
||||
|
||||
gl_MeshVerticesEXT[iid].gl_Position = vec4(1.0);
|
||||
gl_MeshVerticesEXT[iid].gl_PointSize = 2.0;
|
||||
gl_MeshVerticesEXT[iid].gl_ClipDistance[3] = 3.0;
|
||||
gl_MeshVerticesEXT[iid].gl_CullDistance[2] = 4.0;
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshVerticesEXT[iid+1].gl_Position = gl_MeshVerticesEXT[iid].gl_Position;
|
||||
gl_MeshVerticesEXT[iid+1].gl_PointSize = gl_MeshVerticesEXT[iid].gl_PointSize;
|
||||
gl_MeshVerticesEXT[iid+1].gl_ClipDistance[3] = gl_MeshVerticesEXT[iid].gl_ClipDistance[3];
|
||||
gl_MeshVerticesEXT[iid+1].gl_CullDistance[2] = gl_MeshVerticesEXT[iid].gl_CullDistance[2];
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshPrimitivesEXT[iid].gl_PrimitiveID = 6;
|
||||
gl_MeshPrimitivesEXT[iid].gl_Layer = 7;
|
||||
gl_MeshPrimitivesEXT[iid].gl_ViewportIndex = 8;
|
||||
gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT = false;
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshPrimitivesEXT[iid+1].gl_PrimitiveID = gl_MeshPrimitivesEXT[iid].gl_PrimitiveID;
|
||||
gl_MeshPrimitivesEXT[iid+1].gl_Layer = gl_MeshPrimitivesEXT[iid].gl_Layer;
|
||||
gl_MeshPrimitivesEXT[iid+1].gl_ViewportIndex = gl_MeshPrimitivesEXT[iid].gl_ViewportIndex;
|
||||
gl_MeshPrimitivesEXT[iid+1].gl_CullPrimitiveEXT = false;
|
||||
|
||||
BARRIER();
|
||||
|
||||
// check bound limits
|
||||
gl_PrimitiveTriangleIndicesEXT[0] = uvec3(1, 1, 1); // range is between [0, vertexCount-1]
|
||||
gl_PrimitiveTriangleIndicesEXT[primitiveCount - 1] = uvec3(2, 2, 2); // array size is primitiveCount*3 for triangle
|
||||
gl_PrimitiveTriangleIndicesEXT[gid] = gl_PrimitiveTriangleIndicesEXT[gid-1];
|
||||
|
||||
|
||||
BARRIER();
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_basic: enable
|
||||
void basic_works (void)
|
||||
{
|
||||
gl_SubgroupSize;
|
||||
gl_SubgroupInvocationID;
|
||||
subgroupBarrier();
|
||||
subgroupMemoryBarrier();
|
||||
subgroupMemoryBarrierBuffer();
|
||||
subgroupMemoryBarrierImage();
|
||||
subgroupElect();
|
||||
gl_NumSubgroups; // allowed in mesh
|
||||
gl_SubgroupID; // allowed in mesh
|
||||
subgroupMemoryBarrierShared(); // allowed in mesh
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_ballot: enable
|
||||
void ballot_works(vec4 f4) {
|
||||
gl_SubgroupEqMask;
|
||||
gl_SubgroupGeMask;
|
||||
gl_SubgroupGtMask;
|
||||
gl_SubgroupLeMask;
|
||||
gl_SubgroupLtMask;
|
||||
subgroupBroadcast(f4, 0);
|
||||
subgroupBroadcastFirst(f4);
|
||||
uvec4 ballot = subgroupBallot(false);
|
||||
subgroupInverseBallot(uvec4(0x1));
|
||||
subgroupBallotBitExtract(ballot, 0);
|
||||
subgroupBallotBitCount(ballot);
|
||||
subgroupBallotInclusiveBitCount(ballot);
|
||||
subgroupBallotExclusiveBitCount(ballot);
|
||||
subgroupBallotFindLSB(ballot);
|
||||
subgroupBallotFindMSB(ballot);
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_vote: enable
|
||||
void vote_works(vec4 f4)
|
||||
{
|
||||
subgroupAll(true);
|
||||
subgroupAny(false);
|
||||
subgroupAllEqual(f4);
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_shuffle: enable
|
||||
#extension GL_KHR_shader_subgroup_shuffle_relative: enable
|
||||
void shuffle_works(vec4 f4)
|
||||
{
|
||||
subgroupShuffle(f4, 0);
|
||||
subgroupShuffleXor(f4, 0x1);
|
||||
subgroupShuffleUp(f4, 1);
|
||||
subgroupShuffleDown(f4, 1);
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_arithmetic: enable
|
||||
void arith_works(vec4 f4)
|
||||
{
|
||||
uvec4 ballot;
|
||||
subgroupAdd(f4);
|
||||
subgroupMul(f4);
|
||||
subgroupMin(f4);
|
||||
subgroupMax(f4);
|
||||
subgroupAnd(ballot);
|
||||
subgroupOr(ballot);
|
||||
subgroupXor(ballot);
|
||||
subgroupInclusiveAdd(f4);
|
||||
subgroupInclusiveMul(f4);
|
||||
subgroupInclusiveMin(f4);
|
||||
subgroupInclusiveMax(f4);
|
||||
subgroupInclusiveAnd(ballot);
|
||||
subgroupInclusiveOr(ballot);
|
||||
subgroupInclusiveXor(ballot);
|
||||
subgroupExclusiveAdd(f4);
|
||||
subgroupExclusiveMul(f4);
|
||||
subgroupExclusiveMin(f4);
|
||||
subgroupExclusiveMax(f4);
|
||||
subgroupExclusiveAnd(ballot);
|
||||
subgroupExclusiveOr(ballot);
|
||||
subgroupExclusiveXor(ballot);
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_clustered: enable
|
||||
void clustered_works(vec4 f4)
|
||||
{
|
||||
uvec4 ballot = uvec4(0x55,0,0,0);
|
||||
subgroupClusteredAdd(f4, 2);
|
||||
subgroupClusteredMul(f4, 2);
|
||||
subgroupClusteredMin(f4, 2);
|
||||
subgroupClusteredMax(f4, 2);
|
||||
subgroupClusteredAnd(ballot, 2);
|
||||
subgroupClusteredOr(ballot, 2);
|
||||
subgroupClusteredXor(ballot, 2);
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_quad: enable
|
||||
void quad_works(vec4 f4)
|
||||
{
|
||||
subgroupQuadBroadcast(f4, 0);
|
||||
subgroupQuadSwapHorizontal(f4);
|
||||
subgroupQuadSwapVertical(f4);
|
||||
subgroupQuadSwapDiagonal(f4);
|
||||
}
|
153
Test/spv.460.subgroupEXT.task
Normal file
153
Test/spv.460.subgroupEXT.task
Normal file
@ -0,0 +1,153 @@
|
||||
#version 460
|
||||
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_EXT_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 32, local_size_y=1, local_size_z=1) 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:
|
||||
struct Task {
|
||||
vec2 dummy;
|
||||
vec2 submesh[3];
|
||||
};
|
||||
|
||||
taskPayloadSharedEXT Task 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. emit task count under uniform control flow
|
||||
EmitMeshTasksEXT(3U, 1U, 1U);
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_basic: enable
|
||||
void basic_works (void)
|
||||
{
|
||||
gl_SubgroupSize;
|
||||
gl_SubgroupInvocationID;
|
||||
subgroupBarrier();
|
||||
subgroupMemoryBarrier();
|
||||
subgroupMemoryBarrierBuffer();
|
||||
subgroupMemoryBarrierImage();
|
||||
subgroupElect();
|
||||
gl_NumSubgroups; // allowed in task
|
||||
gl_SubgroupID; // allowed in task
|
||||
subgroupMemoryBarrierShared(); // allowed in task
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_ballot: enable
|
||||
void ballot_works(vec4 f4) {
|
||||
gl_SubgroupEqMask;
|
||||
gl_SubgroupGeMask;
|
||||
gl_SubgroupGtMask;
|
||||
gl_SubgroupLeMask;
|
||||
gl_SubgroupLtMask;
|
||||
subgroupBroadcast(f4, 0);
|
||||
subgroupBroadcastFirst(f4);
|
||||
uvec4 ballot = subgroupBallot(false);
|
||||
subgroupInverseBallot(uvec4(0x1));
|
||||
subgroupBallotBitExtract(ballot, 0);
|
||||
subgroupBallotBitCount(ballot);
|
||||
subgroupBallotInclusiveBitCount(ballot);
|
||||
subgroupBallotExclusiveBitCount(ballot);
|
||||
subgroupBallotFindLSB(ballot);
|
||||
subgroupBallotFindMSB(ballot);
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_vote: enable
|
||||
void vote_works(vec4 f4)
|
||||
{
|
||||
subgroupAll(true);
|
||||
subgroupAny(false);
|
||||
subgroupAllEqual(f4);
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_shuffle: enable
|
||||
#extension GL_KHR_shader_subgroup_shuffle_relative: enable
|
||||
void shuffle_works(vec4 f4)
|
||||
{
|
||||
subgroupShuffle(f4, 0);
|
||||
subgroupShuffleXor(f4, 0x1);
|
||||
subgroupShuffleUp(f4, 1);
|
||||
subgroupShuffleDown(f4, 1);
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_arithmetic: enable
|
||||
void arith_works(vec4 f4)
|
||||
{
|
||||
uvec4 ballot;
|
||||
subgroupAdd(f4);
|
||||
subgroupMul(f4);
|
||||
subgroupMin(f4);
|
||||
subgroupMax(f4);
|
||||
subgroupAnd(ballot);
|
||||
subgroupOr(ballot);
|
||||
subgroupXor(ballot);
|
||||
subgroupInclusiveAdd(f4);
|
||||
subgroupInclusiveMul(f4);
|
||||
subgroupInclusiveMin(f4);
|
||||
subgroupInclusiveMax(f4);
|
||||
subgroupInclusiveAnd(ballot);
|
||||
subgroupInclusiveOr(ballot);
|
||||
subgroupInclusiveXor(ballot);
|
||||
subgroupExclusiveAdd(f4);
|
||||
subgroupExclusiveMul(f4);
|
||||
subgroupExclusiveMin(f4);
|
||||
subgroupExclusiveMax(f4);
|
||||
subgroupExclusiveAnd(ballot);
|
||||
subgroupExclusiveOr(ballot);
|
||||
subgroupExclusiveXor(ballot);
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_clustered: enable
|
||||
void clustered_works(vec4 f4)
|
||||
{
|
||||
uvec4 ballot = uvec4(0x55,0,0,0);
|
||||
subgroupClusteredAdd(f4, 2);
|
||||
subgroupClusteredMul(f4, 2);
|
||||
subgroupClusteredMin(f4, 2);
|
||||
subgroupClusteredMax(f4, 2);
|
||||
subgroupClusteredAnd(ballot, 2);
|
||||
subgroupClusteredOr(ballot, 2);
|
||||
subgroupClusteredXor(ballot, 2);
|
||||
}
|
||||
|
||||
#extension GL_KHR_shader_subgroup_quad: enable
|
||||
void quad_works(vec4 f4)
|
||||
{
|
||||
subgroupQuadBroadcast(f4, 0);
|
||||
subgroupQuadSwapHorizontal(f4);
|
||||
subgroupQuadSwapVertical(f4);
|
||||
subgroupQuadSwapDiagonal(f4);
|
||||
}
|
||||
|
22
Test/spv.atomiAddEXT.error.mesh
Normal file
22
Test/spv.atomiAddEXT.error.mesh
Normal file
@ -0,0 +1,22 @@
|
||||
#version 460
|
||||
#extension GL_EXT_mesh_shader : enable
|
||||
|
||||
#define MAX_VER 81
|
||||
#define MAX_PRIM 32
|
||||
|
||||
layout(local_size_x = 1) in;
|
||||
|
||||
layout(max_vertices=MAX_VER) out;
|
||||
layout(max_primitives=MAX_PRIM) out;
|
||||
layout(triangles) out;
|
||||
|
||||
// use of storage qualifier "taskPayloadSharedEXT" in mesh shaders:
|
||||
struct taskBlock {
|
||||
int atom1;
|
||||
};
|
||||
taskPayloadSharedEXT taskBlock mytask;
|
||||
|
||||
|
||||
void main() {
|
||||
atomicAdd(mytask.atom1, 1);
|
||||
}
|
27
Test/spv.atomiAddEXT.task
Normal file
27
Test/spv.atomiAddEXT.task
Normal file
@ -0,0 +1,27 @@
|
||||
#version 460
|
||||
#extension GL_EXT_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 1) in;
|
||||
|
||||
struct structType{
|
||||
int y[3];
|
||||
};
|
||||
|
||||
layout(std430) buffer t2 {
|
||||
structType f;
|
||||
} t;
|
||||
|
||||
buffer coherent Buffer { int x; };
|
||||
|
||||
// use of storage qualifier "taskPayloadSharedEXT" in mesh shaders:
|
||||
struct taskBlock {
|
||||
int atom1;
|
||||
};
|
||||
taskPayloadSharedEXT taskBlock mytask;
|
||||
|
||||
|
||||
void main() {
|
||||
atomicAdd(x, 1);
|
||||
atomicAdd(t.f.y[1], 1);
|
||||
atomicAdd(mytask.atom1, 1);
|
||||
}
|
74
Test/spv.ext.meshShaderBuiltins.mesh
Normal file
74
Test/spv.ext.meshShaderBuiltins.mesh
Normal file
@ -0,0 +1,74 @@
|
||||
#version 460
|
||||
|
||||
#define MAX_VER 81
|
||||
#define MAX_PRIM 32
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_EXT_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 32, local_size_y=1, local_size_z=1) 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;
|
||||
uvec3 numWorkGrous = gl_NumWorkGroups;
|
||||
uint vertexCount = MAX_VER; // vertexCount <= max_vertices
|
||||
uint primitiveCount = MAX_PRIM; // primitiveCount <= max_primtives
|
||||
SetMeshOutputsEXT(vertexCount, primitiveCount);
|
||||
|
||||
gl_MeshVerticesEXT[iid].gl_Position = vec4(1.0);
|
||||
gl_MeshVerticesEXT[iid].gl_PointSize = 2.0;
|
||||
gl_MeshVerticesEXT[iid].gl_ClipDistance[3] = 3.0;
|
||||
gl_MeshVerticesEXT[iid].gl_CullDistance[2] = 4.0;
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshVerticesEXT[iid+1].gl_Position = gl_MeshVerticesEXT[iid].gl_Position;
|
||||
gl_MeshVerticesEXT[iid+1].gl_PointSize = gl_MeshVerticesEXT[iid].gl_PointSize;
|
||||
gl_MeshVerticesEXT[iid+1].gl_ClipDistance[3] = gl_MeshVerticesEXT[iid].gl_ClipDistance[3];
|
||||
gl_MeshVerticesEXT[iid+1].gl_CullDistance[2] = gl_MeshVerticesEXT[iid].gl_CullDistance[2];
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshPrimitivesEXT[iid].gl_PrimitiveID = 6;
|
||||
gl_MeshPrimitivesEXT[iid].gl_Layer = 7;
|
||||
gl_MeshPrimitivesEXT[iid].gl_ViewportIndex = 8;
|
||||
gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT = false;
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshPrimitivesEXT[iid+1].gl_PrimitiveID = gl_MeshPrimitivesEXT[iid].gl_PrimitiveID;
|
||||
gl_MeshPrimitivesEXT[iid+1].gl_Layer = gl_MeshPrimitivesEXT[iid].gl_Layer;
|
||||
gl_MeshPrimitivesEXT[iid+1].gl_ViewportIndex = gl_MeshPrimitivesEXT[iid].gl_ViewportIndex;
|
||||
gl_MeshPrimitivesEXT[iid+1].gl_CullPrimitiveEXT = gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT;
|
||||
|
||||
BARRIER();
|
||||
|
||||
// check bound limits
|
||||
gl_PrimitiveTriangleIndicesEXT[0] = uvec3(257); // should truncate 257 -> 1, range is between [0, vertexCount-1]
|
||||
gl_PrimitiveTriangleIndicesEXT[primitiveCount - 1] = uvec3(2); // array size is primitiveCount*3 for triangle
|
||||
gl_PrimitiveTriangleIndicesEXT[gid] = gl_PrimitiveTriangleIndicesEXT[gid-1];
|
||||
|
||||
BARRIER();
|
||||
}
|
||||
|
||||
// test use of builtins enabled by other extensions
|
||||
#extension GL_ARB_shader_draw_parameters : enable
|
||||
#extension GL_EXT_multiview : enable
|
||||
|
||||
void testAdditionalBuiltins()
|
||||
{
|
||||
int id = gl_DrawIDARB; // GL_ARB_shader_draw_parameters
|
||||
int viewIdx = gl_ViewIndex; // GL_EXT_multiview
|
||||
|
||||
}
|
75
Test/spv.ext.meshShaderRedeclBuiltins.mesh
Normal file
75
Test/spv.ext.meshShaderRedeclBuiltins.mesh
Normal file
@ -0,0 +1,75 @@
|
||||
#version 460
|
||||
|
||||
#define MAX_VER 81
|
||||
#define MAX_PRIM 32
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_EXT_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 32, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(max_vertices=MAX_VER) out;
|
||||
layout(max_primitives=MAX_PRIM) out;
|
||||
layout(points) out;
|
||||
|
||||
// test use of redeclared single-view builtins in mesh shaders:
|
||||
|
||||
out gl_MeshPerVertexEXT {
|
||||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
float gl_ClipDistance[4];
|
||||
float gl_CullDistance[4];
|
||||
} gl_MeshVerticesEXT[MAX_VER]; // explicitly sized to MAX_VER
|
||||
|
||||
perprimitiveEXT out gl_MeshPerPrimitiveEXT {
|
||||
int gl_PrimitiveID;
|
||||
int gl_Layer;
|
||||
int gl_ViewportIndex;
|
||||
bool gl_CullPrimitiveEXT;
|
||||
int gl_PrimitiveShadingRateEXT;
|
||||
} gl_MeshPrimitivesEXT[]; // implicitly sized to MAX_PRIM
|
||||
|
||||
out uint gl_PrimitivePointIndicesEXT[MAX_PRIM]; // explicitly sized to MAX_PRIM
|
||||
|
||||
void main()
|
||||
{
|
||||
uint iid = gl_LocalInvocationID.x;
|
||||
uint gid = gl_WorkGroupID.x;
|
||||
|
||||
SetMeshOutputsEXT(MAX_VER, MAX_PRIM);
|
||||
|
||||
gl_MeshVerticesEXT[iid].gl_Position = vec4(1.0);
|
||||
gl_MeshVerticesEXT[iid].gl_PointSize = 2.0;
|
||||
gl_MeshVerticesEXT[iid].gl_ClipDistance[3] = 3.0;
|
||||
gl_MeshVerticesEXT[iid].gl_CullDistance[2] = 4.0;
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshVerticesEXT[iid+1].gl_Position = gl_MeshVerticesEXT[iid].gl_Position;
|
||||
gl_MeshVerticesEXT[iid+1].gl_PointSize = gl_MeshVerticesEXT[iid].gl_PointSize;
|
||||
gl_MeshVerticesEXT[iid+1].gl_ClipDistance[3] = gl_MeshVerticesEXT[iid].gl_ClipDistance[3];
|
||||
gl_MeshVerticesEXT[iid+1].gl_CullDistance[2] = gl_MeshVerticesEXT[iid].gl_CullDistance[2];
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshPrimitivesEXT[iid].gl_PrimitiveID = 6;
|
||||
gl_MeshPrimitivesEXT[iid].gl_Layer = 7;
|
||||
gl_MeshPrimitivesEXT[iid].gl_ViewportIndex = 8;
|
||||
gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT = false;
|
||||
|
||||
BARRIER();
|
||||
|
||||
gl_MeshPrimitivesEXT[iid+1].gl_PrimitiveID = gl_MeshPrimitivesEXT[iid].gl_PrimitiveID;
|
||||
gl_MeshPrimitivesEXT[iid+1].gl_Layer = gl_MeshPrimitivesEXT[iid].gl_Layer;
|
||||
gl_MeshPrimitivesEXT[iid+1].gl_ViewportIndex = gl_MeshPrimitivesEXT[iid].gl_ViewportIndex;
|
||||
gl_MeshPrimitivesEXT[iid+1].gl_CullPrimitiveEXT = gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT;
|
||||
|
||||
BARRIER();
|
||||
|
||||
// check bound limits
|
||||
gl_PrimitivePointIndicesEXT[0] = 1;
|
||||
gl_PrimitivePointIndicesEXT[MAX_PRIM - 1] = 2;
|
||||
}
|
41
Test/spv.ext.meshShaderTaskMem.mesh
Normal file
41
Test/spv.ext.meshShaderTaskMem.mesh
Normal file
@ -0,0 +1,41 @@
|
||||
#version 450
|
||||
|
||||
#define MAX_VER 81
|
||||
#define MAX_PRIM 32
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_EXT_mesh_shader : enable
|
||||
|
||||
layout(local_size_x = 32) in;
|
||||
|
||||
layout(max_vertices=MAX_VER) out;
|
||||
layout(max_primitives=MAX_PRIM) out;
|
||||
layout(triangles) out;
|
||||
|
||||
// use of storage qualifier "taskPayloadSharedEXT" in mesh shaders:
|
||||
struct taskBlock {
|
||||
float gid1[2];
|
||||
vec4 gid2;
|
||||
};
|
||||
taskPayloadSharedEXT taskBlock 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;
|
||||
}
|
59
Test/spv.ext.meshShaderUserDefined.mesh
Normal file
59
Test/spv.ext.meshShaderUserDefined.mesh
Normal file
@ -0,0 +1,59 @@
|
||||
#version 450
|
||||
|
||||
#define MAX_VER 81
|
||||
#define MAX_PRIM 32
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_EXT_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
|
||||
perprimitiveEXT 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();
|
||||
}
|
51
Test/spv.ext.meshTaskShader.task
Normal file
51
Test/spv.ext.meshTaskShader.task
Normal file
@ -0,0 +1,51 @@
|
||||
#version 450
|
||||
|
||||
#define BARRIER() \
|
||||
memoryBarrierShared(); \
|
||||
barrier();
|
||||
|
||||
#extension GL_EXT_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];
|
||||
|
||||
// use of storage qualifier "taskPayloadSharedEXT" in task shaders
|
||||
struct Task {
|
||||
vec2 dummy;
|
||||
vec2 submesh[3];
|
||||
};
|
||||
taskPayloadSharedEXT Task 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. emit task count under uniform control flow
|
||||
EmitMeshTasksEXT(3U, 1U, 1U);
|
||||
|
||||
}
|
@ -192,10 +192,10 @@ static EShLanguage c_shader_stage(glslang_stage_t stage)
|
||||
return EShLangMiss;
|
||||
case GLSLANG_STAGE_CALLABLE_NV:
|
||||
return EShLangCallable;
|
||||
case GLSLANG_STAGE_TASK_NV:
|
||||
return EShLangTaskNV;
|
||||
case GLSLANG_STAGE_MESH_NV:
|
||||
return EShLangMeshNV;
|
||||
case GLSLANG_STAGE_TASK:
|
||||
return EShLangTask;
|
||||
case GLSLANG_STAGE_MESH:
|
||||
return EShLangMesh;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -105,6 +105,8 @@ enum TStorageQualifier {
|
||||
EvqCallableData,
|
||||
EvqCallableDataIn,
|
||||
|
||||
EvqtaskPayloadSharedEXT,
|
||||
|
||||
// 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
|
||||
@ -287,6 +289,11 @@ enum TBuiltInVariable {
|
||||
EbvLayerPerViewNV,
|
||||
EbvMeshViewCountNV,
|
||||
EbvMeshViewIndicesNV,
|
||||
//GL_EXT_mesh_shader
|
||||
EbvPrimitivePointIndicesEXT,
|
||||
EbvPrimitiveLineIndicesEXT,
|
||||
EbvPrimitiveTriangleIndicesEXT,
|
||||
EbvCullPrimitiveEXT,
|
||||
|
||||
// sm builtins
|
||||
EbvWarpsPerSM,
|
||||
@ -360,6 +367,7 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
|
||||
case EvqHitAttr: return "hitAttributeNV"; break;
|
||||
case EvqCallableData: return "callableDataNV"; break;
|
||||
case EvqCallableDataIn: return "callableDataInNV"; break;
|
||||
case EvqtaskPayloadSharedEXT: return "taskPayloadSharedEXT"; break;
|
||||
default: return "unknown qualifier";
|
||||
}
|
||||
}
|
||||
@ -496,6 +504,11 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
|
||||
case EbvLayerPerViewNV: return "LayerPerViewNV";
|
||||
case EbvMeshViewCountNV: return "MeshViewCountNV";
|
||||
case EbvMeshViewIndicesNV: return "MeshViewIndicesNV";
|
||||
// GL_EXT_mesh_shader
|
||||
case EbvPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT";
|
||||
case EbvPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT";
|
||||
case EbvPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT";
|
||||
case EbvCullPrimitiveEXT: return "CullPrimitiveEXT";
|
||||
|
||||
case EbvWarpsPerSM: return "WarpsPerSMNV";
|
||||
case EbvSMCount: return "SMCountNV";
|
||||
|
@ -142,6 +142,15 @@ struct TBuiltInResource {
|
||||
int maxTaskWorkGroupSizeY_NV;
|
||||
int maxTaskWorkGroupSizeZ_NV;
|
||||
int maxMeshViewCountNV;
|
||||
int maxMeshOutputVerticesEXT;
|
||||
int maxMeshOutputPrimitivesEXT;
|
||||
int maxMeshWorkGroupSizeX_EXT;
|
||||
int maxMeshWorkGroupSizeY_EXT;
|
||||
int maxMeshWorkGroupSizeZ_EXT;
|
||||
int maxTaskWorkGroupSizeX_EXT;
|
||||
int maxTaskWorkGroupSizeY_EXT;
|
||||
int maxTaskWorkGroupSizeZ_EXT;
|
||||
int maxMeshViewCountEXT;
|
||||
int maxDualSourceDrawBuffersEXT;
|
||||
|
||||
TLimits limits;
|
||||
|
@ -833,7 +833,7 @@ public:
|
||||
}
|
||||
storage = EvqUniform;
|
||||
break;
|
||||
case EbsStorageBuffer :
|
||||
case EbsStorageBuffer :
|
||||
storage = EvqBuffer;
|
||||
break;
|
||||
#ifndef GLSLANG_WEB
|
||||
@ -856,6 +856,7 @@ public:
|
||||
bool isPerPrimitive() const { return perPrimitiveNV; }
|
||||
bool isPerView() const { return perViewNV; }
|
||||
bool isTaskMemory() const { return perTaskNV; }
|
||||
bool isTaskPayload() const { return storage == EvqtaskPayloadSharedEXT; }
|
||||
bool isAnyPayload() const {
|
||||
return storage == EvqPayload || storage == EvqPayloadIn;
|
||||
}
|
||||
@ -874,8 +875,8 @@ public:
|
||||
case EShLangTessEvaluation:
|
||||
return ! patch && isPipeInput();
|
||||
case EShLangFragment:
|
||||
return (pervertexNV || pervertexEXT) && isPipeInput();
|
||||
case EShLangMeshNV:
|
||||
return pervertexNV && isPipeInput();
|
||||
case EShLangMesh:
|
||||
return ! perTaskNV && isPipeOutput();
|
||||
|
||||
default:
|
||||
@ -2543,7 +2544,7 @@ public:
|
||||
void setStruct(TTypeList* s) { assert(isStruct()); structure = s; }
|
||||
TTypeList* getWritableStruct() const { assert(isStruct()); return structure; } // This should only be used when known to not be sharing with other threads
|
||||
void setBasicType(const TBasicType& t) { basicType = t; }
|
||||
|
||||
|
||||
int computeNumComponents() const
|
||||
{
|
||||
int components = 0;
|
||||
|
@ -148,6 +148,15 @@ typedef struct glslang_resource_s {
|
||||
int max_task_work_group_size_y_nv;
|
||||
int max_task_work_group_size_z_nv;
|
||||
int max_mesh_view_count_nv;
|
||||
int max_mesh_output_vertices_ext;
|
||||
int max_mesh_output_primitives_ext;
|
||||
int max_mesh_work_group_size_x_ext;
|
||||
int max_mesh_work_group_size_y_ext;
|
||||
int max_mesh_work_group_size_z_ext;
|
||||
int max_task_work_group_size_x_ext;
|
||||
int max_task_work_group_size_y_ext;
|
||||
int max_task_work_group_size_z_ext;
|
||||
int max_mesh_view_count_ext;
|
||||
int maxDualSourceDrawBuffersEXT;
|
||||
|
||||
glslang_limits_t limits;
|
||||
|
@ -49,8 +49,10 @@ typedef enum {
|
||||
GLSLANG_STAGE_CLOSESTHIT_NV,
|
||||
GLSLANG_STAGE_MISS_NV,
|
||||
GLSLANG_STAGE_CALLABLE_NV,
|
||||
GLSLANG_STAGE_TASK_NV,
|
||||
GLSLANG_STAGE_MESH_NV,
|
||||
GLSLANG_STAGE_TASK,
|
||||
GLSLANG_STAGE_TASK_NV = GLSLANG_STAGE_TASK,
|
||||
GLSLANG_STAGE_MESH,
|
||||
GLSLANG_STAGE_MESH_NV = GLSLANG_STAGE_MESH,
|
||||
LAST_ELEMENT_MARKER(GLSLANG_STAGE_COUNT),
|
||||
} glslang_stage_t; // would be better as stage, but this is ancient now
|
||||
|
||||
@ -68,8 +70,10 @@ typedef enum {
|
||||
GLSLANG_STAGE_CLOSESTHIT_NV_MASK = (1 << GLSLANG_STAGE_CLOSESTHIT_NV),
|
||||
GLSLANG_STAGE_MISS_NV_MASK = (1 << GLSLANG_STAGE_MISS_NV),
|
||||
GLSLANG_STAGE_CALLABLE_NV_MASK = (1 << GLSLANG_STAGE_CALLABLE_NV),
|
||||
GLSLANG_STAGE_TASK_NV_MASK = (1 << GLSLANG_STAGE_TASK_NV),
|
||||
GLSLANG_STAGE_MESH_NV_MASK = (1 << GLSLANG_STAGE_MESH_NV),
|
||||
GLSLANG_STAGE_TASK_MASK = (1 << GLSLANG_STAGE_TASK),
|
||||
GLSLANG_STAGE_TASK_NV_MASK = GLSLANG_STAGE_TASK_MASK,
|
||||
GLSLANG_STAGE_MESH_MASK = (1 << GLSLANG_STAGE_MESH),
|
||||
GLSLANG_STAGE_MESH_NV_MASK = GLSLANG_STAGE_MESH_MASK,
|
||||
LAST_ELEMENT_MARKER(GLSLANG_STAGE_MASK_COUNT),
|
||||
} glslang_stage_mask_t;
|
||||
|
||||
|
@ -934,6 +934,8 @@ enum TOperator {
|
||||
EOpExecuteCallableNV,
|
||||
EOpExecuteCallableKHR,
|
||||
EOpWritePackedPrimitiveIndices4x8NV,
|
||||
EOpEmitMeshTasksEXT,
|
||||
EOpSetMeshOutputsEXT,
|
||||
|
||||
//
|
||||
// GL_EXT_ray_query operations
|
||||
|
@ -2268,11 +2268,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
|
||||
"\n"
|
||||
);
|
||||
stageBuiltins[EShLangMeshNV].append(
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"void subgroupMemoryBarrierShared();"
|
||||
"\n"
|
||||
);
|
||||
stageBuiltins[EShLangTaskNV].append(
|
||||
stageBuiltins[EShLangTask].append(
|
||||
"void subgroupMemoryBarrierShared();"
|
||||
"\n"
|
||||
);
|
||||
@ -4298,10 +4298,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
"void barrier();"
|
||||
);
|
||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
||||
stageBuiltins[EShLangMeshNV].append(
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"void barrier();"
|
||||
);
|
||||
stageBuiltins[EShLangTaskNV].append(
|
||||
stageBuiltins[EShLangTask].append(
|
||||
"void barrier();"
|
||||
);
|
||||
}
|
||||
@ -4326,11 +4326,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
commonBuiltins.append("void memoryBarrierImage();");
|
||||
}
|
||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
||||
stageBuiltins[EShLangMeshNV].append(
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"void memoryBarrierShared();"
|
||||
"void groupMemoryBarrier();"
|
||||
);
|
||||
stageBuiltins[EShLangTaskNV].append(
|
||||
stageBuiltins[EShLangTask].append(
|
||||
"void memoryBarrierShared();"
|
||||
"void groupMemoryBarrier();"
|
||||
);
|
||||
@ -4655,10 +4655,21 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
|
||||
// Builtins for GL_NV_mesh_shader
|
||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
||||
stageBuiltins[EShLangMeshNV].append(
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"void writePackedPrimitiveIndices4x8NV(uint, uint);"
|
||||
"\n");
|
||||
}
|
||||
// Builtins for GL_EXT_mesh_shader
|
||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
||||
// Builtins for GL_EXT_mesh_shader
|
||||
stageBuiltins[EShLangTask].append(
|
||||
"void EmitMeshTasksEXT(uint, uint, uint);"
|
||||
"\n");
|
||||
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"void SetMeshOutputsEXT(uint, uint);"
|
||||
"\n");
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
@ -4855,7 +4866,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
|
||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
||||
// per-vertex attributes
|
||||
stageBuiltins[EShLangMeshNV].append(
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"out gl_MeshPerVertexNV {"
|
||||
"vec4 gl_Position;"
|
||||
"float gl_PointSize;"
|
||||
@ -4868,7 +4879,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
);
|
||||
|
||||
// per-primitive attributes
|
||||
stageBuiltins[EShLangMeshNV].append(
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"perprimitiveNV out gl_MeshPerPrimitiveNV {"
|
||||
"int gl_PrimitiveID;"
|
||||
"int gl_Layer;"
|
||||
@ -4879,7 +4890,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
"} gl_MeshPrimitivesNV[];"
|
||||
);
|
||||
|
||||
stageBuiltins[EShLangMeshNV].append(
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"out uint gl_PrimitiveCountNV;"
|
||||
"out uint gl_PrimitiveIndicesNV[];"
|
||||
|
||||
@ -4893,10 +4904,38 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
|
||||
"in highp uvec3 gl_GlobalInvocationID;"
|
||||
"in highp uint gl_LocalInvocationIndex;"
|
||||
|
||||
"\n");
|
||||
|
||||
stageBuiltins[EShLangTaskNV].append(
|
||||
// GL_EXT_mesh_shader
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"out uint gl_PrimitivePointIndicesEXT[];"
|
||||
"out uvec2 gl_PrimitiveLineIndicesEXT[];"
|
||||
"out uvec3 gl_PrimitiveTriangleIndicesEXT[];"
|
||||
"in highp uvec3 gl_NumWorkGroups;"
|
||||
"\n");
|
||||
|
||||
// per-vertex attributes
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"out gl_MeshPerVertexEXT {"
|
||||
"vec4 gl_Position;"
|
||||
"float gl_PointSize;"
|
||||
"float gl_ClipDistance[];"
|
||||
"float gl_CullDistance[];"
|
||||
"} gl_MeshVerticesEXT[];"
|
||||
);
|
||||
|
||||
// per-primitive attributes
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"perprimitiveEXT out gl_MeshPerPrimitiveEXT {"
|
||||
"int gl_PrimitiveID;"
|
||||
"int gl_Layer;"
|
||||
"int gl_ViewportIndex;"
|
||||
"bool gl_CullPrimitiveEXT;"
|
||||
"int gl_PrimitiveShadingRateEXT;"
|
||||
"} gl_MeshPrimitivesEXT[];"
|
||||
);
|
||||
|
||||
stageBuiltins[EShLangTask].append(
|
||||
"out uint gl_TaskCountNV;"
|
||||
|
||||
"const highp uvec3 gl_WorkGroupSize = uvec3(1,1,1);"
|
||||
@ -4909,27 +4948,28 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
|
||||
"in uint gl_MeshViewCountNV;"
|
||||
"in uint gl_MeshViewIndicesNV[4];"
|
||||
|
||||
"in highp uvec3 gl_NumWorkGroups;"
|
||||
"\n");
|
||||
}
|
||||
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
stageBuiltins[EShLangMeshNV].append(
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"in highp int gl_DeviceIndex;" // GL_EXT_device_group
|
||||
"in int gl_DrawIDARB;" // GL_ARB_shader_draw_parameters
|
||||
"in int gl_ViewIndex;" // GL_EXT_multiview
|
||||
"\n");
|
||||
|
||||
stageBuiltins[EShLangTaskNV].append(
|
||||
stageBuiltins[EShLangTask].append(
|
||||
"in highp int gl_DeviceIndex;" // GL_EXT_device_group
|
||||
"in int gl_DrawIDARB;" // GL_ARB_shader_draw_parameters
|
||||
"\n");
|
||||
|
||||
if (version >= 460) {
|
||||
stageBuiltins[EShLangMeshNV].append(
|
||||
stageBuiltins[EShLangMesh].append(
|
||||
"in int gl_DrawID;"
|
||||
"\n");
|
||||
|
||||
stageBuiltins[EShLangTaskNV].append(
|
||||
stageBuiltins[EShLangTask].append(
|
||||
"in int gl_DrawID;"
|
||||
"\n");
|
||||
}
|
||||
@ -5704,8 +5744,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
stageBuiltins[EShLangGeometry] .append(ballotDecls);
|
||||
stageBuiltins[EShLangCompute] .append(ballotDecls);
|
||||
stageBuiltins[EShLangFragment] .append(fragmentBallotDecls);
|
||||
stageBuiltins[EShLangMeshNV] .append(ballotDecls);
|
||||
stageBuiltins[EShLangTaskNV] .append(ballotDecls);
|
||||
stageBuiltins[EShLangMesh] .append(ballotDecls);
|
||||
stageBuiltins[EShLangTask] .append(ballotDecls);
|
||||
stageBuiltins[EShLangRayGen] .append(rtBallotDecls);
|
||||
stageBuiltins[EShLangIntersect] .append(rtBallotDecls);
|
||||
// No volatile qualifier on these builtins in any-hit
|
||||
@ -5773,10 +5813,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
stageBuiltins[EShLangCompute] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangCompute] .append(computeSubgroupDecls);
|
||||
stageBuiltins[EShLangFragment] .append(fragmentSubgroupDecls);
|
||||
stageBuiltins[EShLangMeshNV] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangMeshNV] .append(computeSubgroupDecls);
|
||||
stageBuiltins[EShLangTaskNV] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangTaskNV] .append(computeSubgroupDecls);
|
||||
stageBuiltins[EShLangMesh] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangMesh] .append(computeSubgroupDecls);
|
||||
stageBuiltins[EShLangTask] .append(subgroupDecls);
|
||||
stageBuiltins[EShLangTask] .append(computeSubgroupDecls);
|
||||
stageBuiltins[EShLangRayGen] .append(rtSubgroupDecls);
|
||||
stageBuiltins[EShLangIntersect] .append(rtSubgroupDecls);
|
||||
// No volatile qualifier on these builtins in any-hit
|
||||
@ -8883,7 +8923,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
}
|
||||
break;
|
||||
|
||||
case EShLangMeshNV:
|
||||
case EShLangMesh:
|
||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
||||
// per-vertex builtins
|
||||
symbolTable.setVariableExtensions("gl_MeshVerticesNV", "gl_Position", 1, &E_GL_NV_mesh_shader);
|
||||
@ -8927,12 +8967,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
symbolTable.setVariableExtensions("gl_PrimitiveIndicesNV", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_MeshViewCountNV", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_MeshViewIndicesNV", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_LocalInvocationID", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_GlobalInvocationID", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_LocalInvocationIndex", 1, &E_GL_NV_mesh_shader);
|
||||
|
||||
if (profile != EEsProfile) {
|
||||
symbolTable.setVariableExtensions("gl_WorkGroupSize", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_WorkGroupID", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_LocalInvocationID", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_GlobalInvocationID", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_LocalInvocationIndex", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
} else {
|
||||
symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_LocalInvocationID", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_GlobalInvocationID", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_LocalInvocationIndex", 1, &E_GL_NV_mesh_shader);
|
||||
}
|
||||
BuiltInVariable("gl_PrimitiveCountNV", EbvPrimitiveCountNV, symbolTable);
|
||||
BuiltInVariable("gl_PrimitiveIndicesNV", EbvPrimitiveIndicesNV, symbolTable);
|
||||
BuiltInVariable("gl_MeshViewCountNV", EbvMeshViewCountNV, symbolTable);
|
||||
@ -8950,12 +8997,54 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
symbolTable.setVariableExtensions("gl_MaxMeshViewCountNV", 1, &E_GL_NV_mesh_shader);
|
||||
|
||||
// builtin functions
|
||||
symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader);
|
||||
if (profile != EEsProfile) {
|
||||
symbolTable.setFunctionExtensions("barrier", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
symbolTable.setFunctionExtensions("memoryBarrierShared", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
symbolTable.setFunctionExtensions("groupMemoryBarrier", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
} else {
|
||||
symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader);
|
||||
}
|
||||
symbolTable.setFunctionExtensions("writePackedPrimitiveIndices4x8NV", 1, &E_GL_NV_mesh_shader);
|
||||
}
|
||||
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
// GL_EXT_Mesh_shader
|
||||
symbolTable.setVariableExtensions("gl_PrimitivePointIndicesEXT", 1, &E_GL_EXT_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_PrimitiveLineIndicesEXT", 1, &E_GL_EXT_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_PrimitiveTriangleIndicesEXT", 1, &E_GL_EXT_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_NumWorkGroups", 1, &E_GL_EXT_mesh_shader);
|
||||
|
||||
BuiltInVariable("gl_PrimitivePointIndicesEXT", EbvPrimitivePointIndicesEXT, symbolTable);
|
||||
BuiltInVariable("gl_PrimitiveLineIndicesEXT", EbvPrimitiveLineIndicesEXT, symbolTable);
|
||||
BuiltInVariable("gl_PrimitiveTriangleIndicesEXT", EbvPrimitiveTriangleIndicesEXT, symbolTable);
|
||||
BuiltInVariable("gl_NumWorkGroups", EbvNumWorkGroups, symbolTable);
|
||||
|
||||
symbolTable.setVariableExtensions("gl_MeshVerticesEXT", "gl_Position", 1, &E_GL_EXT_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_MeshVerticesEXT", "gl_PointSize", 1, &E_GL_EXT_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_MeshVerticesEXT", "gl_ClipDistance", 1, &E_GL_EXT_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_MeshVerticesEXT", "gl_CullDistance", 1, &E_GL_EXT_mesh_shader);
|
||||
|
||||
BuiltInVariable("gl_MeshVerticesEXT", "gl_Position", EbvPosition, symbolTable);
|
||||
BuiltInVariable("gl_MeshVerticesEXT", "gl_PointSize", EbvPointSize, symbolTable);
|
||||
BuiltInVariable("gl_MeshVerticesEXT", "gl_ClipDistance", EbvClipDistance, symbolTable);
|
||||
BuiltInVariable("gl_MeshVerticesEXT", "gl_CullDistance", EbvCullDistance, symbolTable);
|
||||
|
||||
symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_PrimitiveID", 1, &E_GL_EXT_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_Layer", 1, &E_GL_EXT_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_ViewportIndex", 1, &E_GL_EXT_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_CullPrimitiveEXT", 1, &E_GL_EXT_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_PrimitiveShadingRateEXT", 1, &E_GL_EXT_mesh_shader);
|
||||
|
||||
BuiltInVariable("gl_MeshPrimitivesEXT", "gl_PrimitiveID", EbvPrimitiveId, symbolTable);
|
||||
BuiltInVariable("gl_MeshPrimitivesEXT", "gl_Layer", EbvLayer, symbolTable);
|
||||
BuiltInVariable("gl_MeshPrimitivesEXT", "gl_ViewportIndex", EbvViewportIndex, symbolTable);
|
||||
BuiltInVariable("gl_MeshPrimitivesEXT", "gl_CullPrimitiveEXT", EbvCullPrimitiveEXT, symbolTable);
|
||||
BuiltInVariable("gl_MeshPrimitivesEXT", "gl_PrimitiveShadingRateEXT", EbvPrimitiveShadingRateKHR, symbolTable);
|
||||
|
||||
symbolTable.setFunctionExtensions("SetMeshOutputsEXT", 1, &E_GL_EXT_mesh_shader);
|
||||
|
||||
// GL_EXT_device_group
|
||||
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
|
||||
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
|
||||
@ -8966,6 +9055,9 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
if (version >= 460) {
|
||||
BuiltInVariable("gl_DrawID", EbvDrawId, symbolTable);
|
||||
}
|
||||
// GL_EXT_multiview
|
||||
BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable);
|
||||
symbolTable.setVariableExtensions("gl_ViewIndex", 1, &E_GL_EXT_multiview);
|
||||
|
||||
// GL_ARB_shader_ballot
|
||||
symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot);
|
||||
@ -9035,16 +9127,24 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
}
|
||||
break;
|
||||
|
||||
case EShLangTaskNV:
|
||||
case EShLangTask:
|
||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
||||
symbolTable.setVariableExtensions("gl_TaskCountNV", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_LocalInvocationID", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_GlobalInvocationID", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_LocalInvocationIndex", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_MeshViewCountNV", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_MeshViewIndicesNV", 1, &E_GL_NV_mesh_shader);
|
||||
if (profile != EEsProfile) {
|
||||
symbolTable.setVariableExtensions("gl_WorkGroupSize", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_WorkGroupID", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_LocalInvocationID", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_GlobalInvocationID", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_LocalInvocationIndex", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
} else {
|
||||
symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_LocalInvocationID", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_GlobalInvocationID", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_LocalInvocationIndex", 1, &E_GL_NV_mesh_shader);
|
||||
}
|
||||
|
||||
BuiltInVariable("gl_TaskCountNV", EbvTaskCountNV, symbolTable);
|
||||
BuiltInVariable("gl_WorkGroupSize", EbvWorkGroupSize, symbolTable);
|
||||
@ -9058,12 +9158,23 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
symbolTable.setVariableExtensions("gl_MaxTaskWorkGroupSizeNV", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_MaxMeshViewCountNV", 1, &E_GL_NV_mesh_shader);
|
||||
|
||||
symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader);
|
||||
if (profile != EEsProfile) {
|
||||
symbolTable.setFunctionExtensions("barrier", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
symbolTable.setFunctionExtensions("memoryBarrierShared", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
symbolTable.setFunctionExtensions("groupMemoryBarrier", Num_AEP_mesh_shader, AEP_mesh_shader);
|
||||
} else {
|
||||
symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader);
|
||||
symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader);
|
||||
}
|
||||
}
|
||||
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
// GL_EXT_mesh_shader
|
||||
symbolTable.setFunctionExtensions("EmitMeshTasksEXT", 1, &E_GL_EXT_mesh_shader);
|
||||
symbolTable.setVariableExtensions("gl_NumWorkGroups", 1, &E_GL_EXT_mesh_shader);
|
||||
BuiltInVariable("gl_NumWorkGroups", EbvNumWorkGroups, symbolTable);
|
||||
|
||||
// GL_EXT_device_group
|
||||
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
|
||||
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
|
||||
@ -9687,17 +9798,27 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR);
|
||||
}
|
||||
break;
|
||||
case EShLangMeshNV:
|
||||
case EShLangMesh:
|
||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
||||
symbolTable.relateToOperator("writePackedPrimitiveIndices4x8NV", EOpWritePackedPrimitiveIndices4x8NV);
|
||||
symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared);
|
||||
symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier);
|
||||
symbolTable.relateToOperator("subgroupMemoryBarrierShared", EOpSubgroupMemoryBarrierShared);
|
||||
}
|
||||
// fall through
|
||||
case EShLangTaskNV:
|
||||
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
symbolTable.relateToOperator("SetMeshOutputsEXT", EOpSetMeshOutputsEXT);
|
||||
}
|
||||
break;
|
||||
case EShLangTask:
|
||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
||||
symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared);
|
||||
symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier);
|
||||
symbolTable.relateToOperator("subgroupMemoryBarrierShared", EOpSubgroupMemoryBarrierShared);
|
||||
}
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
symbolTable.relateToOperator("EmitMeshTasksEXT", EOpEmitMeshTasksEXT);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -502,6 +502,16 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb
|
||||
error(loc, "cannot be used (maybe an instance name is needed)", string->c_str(), "");
|
||||
variable = nullptr;
|
||||
}
|
||||
|
||||
if (language == EShLangMesh && variable) {
|
||||
TLayoutGeometry primitiveType = intermediate.getOutputPrimitive();
|
||||
if ((variable->getMangledName() == "gl_PrimitiveTriangleIndicesEXT" && primitiveType != ElgTriangles) ||
|
||||
(variable->getMangledName() == "gl_PrimitiveLineIndicesEXT" && primitiveType != ElgLines) ||
|
||||
(variable->getMangledName() == "gl_PrimitivePointIndicesEXT" && primitiveType != ElgPoints)) {
|
||||
error(loc, "cannot be used (ouput primitive type mismatch)", string->c_str(), "");
|
||||
variable = nullptr;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (symbol)
|
||||
error(loc, "variable name expected", string->c_str(), "");
|
||||
@ -717,7 +727,7 @@ bool TParseContext::isIoResizeArray(const TType& type) const
|
||||
! type.getQualifier().patch) ||
|
||||
(language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn &&
|
||||
(type.getQualifier().pervertexNV || type.getQualifier().pervertexEXT)) ||
|
||||
(language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut &&
|
||||
(language == EShLangMesh && type.getQualifier().storage == EvqVaryingOut &&
|
||||
!type.getQualifier().perTaskNV));
|
||||
}
|
||||
|
||||
@ -794,7 +804,7 @@ void TParseContext::checkIoArraysConsistency(const TSourceLoc &loc, bool tailOnl
|
||||
|
||||
// As I/O array sizes don't change, fetch requiredSize only once,
|
||||
// except for mesh shaders which could have different I/O array sizes based on type qualifiers.
|
||||
if (firstIteration || (language == EShLangMeshNV)) {
|
||||
if (firstIteration || (language == EShLangMesh)) {
|
||||
requiredSize = getIoArrayImplicitSize(type.getQualifier(), &featureString);
|
||||
if (requiredSize == 0)
|
||||
break;
|
||||
@ -823,10 +833,11 @@ int TParseContext::getIoArrayImplicitSize(const TQualifier &qualifier, TString *
|
||||
// Number of vertices for Fragment shader is always three.
|
||||
expectedSize = 3;
|
||||
str = "vertices";
|
||||
} else if (language == EShLangMeshNV) {
|
||||
} else if (language == EShLangMesh) {
|
||||
unsigned int maxPrimitives =
|
||||
intermediate.getPrimitives() != TQualifier::layoutNotSet ? intermediate.getPrimitives() : 0;
|
||||
if (qualifier.builtIn == EbvPrimitiveIndicesNV) {
|
||||
if (qualifier.builtIn == EbvPrimitiveIndicesNV || qualifier.builtIn == EbvPrimitiveTriangleIndicesEXT ||
|
||||
qualifier.builtIn == EbvPrimitiveLineIndicesEXT || qualifier.builtIn == EbvPrimitivePointIndicesEXT) {
|
||||
expectedSize = maxPrimitives * TQualifier::mapGeometryToSize(intermediate.getOutputPrimitive());
|
||||
str = "max_primitives*";
|
||||
str += TQualifier::getGeometryString(intermediate.getOutputPrimitive());
|
||||
@ -858,7 +869,7 @@ void TParseContext::checkIoArrayConsistency(const TSourceLoc& loc, int requiredS
|
||||
if (type.getOuterArraySize() > requiredSize)
|
||||
error(loc, " cannot be greater than 3 for pervertexEXT", feature, name.c_str());
|
||||
}
|
||||
else if (language == EShLangMeshNV)
|
||||
else if (language == EShLangMesh)
|
||||
error(loc, "inconsistent output array size of", feature, name.c_str());
|
||||
else
|
||||
assert(0);
|
||||
@ -2000,18 +2011,18 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction&
|
||||
break;
|
||||
}
|
||||
|
||||
if ((semantics & gl_SemanticsAcquire) &&
|
||||
if ((semantics & gl_SemanticsAcquire) &&
|
||||
(callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpImageAtomicStore)) {
|
||||
error(loc, "gl_SemanticsAcquire must not be used with (image) atomic store",
|
||||
fnCandidate.getName().c_str(), "");
|
||||
}
|
||||
if ((semantics & gl_SemanticsRelease) &&
|
||||
if ((semantics & gl_SemanticsRelease) &&
|
||||
(callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpImageAtomicLoad)) {
|
||||
error(loc, "gl_SemanticsRelease must not be used with (image) atomic load",
|
||||
fnCandidate.getName().c_str(), "");
|
||||
}
|
||||
if ((semantics & gl_SemanticsAcquireRelease) &&
|
||||
(callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpImageAtomicStore ||
|
||||
if ((semantics & gl_SemanticsAcquireRelease) &&
|
||||
(callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpImageAtomicStore ||
|
||||
callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpImageAtomicLoad)) {
|
||||
error(loc, "gl_SemanticsAcquireRelease must not be used with (image) atomic load/store",
|
||||
fnCandidate.getName().c_str(), "");
|
||||
@ -2462,7 +2473,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
||||
const TIntermTyped* base = TIntermediate::findLValueBase(arg0, true , true);
|
||||
const TType* refType = (base->getType().isReference()) ? base->getType().getReferentType() : nullptr;
|
||||
const TQualifier& qualifier = (refType != nullptr) ? refType->getQualifier() : base->getType().getQualifier();
|
||||
if (qualifier.storage != EvqShared && qualifier.storage != EvqBuffer)
|
||||
if (qualifier.storage != EvqShared && qualifier.storage != EvqBuffer && qualifier.storage != EvqtaskPayloadSharedEXT)
|
||||
error(loc,"Atomic memory function can only be used for shader storage block member or shared variable.",
|
||||
fnCandidate.getName().c_str(), "");
|
||||
|
||||
@ -2560,7 +2571,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
||||
}
|
||||
|
||||
if (profile != EEsProfile && version < 450) {
|
||||
if ((*argp)[0]->getAsTyped()->getBasicType() != EbtFloat &&
|
||||
if ((*argp)[0]->getAsTyped()->getBasicType() != EbtFloat &&
|
||||
(*argp)[0]->getAsTyped()->getBasicType() != EbtDouble &&
|
||||
(*argp)[1]->getAsTyped()->getBasicType() != EbtFloat &&
|
||||
(*argp)[1]->getAsTyped()->getBasicType() != EbtDouble &&
|
||||
@ -2995,6 +3006,10 @@ bool TParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, TInt
|
||||
message = "can't modify EvqFragStencil if using early_fragment_tests";
|
||||
break;
|
||||
|
||||
case EvqtaskPayloadSharedEXT:
|
||||
if (language == EShLangMesh)
|
||||
message = "can't modify variable with storage qualifier taskPayloadSharedEXT in mesh shaders";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -3033,7 +3048,7 @@ void TParseContext::rValueErrorCheck(const TSourceLoc& loc, const char* op, TInt
|
||||
if (symNode && symNode->getQualifier().isExplicitInterpolation())
|
||||
error(loc, "can't read from explicitly-interpolated object: ", op, symNode->getName().c_str());
|
||||
|
||||
// local_size_{xyz} must be assigned or specialized before gl_WorkGroupSize can be assigned.
|
||||
// local_size_{xyz} must be assigned or specialized before gl_WorkGroupSize can be assigned.
|
||||
if(node->getQualifier().builtIn == EbvWorkGroupSize &&
|
||||
!(intermediate.isLocalSizeSet() || intermediate.isLocalSizeSpecialized()))
|
||||
error(loc, "can't read from gl_WorkGroupSize before a fixed workgroup size has been declared", op, "");
|
||||
@ -3831,6 +3846,9 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
|
||||
if (qualifier.isPatch() && qualifier.isInterpolation())
|
||||
error(loc, "cannot use interpolation qualifiers with patch", "patch", "");
|
||||
|
||||
if (qualifier.isTaskPayload() && publicType.basicType == EbtBlock)
|
||||
error(loc, "taskPayloadSharedEXT variables should not be declared as interface blocks", "taskPayloadSharedEXT", "");
|
||||
|
||||
if (qualifier.isTaskMemory() && publicType.basicType != EbtBlock)
|
||||
error(loc, "taskNV variables can be declared only as blocks", "taskNV", "");
|
||||
|
||||
@ -3988,7 +4006,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
|
||||
(src.workgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.subgroupcoherent || dst.shadercallcoherent)) ||
|
||||
(src.subgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.shadercallcoherent)) ||
|
||||
(src.shadercallcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent)))) {
|
||||
error(loc, "only one coherent/devicecoherent/queuefamilycoherent/workgroupcoherent/subgroupcoherent/shadercallcoherent qualifier allowed",
|
||||
error(loc, "only one coherent/devicecoherent/queuefamilycoherent/workgroupcoherent/subgroupcoherent/shadercallcoherent qualifier allowed",
|
||||
GetPrecisionQualifierString(src.precision), "");
|
||||
}
|
||||
#endif
|
||||
@ -4346,10 +4364,10 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua
|
||||
extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))
|
||||
return;
|
||||
break;
|
||||
case EShLangMeshNV:
|
||||
case EShLangMesh:
|
||||
if (qualifier.storage == EvqVaryingOut)
|
||||
if ((isEsProfile() && version >= 320) ||
|
||||
extensionTurnedOn(E_GL_NV_mesh_shader))
|
||||
extensionsTurnedOn(Num_AEP_mesh_shader, AEP_mesh_shader))
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
@ -4633,6 +4651,9 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
|
||||
identifier == "gl_SampleMask" ||
|
||||
identifier == "gl_Layer" ||
|
||||
identifier == "gl_PrimitiveIndicesNV" ||
|
||||
identifier == "gl_PrimitivePointIndicesEXT" ||
|
||||
identifier == "gl_PrimitiveLineIndicesEXT" ||
|
||||
identifier == "gl_PrimitiveTriangleIndicesEXT" ||
|
||||
identifier == "gl_TexCoord") {
|
||||
|
||||
// Find the existing symbol, if any.
|
||||
@ -4771,7 +4792,8 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT
|
||||
profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_separate_shader_objects, feature);
|
||||
|
||||
if (blockName != "gl_PerVertex" && blockName != "gl_PerFragment" &&
|
||||
blockName != "gl_MeshPerVertexNV" && blockName != "gl_MeshPerPrimitiveNV") {
|
||||
blockName != "gl_MeshPerVertexNV" && blockName != "gl_MeshPerPrimitiveNV" &&
|
||||
blockName != "gl_MeshPerVertexEXT" && blockName != "gl_MeshPerPrimitiveEXT") {
|
||||
error(loc, "cannot redeclare block: ", "block declaration", blockName.c_str());
|
||||
return;
|
||||
}
|
||||
@ -5340,11 +5362,11 @@ void TParseContext::finish()
|
||||
if (!isEsProfile() && version < 430)
|
||||
requireExtensions(getCurrentLoc(), 1, &E_GL_ARB_compute_shader, "compute shaders");
|
||||
break;
|
||||
case EShLangTaskNV:
|
||||
requireExtensions(getCurrentLoc(), 1, &E_GL_NV_mesh_shader, "task shaders");
|
||||
case EShLangTask:
|
||||
requireExtensions(getCurrentLoc(), Num_AEP_mesh_shader, AEP_mesh_shader, "task shaders");
|
||||
break;
|
||||
case EShLangMeshNV:
|
||||
requireExtensions(getCurrentLoc(), 1, &E_GL_NV_mesh_shader, "mesh shaders");
|
||||
case EShLangMesh:
|
||||
requireExtensions(getCurrentLoc(), Num_AEP_mesh_shader, AEP_mesh_shader, "mesh shaders");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -5454,12 +5476,12 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
||||
intermediate.setUsePhysicalStorageBuffer();
|
||||
return;
|
||||
}
|
||||
if (language == EShLangGeometry || language == EShLangTessEvaluation || language == EShLangMeshNV) {
|
||||
if (language == EShLangGeometry || language == EShLangTessEvaluation || language == EShLangMesh) {
|
||||
if (id == TQualifier::getGeometryString(ElgTriangles)) {
|
||||
publicType.shaderQualifiers.geometry = ElgTriangles;
|
||||
return;
|
||||
}
|
||||
if (language == EShLangGeometry || language == EShLangMeshNV) {
|
||||
if (language == EShLangGeometry || language == EShLangMesh) {
|
||||
if (id == TQualifier::getGeometryString(ElgPoints)) {
|
||||
publicType.shaderQualifiers.geometry = ElgPoints;
|
||||
return;
|
||||
@ -5737,7 +5759,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
||||
return;
|
||||
} else if (id == "location") {
|
||||
profileRequires(loc, EEsProfile, 300, nullptr, "location");
|
||||
const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location };
|
||||
const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location };
|
||||
// GL_ARB_explicit_uniform_location requires 330 or GL_ARB_explicit_attrib_location we do not need to add it here
|
||||
profileRequires(loc, ~EEsProfile, 330, 2, exts, "location");
|
||||
if ((unsigned int)value >= TQualifier::layoutLocationEnd)
|
||||
@ -5947,9 +5969,9 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
||||
}
|
||||
break;
|
||||
|
||||
case EShLangMeshNV:
|
||||
case EShLangMesh:
|
||||
if (id == "max_vertices") {
|
||||
requireExtensions(loc, 1, &E_GL_NV_mesh_shader, "max_vertices");
|
||||
requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "max_vertices");
|
||||
publicType.shaderQualifiers.vertices = value;
|
||||
if (value > resources.maxMeshOutputVerticesNV)
|
||||
error(loc, "too large, must be less than gl_MaxMeshOutputVerticesNV", "max_vertices", "");
|
||||
@ -5958,7 +5980,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
||||
return;
|
||||
}
|
||||
if (id == "max_primitives") {
|
||||
requireExtensions(loc, 1, &E_GL_NV_mesh_shader, "max_primitives");
|
||||
requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "max_primitives");
|
||||
publicType.shaderQualifiers.primitives = value;
|
||||
if (value > resources.maxMeshOutputPrimitivesNV)
|
||||
error(loc, "too large, must be less than gl_MaxMeshOutputPrimitivesNV", "max_primitives", "");
|
||||
@ -5968,14 +5990,14 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
||||
}
|
||||
// Fall through
|
||||
|
||||
case EShLangTaskNV:
|
||||
case EShLangTask:
|
||||
// Fall through
|
||||
#endif
|
||||
case EShLangCompute:
|
||||
if (id.compare(0, 11, "local_size_") == 0) {
|
||||
#ifndef GLSLANG_WEB
|
||||
if (language == EShLangMeshNV || language == EShLangTaskNV) {
|
||||
requireExtensions(loc, 1, &E_GL_NV_mesh_shader, "gl_WorkGroupSize");
|
||||
if (language == EShLangMesh || language == EShLangTask) {
|
||||
requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "gl_WorkGroupSize");
|
||||
} else {
|
||||
profileRequires(loc, EEsProfile, 310, 0, "gl_WorkGroupSize");
|
||||
profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_compute_shader, "gl_WorkGroupSize");
|
||||
@ -6251,6 +6273,9 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
||||
if (type.getBasicType() == EbtBlock)
|
||||
error(loc, "cannot apply to uniform or buffer block", "location", "");
|
||||
break;
|
||||
case EvqtaskPayloadSharedEXT:
|
||||
error(loc, "cannot apply to taskPayloadSharedEXT", "location", "");
|
||||
break;
|
||||
#ifndef GLSLANG_WEB
|
||||
case EvqPayload:
|
||||
case EvqPayloadIn:
|
||||
@ -6612,7 +6637,7 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua
|
||||
error(loc, message, "local_size id", "");
|
||||
}
|
||||
if (shaderQualifiers.vertices != TQualifier::layoutNotSet) {
|
||||
if (language == EShLangGeometry || language == EShLangMeshNV)
|
||||
if (language == EShLangGeometry || language == EShLangMesh)
|
||||
error(loc, message, "max_vertices", "");
|
||||
else if (language == EShLangTessControl)
|
||||
error(loc, message, "vertices", "");
|
||||
@ -6624,7 +6649,7 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua
|
||||
if (shaderQualifiers.postDepthCoverage)
|
||||
error(loc, message, "post_depth_coverage", "");
|
||||
if (shaderQualifiers.primitives != TQualifier::layoutNotSet) {
|
||||
if (language == EShLangMeshNV)
|
||||
if (language == EShLangMesh)
|
||||
error(loc, message, "max_primitives", "");
|
||||
else
|
||||
assert(0);
|
||||
@ -7270,6 +7295,8 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
|
||||
requireInt8Arithmetic(loc, "qualifier", "(u)int8 types can only be in uniform block or buffer storage");
|
||||
}
|
||||
|
||||
if (type.getQualifier().storage == EvqtaskPayloadSharedEXT)
|
||||
intermediate.addTaskPayloadEXTCount();
|
||||
if (type.getQualifier().storage == EvqShared && type.containsCoopMat())
|
||||
error(loc, "qualifier", "Cooperative matrix types must not be used in shared memory", "");
|
||||
|
||||
@ -8236,6 +8263,8 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
|
||||
memberQualifier.perViewNV = currentBlockQualifier.perViewNV;
|
||||
if (currentBlockQualifier.perTaskNV)
|
||||
memberQualifier.perTaskNV = currentBlockQualifier.perTaskNV;
|
||||
if (currentBlockQualifier.storage == EvqtaskPayloadSharedEXT)
|
||||
memberQualifier.storage = EvqtaskPayloadSharedEXT;
|
||||
if (memberQualifier.storage == EvqSpirvStorageClass)
|
||||
error(memberLoc, "member cannot have a spirv_storage_class qualifier", memberType.getFieldName().c_str(), "");
|
||||
if (memberQualifier.hasSprivDecorate() && !memberQualifier.getSpirvDecorate().decorateIds.empty())
|
||||
@ -8536,23 +8565,23 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
|
||||
// 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|EShLangMeshNVMask), "input block");
|
||||
EShLangFragmentMask|EShLangMeshMask), "input block");
|
||||
if (language == EShLangFragment) {
|
||||
profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "fragment input block");
|
||||
} else if (language == EShLangMeshNV && ! qualifier.isTaskMemory()) {
|
||||
} else if (language == EShLangMesh && ! qualifier.isTaskMemory()) {
|
||||
error(loc, "input blocks cannot be used in a mesh shader", "out", "");
|
||||
}
|
||||
break;
|
||||
case EvqVaryingOut:
|
||||
profileRequires(loc, ~EEsProfile, 150, E_GL_ARB_separate_shader_objects, "output block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangVertexMask|EShLangTessControlMask|EShLangTessEvaluationMask|
|
||||
EShLangGeometryMask|EShLangMeshNVMask|EShLangTaskNVMask), "output block");
|
||||
EShLangGeometryMask|EShLangMeshMask|EShLangTaskMask), "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) {
|
||||
profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "vertex output block");
|
||||
} else if (language == EShLangMeshNV && qualifier.isTaskMemory()) {
|
||||
} else if (language == EShLangMesh && qualifier.isTaskMemory()) {
|
||||
error(loc, "can only use on input blocks in mesh shader", "taskNV", "");
|
||||
} else if (language == EShLangTaskNV && ! qualifier.isTaskMemory()) {
|
||||
} else if (language == EShLangTask && ! qualifier.isTaskMemory()) {
|
||||
error(loc, "output blocks cannot be used in a task shader", "out", "");
|
||||
}
|
||||
break;
|
||||
@ -8966,7 +8995,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
||||
{
|
||||
#ifndef GLSLANG_WEB
|
||||
if (publicType.shaderQualifiers.vertices != TQualifier::layoutNotSet) {
|
||||
assert(language == EShLangTessControl || language == EShLangGeometry || language == EShLangMeshNV);
|
||||
assert(language == EShLangTessControl || language == EShLangGeometry || language == EShLangMesh);
|
||||
const char* id = (language == EShLangTessControl) ? "vertices" : "max_vertices";
|
||||
|
||||
if (publicType.qualifier.storage != EvqVaryingOut)
|
||||
@ -8978,7 +9007,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
||||
checkIoArraysConsistency(loc);
|
||||
}
|
||||
if (publicType.shaderQualifiers.primitives != TQualifier::layoutNotSet) {
|
||||
assert(language == EShLangMeshNV);
|
||||
assert(language == EShLangMesh);
|
||||
const char* id = "max_primitives";
|
||||
|
||||
if (publicType.qualifier.storage != EvqVaryingOut)
|
||||
@ -9002,7 +9031,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
||||
case ElgTrianglesAdjacency:
|
||||
case ElgQuads:
|
||||
case ElgIsolines:
|
||||
if (language == EShLangMeshNV) {
|
||||
if (language == EShLangMesh) {
|
||||
error(loc, "cannot apply to input", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
|
||||
break;
|
||||
}
|
||||
@ -9019,7 +9048,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
||||
switch (publicType.shaderQualifiers.geometry) {
|
||||
case ElgLines:
|
||||
case ElgTriangles:
|
||||
if (language != EShLangMeshNV) {
|
||||
if (language != EShLangMesh) {
|
||||
error(loc, "cannot apply to 'out'", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
|
||||
break;
|
||||
}
|
||||
@ -9075,24 +9104,56 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
||||
error(loc, "too large; see gl_MaxComputeWorkGroupSize", "local_size", "");
|
||||
}
|
||||
#ifndef GLSLANG_WEB
|
||||
else if (language == EShLangMeshNV) {
|
||||
else if (language == EShLangMesh) {
|
||||
switch (i) {
|
||||
case 0: max = resources.maxMeshWorkGroupSizeX_NV; break;
|
||||
case 1: max = resources.maxMeshWorkGroupSizeY_NV; break;
|
||||
case 2: max = resources.maxMeshWorkGroupSizeZ_NV; break;
|
||||
case 0:
|
||||
max = extensionTurnedOn(E_GL_EXT_mesh_shader) ?
|
||||
resources.maxMeshWorkGroupSizeX_EXT :
|
||||
resources.maxMeshWorkGroupSizeX_NV;
|
||||
break;
|
||||
case 1:
|
||||
max = extensionTurnedOn(E_GL_EXT_mesh_shader) ?
|
||||
resources.maxMeshWorkGroupSizeY_EXT :
|
||||
resources.maxMeshWorkGroupSizeY_NV ;
|
||||
break;
|
||||
case 2:
|
||||
max = extensionTurnedOn(E_GL_EXT_mesh_shader) ?
|
||||
resources.maxMeshWorkGroupSizeZ_EXT :
|
||||
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) {
|
||||
if (intermediate.getLocalSize(i) > (unsigned int)max) {
|
||||
TString maxsErrtring = "too large, see ";
|
||||
maxsErrtring.append(extensionTurnedOn(E_GL_EXT_mesh_shader) ?
|
||||
"gl_MaxMeshWorkGroupSizeEXT" : "gl_MaxMeshWorkGroupSizeNV");
|
||||
error(loc, maxsErrtring.c_str(), "local_size", "");
|
||||
}
|
||||
} else if (language == EShLangTask) {
|
||||
switch (i) {
|
||||
case 0: max = resources.maxTaskWorkGroupSizeX_NV; break;
|
||||
case 1: max = resources.maxTaskWorkGroupSizeY_NV; break;
|
||||
case 2: max = resources.maxTaskWorkGroupSizeZ_NV; break;
|
||||
case 0:
|
||||
max = extensionTurnedOn(E_GL_EXT_mesh_shader) ?
|
||||
resources.maxTaskWorkGroupSizeX_EXT :
|
||||
resources.maxTaskWorkGroupSizeX_NV;
|
||||
break;
|
||||
case 1:
|
||||
max = extensionTurnedOn(E_GL_EXT_mesh_shader) ?
|
||||
resources.maxTaskWorkGroupSizeY_EXT:
|
||||
resources.maxTaskWorkGroupSizeY_NV;
|
||||
break;
|
||||
case 2:
|
||||
max = extensionTurnedOn(E_GL_EXT_mesh_shader) ?
|
||||
resources.maxTaskWorkGroupSizeZ_EXT:
|
||||
resources.maxTaskWorkGroupSizeZ_NV;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
if (intermediate.getLocalSize(i) > (unsigned int)max)
|
||||
error(loc, "too large; see gl_MaxTaskWorkGroupSizeNV", "local_size", "");
|
||||
if (intermediate.getLocalSize(i) > (unsigned int)max) {
|
||||
TString maxsErrtring = "too large, see ";
|
||||
maxsErrtring.append(extensionTurnedOn(E_GL_EXT_mesh_shader) ?
|
||||
"gl_MaxTaskWorkGroupSizeEXT" : "gl_MaxTaskWorkGroupSizeNV");
|
||||
error(loc, maxsErrtring.c_str(), "local_size", "");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
@ -9181,7 +9242,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
||||
error(loc, "can only apply to 'in'", "derivative_group_linearNV", "");
|
||||
}
|
||||
// Check mesh out array sizes, once all the necessary out qualifiers are defined.
|
||||
if ((language == EShLangMeshNV) &&
|
||||
if ((language == EShLangMesh) &&
|
||||
(intermediate.getVertices() != TQualifier::layoutNotSet) &&
|
||||
(intermediate.getPrimitives() != TQualifier::layoutNotSet) &&
|
||||
(intermediate.getOutputPrimitive() != ElgNone))
|
||||
@ -9198,7 +9259,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
||||
// Exit early as further checks are not valid
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
const TQualifier& qualifier = publicType.qualifier;
|
||||
|
||||
if (qualifier.isAuxiliary() ||
|
||||
@ -9396,4 +9457,3 @@ const TTypeList* TParseContext::recordStructCopy(TStructRecord& record, const TT
|
||||
}
|
||||
|
||||
} // end namespace glslang
|
||||
|
||||
|
@ -758,6 +758,8 @@ void TScanContext::fillInKeywordMap()
|
||||
(*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV;
|
||||
(*KeywordMap)["perviewNV"] = PERVIEWNV;
|
||||
(*KeywordMap)["taskNV"] = PERTASKNV;
|
||||
(*KeywordMap)["perprimitiveEXT"] = PERPRIMITIVEEXT;
|
||||
(*KeywordMap)["taskPayloadSharedEXT"] = TASKPAYLOADWORKGROUPEXT;
|
||||
|
||||
(*KeywordMap)["fcoopmatNV"] = FCOOPMATNV;
|
||||
(*KeywordMap)["icoopmatNV"] = ICOOPMATNV;
|
||||
@ -1740,12 +1742,18 @@ int TScanContext::tokenizeIdentifier()
|
||||
case PERPRIMITIVENV:
|
||||
case PERVIEWNV:
|
||||
case PERTASKNV:
|
||||
if ((!parseContext.isEsProfile() && parseContext.version >= 450) ||
|
||||
(parseContext.isEsProfile() && parseContext.version >= 320) ||
|
||||
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||
parseContext.extensionTurnedOn(E_GL_NV_mesh_shader))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
|
||||
case PERPRIMITIVEEXT:
|
||||
case TASKPAYLOADWORKGROUPEXT:
|
||||
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||
parseContext.extensionTurnedOn(E_GL_EXT_mesh_shader))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
|
||||
case FCOOPMATNV:
|
||||
afterType = true;
|
||||
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||
|
@ -391,13 +391,13 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
|
||||
// check for mesh
|
||||
if ((profile != EEsProfile && version >= 450) ||
|
||||
(profile == EEsProfile && version >= 320))
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMeshNV, source,
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMesh, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
|
||||
// check for task
|
||||
if ((profile != EEsProfile && version >= 450) ||
|
||||
(profile == EEsProfile && version >= 320))
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTaskNV, source,
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTask, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
#endif // !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
@ -650,8 +650,8 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
|
||||
version = 460;
|
||||
}
|
||||
break;
|
||||
case EShLangMeshNV:
|
||||
case EShLangTaskNV:
|
||||
case EShLangMesh:
|
||||
case EShLangTask:
|
||||
if ((profile == EEsProfile && version < 320) ||
|
||||
(profile != EEsProfile && version < 450)) {
|
||||
correct = false;
|
||||
|
@ -166,7 +166,8 @@ void TParseVersions::initializeExtensionBehavior()
|
||||
} extensionData;
|
||||
|
||||
const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4},
|
||||
{E_GL_NV_ray_tracing_motion_blur, EShTargetSpv_1_4}
|
||||
{E_GL_NV_ray_tracing_motion_blur, EShTargetSpv_1_4},
|
||||
{E_GL_EXT_mesh_shader, EShTargetSpv_1_4}
|
||||
};
|
||||
|
||||
for (size_t ii = 0; ii < sizeof(exts) / sizeof(exts[0]); ii++) {
|
||||
@ -345,6 +346,7 @@ void TParseVersions::initializeExtensionBehavior()
|
||||
extensionBehavior[E_GL_EXT_terminate_invocation] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shared_memory_block] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_spirv_intrinsics] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_mesh_shader] = EBhDisable;
|
||||
|
||||
// OVR extensions
|
||||
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
|
||||
@ -511,6 +513,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
||||
"#define GL_EXT_ray_flags_primitive_culling 1\n"
|
||||
"#define GL_EXT_ray_cull_mask 1\n"
|
||||
"#define GL_EXT_spirv_intrinsics 1\n"
|
||||
"#define GL_EXT_mesh_shader 1\n"
|
||||
|
||||
"#define GL_AMD_shader_ballot 1\n"
|
||||
"#define GL_AMD_shader_trinary_minmax 1\n"
|
||||
@ -641,8 +644,8 @@ void TParseVersions::getPreamble(std::string& preamble)
|
||||
case EShLangClosestHit: preamble += "#define GL_CLOSEST_HIT_SHADER_EXT 1 \n"; break;
|
||||
case EShLangMiss: preamble += "#define GL_MISS_SHADER_EXT 1 \n"; break;
|
||||
case EShLangCallable: preamble += "#define GL_CALLABLE_SHADER_EXT 1 \n"; break;
|
||||
case EShLangTaskNV: preamble += "#define GL_TASK_SHADER_NV 1 \n"; break;
|
||||
case EShLangMeshNV: preamble += "#define GL_MESH_SHADER_NV 1 \n"; break;
|
||||
case EShLangTask: preamble += "#define GL_TASK_SHADER_NV 1 \n"; break;
|
||||
case EShLangMesh: preamble += "#define GL_MESH_SHADER_NV 1 \n"; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
@ -668,8 +671,8 @@ const char* StageName(EShLanguage stage)
|
||||
case EShLangClosestHit: return "closest-hit";
|
||||
case EShLangMiss: return "miss";
|
||||
case EShLangCallable: return "callable";
|
||||
case EShLangMeshNV: return "mesh";
|
||||
case EShLangTaskNV: return "task";
|
||||
case EShLangMesh: return "mesh";
|
||||
case EShLangTask: return "task";
|
||||
#endif
|
||||
default: return "unknown stage";
|
||||
}
|
||||
@ -1060,10 +1063,22 @@ void TParseVersions::checkExtensionStage(const TSourceLoc& loc, const char * con
|
||||
{
|
||||
// GL_NV_mesh_shader extension is only allowed in task/mesh shaders
|
||||
if (strcmp(extension, "GL_NV_mesh_shader") == 0) {
|
||||
requireStage(loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask | EShLangFragmentMask),
|
||||
requireStage(loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask | EShLangFragmentMask),
|
||||
"#extension GL_NV_mesh_shader");
|
||||
profileRequires(loc, ECoreProfile, 450, 0, "#extension GL_NV_mesh_shader");
|
||||
profileRequires(loc, EEsProfile, 320, 0, "#extension GL_NV_mesh_shader");
|
||||
if (extensionTurnedOn(E_GL_EXT_mesh_shader)) {
|
||||
error(loc, "GL_EXT_mesh_shader is already turned on, and not allowed with", "#extension", extension);
|
||||
}
|
||||
}
|
||||
else if (strcmp(extension, "GL_EXT_mesh_shader") == 0) {
|
||||
requireStage(loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask | EShLangFragmentMask),
|
||||
"#extension GL_EXT_mesh_shader");
|
||||
profileRequires(loc, ECoreProfile, 450, 0, "#extension GL_EXT_mesh_shader");
|
||||
profileRequires(loc, EEsProfile, 320, 0, "#extension GL_EXT_mesh_shader");
|
||||
if (extensionTurnedOn(E_GL_NV_mesh_shader)) {
|
||||
error(loc, "GL_NV_mesh_shader is already turned on, and not allowed with", "#extension", extension);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,6 +211,7 @@ const char* const E_GL_EXT_shared_memory_block = "GL_EXT_shared_mem
|
||||
const char* const E_GL_EXT_subgroup_uniform_control_flow = "GL_EXT_subgroup_uniform_control_flow";
|
||||
const char* const E_GL_EXT_spirv_intrinsics = "GL_EXT_spirv_intrinsics";
|
||||
const char* const E_GL_EXT_fragment_shader_barycentric = "GL_EXT_fragment_shader_barycentric";
|
||||
const char* const E_GL_EXT_mesh_shader = "GL_EXT_mesh_shader";
|
||||
|
||||
// Arrays of extensions for the above viewportEXTs duplications
|
||||
|
||||
@ -288,7 +289,7 @@ const char* const E_GL_EXT_tessellation_shader = "GL_EXT_tessel
|
||||
const char* const E_GL_EXT_tessellation_point_size = "GL_EXT_tessellation_point_size";
|
||||
const char* const E_GL_EXT_texture_buffer = "GL_EXT_texture_buffer";
|
||||
const char* const E_GL_EXT_texture_cube_map_array = "GL_EXT_texture_cube_map_array";
|
||||
const char* const E_GL_EXT_shader_integer_mix = "GL_EXT_shader_integer_mix";
|
||||
const char* const E_GL_EXT_shader_integer_mix = "GL_EXT_shader_integer_mix";
|
||||
|
||||
// OES matching AEP
|
||||
const char* const E_GL_OES_geometry_shader = "GL_OES_geometry_shader";
|
||||
@ -349,6 +350,9 @@ const int Num_AEP_texture_buffer = sizeof(AEP_texture_buffer)/sizeof(AEP_texture
|
||||
const char* const AEP_texture_cube_map_array[] = { E_GL_EXT_texture_cube_map_array, E_GL_OES_texture_cube_map_array };
|
||||
const int Num_AEP_texture_cube_map_array = sizeof(AEP_texture_cube_map_array)/sizeof(AEP_texture_cube_map_array[0]);
|
||||
|
||||
const char* const AEP_mesh_shader[] = { E_GL_NV_mesh_shader, E_GL_EXT_mesh_shader };
|
||||
const int Num_AEP_mesh_shader = sizeof(AEP_mesh_shader)/sizeof(AEP_mesh_shader[0]);
|
||||
|
||||
} // end namespace glslang
|
||||
|
||||
#endif // _VERSIONS_INCLUDED_
|
||||
|
@ -315,7 +315,7 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
%token <lex> PATCH SAMPLE NONUNIFORM
|
||||
%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT
|
||||
%token <lex> SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT
|
||||
%token <lex> NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV
|
||||
%token <lex> NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV PERPRIMITIVEEXT TASKPAYLOADWORKGROUPEXT
|
||||
%token <lex> PRECISE
|
||||
GLSLANG_WEB_EXCLUDE_OFF
|
||||
|
||||
@ -1301,24 +1301,34 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
| PERPRIMITIVENV {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "perprimitiveNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshNVMask), "perprimitiveNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveNV");
|
||||
// Fragment shader stage doesn't check for extension. So we explicitly add below extension check.
|
||||
if (parseContext.language == EShLangFragment)
|
||||
parseContext.requireExtensions($1.loc, 1, &E_GL_NV_mesh_shader, "perprimitiveNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perPrimitiveNV = true;
|
||||
}
|
||||
| PERPRIMITIVEEXT {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "perprimitiveEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveEXT");
|
||||
// Fragment shader stage doesn't check for extension. So we explicitly add below extension check.
|
||||
if (parseContext.language == EShLangFragment)
|
||||
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_mesh_shader, "perprimitiveEXT");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perPrimitiveNV = true;
|
||||
}
|
||||
| PERVIEWNV {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "perviewNV");
|
||||
parseContext.requireStage($1.loc, EShLangMeshNV, "perviewNV");
|
||||
parseContext.requireStage($1.loc, EShLangMesh, "perviewNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perViewNV = true;
|
||||
}
|
||||
| PERTASKNV {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "taskNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask), "taskNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perTaskNV = true;
|
||||
}
|
||||
@ -1469,7 +1479,7 @@ storage_qualifier
|
||||
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");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshMask | EShLangTaskMask), "shared");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqShared;
|
||||
}
|
||||
@ -1656,6 +1666,13 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
parseContext.unimplemented($1.loc, "subroutine");
|
||||
$$.init($1.loc);
|
||||
}
|
||||
| TASKPAYLOADWORKGROUPEXT {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "taskPayloadSharedEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskPayloadSharedEXT ");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqtaskPayloadSharedEXT;
|
||||
}
|
||||
GLSLANG_WEB_EXCLUDE_OFF
|
||||
;
|
||||
|
||||
|
@ -315,7 +315,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
||||
%token <lex> PATCH SAMPLE NONUNIFORM
|
||||
%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT
|
||||
%token <lex> SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT
|
||||
%token <lex> NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV
|
||||
%token <lex> NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV PERPRIMITIVEEXT TASKPAYLOADWORKGROUPEXT
|
||||
%token <lex> PRECISE
|
||||
|
||||
|
||||
@ -1301,24 +1301,34 @@ interpolation_qualifier
|
||||
| PERPRIMITIVENV {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "perprimitiveNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshNVMask), "perprimitiveNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveNV");
|
||||
// Fragment shader stage doesn't check for extension. So we explicitly add below extension check.
|
||||
if (parseContext.language == EShLangFragment)
|
||||
parseContext.requireExtensions($1.loc, 1, &E_GL_NV_mesh_shader, "perprimitiveNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perPrimitiveNV = true;
|
||||
}
|
||||
| PERPRIMITIVEEXT {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "perprimitiveEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveEXT");
|
||||
// Fragment shader stage doesn't check for extension. So we explicitly add below extension check.
|
||||
if (parseContext.language == EShLangFragment)
|
||||
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_mesh_shader, "perprimitiveEXT");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perPrimitiveNV = true;
|
||||
}
|
||||
| PERVIEWNV {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "perviewNV");
|
||||
parseContext.requireStage($1.loc, EShLangMeshNV, "perviewNV");
|
||||
parseContext.requireStage($1.loc, EShLangMesh, "perviewNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perViewNV = true;
|
||||
}
|
||||
| PERTASKNV {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "taskNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask), "taskNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perTaskNV = true;
|
||||
}
|
||||
@ -1469,7 +1479,7 @@ storage_qualifier
|
||||
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");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshMask | EShLangTaskMask), "shared");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqShared;
|
||||
}
|
||||
@ -1656,6 +1666,13 @@ storage_qualifier
|
||||
parseContext.unimplemented($1.loc, "subroutine");
|
||||
$$.init($1.loc);
|
||||
}
|
||||
| TASKPAYLOADWORKGROUPEXT {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "taskPayloadSharedEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskPayloadSharedEXT ");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqtaskPayloadSharedEXT;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -506,7 +506,9 @@ extern int yydebug;
|
||||
PERPRIMITIVENV = 707, /* PERPRIMITIVENV */
|
||||
PERVIEWNV = 708, /* PERVIEWNV */
|
||||
PERTASKNV = 709, /* PERTASKNV */
|
||||
PRECISE = 710 /* PRECISE */
|
||||
PERPRIMITIVEEXT = 710, /* PERPRIMITIVEEXT */
|
||||
TASKPAYLOADWORKGROUPEXT = 711, /* TASKPAYLOADWORKGROUPEXT */
|
||||
PRECISE = 712 /* PRECISE */
|
||||
};
|
||||
typedef enum yytokentype yytoken_kind_t;
|
||||
#endif
|
||||
@ -554,7 +556,7 @@ union YYSTYPE
|
||||
glslang::TArraySizes* typeParameters;
|
||||
} interm;
|
||||
|
||||
#line 558 "MachineIndependent/glslang_tab.cpp.h"
|
||||
#line 560 "MachineIndependent/glslang_tab.cpp.h"
|
||||
|
||||
};
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
|
@ -1068,6 +1068,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
||||
case EOpExecuteCallableNV: out.debug << "executeCallableNV"; break;
|
||||
case EOpExecuteCallableKHR: out.debug << "executeCallableKHR"; break;
|
||||
case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; break;
|
||||
case EOpEmitMeshTasksEXT: out.debug << "EmitMeshTasksEXT"; break;
|
||||
case EOpSetMeshOutputsEXT: out.debug << "SetMeshOutputsEXT"; break;
|
||||
|
||||
case EOpRayQueryInitialize: out.debug << "rayQueryInitializeEXT"; break;
|
||||
case EOpRayQueryTerminate: out.debug << "rayQueryTerminateEXT"; break;
|
||||
@ -1522,12 +1524,12 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
|
||||
infoSink.debug << "interlock ordering = " << TQualifier::getInterlockOrderingString(interlockOrdering) << "\n";
|
||||
break;
|
||||
|
||||
case EShLangMeshNV:
|
||||
case EShLangMesh:
|
||||
infoSink.debug << "max_vertices = " << vertices << "\n";
|
||||
infoSink.debug << "max_primitives = " << primitives << "\n";
|
||||
infoSink.debug << "output primitive = " << TQualifier::getGeometryString(outputPrimitive) << "\n";
|
||||
// Fall through
|
||||
case EShLangTaskNV:
|
||||
case EShLangTask:
|
||||
// Fall through
|
||||
case EShLangCompute:
|
||||
infoSink.debug << "local_size = (" << localSize[0] << ", " << localSize[1] << ", " << localSize[2] << ")\n";
|
||||
|
@ -120,7 +120,7 @@ void TIntermediate::mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit
|
||||
}
|
||||
|
||||
//
|
||||
// do error checking on the shader boundary in / out vars
|
||||
// do error checking on the shader boundary in / out vars
|
||||
//
|
||||
void TIntermediate::checkStageIO(TInfoSink& infoSink, TIntermediate& unit) {
|
||||
if (unit.treeRoot == nullptr || treeRoot == nullptr)
|
||||
@ -212,7 +212,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
|
||||
if (vertices == TQualifier::layoutNotSet)
|
||||
vertices = unit.vertices;
|
||||
else if (unit.vertices != TQualifier::layoutNotSet && vertices != unit.vertices) {
|
||||
if (language == EShLangGeometry || language == EShLangMeshNV)
|
||||
if (language == EShLangGeometry || language == EShLangMesh)
|
||||
error(infoSink, "Contradictory layout max_vertices values");
|
||||
else if (language == EShLangTessControl)
|
||||
error(infoSink, "Contradictory layout vertices values");
|
||||
@ -222,7 +222,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
|
||||
if (primitives == TQualifier::layoutNotSet)
|
||||
primitives = unit.primitives;
|
||||
else if (primitives != unit.primitives) {
|
||||
if (language == EShLangMeshNV)
|
||||
if (language == EShLangMesh)
|
||||
error(infoSink, "Contradictory layout max_primitives values");
|
||||
else
|
||||
assert(0);
|
||||
@ -692,7 +692,7 @@ void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* bl
|
||||
TMergeBlockTraverser finalLinkTraverser(block);
|
||||
getTreeRoot()->traverse(&finalLinkTraverser);
|
||||
|
||||
// The 'unit' intermediate needs the block structures update, but also structure entry indices
|
||||
// The 'unit' intermediate needs the block structures update, but also structure entry indices
|
||||
// may have changed from the old block to the new one that it was merged into, so update those
|
||||
// in 'visitBinary'
|
||||
TType unitType;
|
||||
@ -1012,7 +1012,7 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
|
||||
}
|
||||
|
||||
// Auxiliary and interpolation...
|
||||
// "interpolation qualification (e.g., flat) and auxiliary qualification (e.g. centroid) may differ.
|
||||
// "interpolation qualification (e.g., flat) and auxiliary qualification (e.g. centroid) may differ.
|
||||
// These mismatches are allowed between any pair of stages ...
|
||||
// those provided in the fragment shader supersede those provided in previous stages."
|
||||
if (!crossStage &&
|
||||
@ -1294,8 +1294,8 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
|
||||
error(infoSink, "At least one shader must specify a layout(max_vertices = value)");
|
||||
break;
|
||||
case EShLangFragment:
|
||||
// for GL_ARB_post_depth_coverage, EarlyFragmentTest is set automatically in
|
||||
// ParseHelper.cpp. So if we reach here, this must be GL_EXT_post_depth_coverage
|
||||
// for GL_ARB_post_depth_coverage, EarlyFragmentTest is set automatically in
|
||||
// ParseHelper.cpp. So if we reach here, this must be GL_EXT_post_depth_coverage
|
||||
// requiring explicit early_fragment_tests
|
||||
if (getPostDepthCoverage() && !getEarlyFragmentTests())
|
||||
error(infoSink, "post_depth_coverage requires early_fragment_tests");
|
||||
@ -1312,7 +1312,7 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
|
||||
if (numShaderRecordBlocks > 1)
|
||||
error(infoSink, "Only one shaderRecordNV buffer block is allowed per stage");
|
||||
break;
|
||||
case EShLangMeshNV:
|
||||
case EShLangMesh:
|
||||
// NV_mesh_shader doesn't allow use of both single-view and per-view builtins.
|
||||
if (inIoAccessed("gl_Position") && inIoAccessed("gl_PositionPerViewNV"))
|
||||
error(infoSink, "Can only use one of gl_Position or gl_PositionPerViewNV");
|
||||
@ -1331,9 +1331,11 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
|
||||
if (primitives == TQualifier::layoutNotSet)
|
||||
error(infoSink, "At least one shader must specify a layout(max_primitives = value)");
|
||||
// fall through
|
||||
case EShLangTaskNV:
|
||||
case EShLangTask:
|
||||
if (numTaskNVBlocks > 1)
|
||||
error(infoSink, "Only one taskNV interface block is allowed per shader");
|
||||
if (numTaskEXTPayloads > 1)
|
||||
error(infoSink, "Only single variable of type taskPayloadSharedEXT is allowed per shader");
|
||||
sharedBlockCheck(infoSink);
|
||||
break;
|
||||
default:
|
||||
@ -2226,7 +2228,7 @@ int TIntermediate::getScalarAlignment(const TType& type, int& size, int& stride,
|
||||
|
||||
if (type.isVector()) {
|
||||
int scalarAlign = getBaseAlignmentScalar(type, size);
|
||||
|
||||
|
||||
size *= type.getVectorSize();
|
||||
return scalarAlign;
|
||||
}
|
||||
@ -2247,7 +2249,7 @@ int TIntermediate::getScalarAlignment(const TType& type, int& size, int& stride,
|
||||
|
||||
assert(0); // all cases should be covered above
|
||||
size = 1;
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int TIntermediate::getMemberAlignment(const TType& type, int& size, int& stride, TLayoutPacking layoutPacking, bool rowMajor)
|
||||
@ -2338,7 +2340,7 @@ bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) {
|
||||
(language == EShLangTessEvaluation && type.getQualifier().storage == EvqVaryingIn) ||
|
||||
(language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn &&
|
||||
(type.getQualifier().pervertexNV || type.getQualifier().pervertexEXT)) ||
|
||||
(language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut &&
|
||||
(language == EShLangMesh && type.getQualifier().storage == EvqVaryingOut &&
|
||||
!type.getQualifier().perTaskNV));
|
||||
}
|
||||
#endif // not GLSLANG_WEB
|
||||
|
@ -322,6 +322,7 @@ public:
|
||||
primitives(TQualifier::layoutNotSet),
|
||||
numTaskNVBlocks(0),
|
||||
layoutPrimitiveCulling(false),
|
||||
numTaskEXTPayloads(0),
|
||||
autoMapBindings(false),
|
||||
autoMapLocations(false),
|
||||
flattenUniformArrays(false),
|
||||
@ -639,6 +640,7 @@ public:
|
||||
int getNumPushConstants() const { return 0; }
|
||||
void addShaderRecordCount() { }
|
||||
void addTaskNVCount() { }
|
||||
void addTaskPayloadEXTCount() { }
|
||||
void setUseVulkanMemoryModel() { }
|
||||
bool usingVulkanMemoryModel() const { return false; }
|
||||
bool usingPhysicalStorageBuffer() const { return false; }
|
||||
@ -756,6 +758,7 @@ public:
|
||||
int getNumPushConstants() const { return numPushConstants; }
|
||||
void addShaderRecordCount() { ++numShaderRecordBlocks; }
|
||||
void addTaskNVCount() { ++numTaskNVBlocks; }
|
||||
void addTaskPayloadEXTCount() { ++numTaskEXTPayloads; }
|
||||
|
||||
bool setInvocations(int i)
|
||||
{
|
||||
@ -1160,6 +1163,7 @@ protected:
|
||||
int primitives;
|
||||
int numTaskNVBlocks;
|
||||
bool layoutPrimitiveCulling;
|
||||
int numTaskEXTPayloads;
|
||||
|
||||
// Base shift values
|
||||
std::array<unsigned int, EResCount> shiftBinding;
|
||||
|
@ -108,8 +108,10 @@ typedef enum {
|
||||
EShLangMissNV = EShLangMiss,
|
||||
EShLangCallable,
|
||||
EShLangCallableNV = EShLangCallable,
|
||||
EShLangTaskNV,
|
||||
EShLangMeshNV,
|
||||
EShLangTask,
|
||||
EShLangTaskNV = EShLangTask,
|
||||
EShLangMesh,
|
||||
EShLangMeshNV = EShLangMesh,
|
||||
LAST_ELEMENT_MARKER(EShLangCount),
|
||||
} EShLanguage; // would be better as stage, but this is ancient now
|
||||
|
||||
@ -132,8 +134,10 @@ typedef enum : unsigned {
|
||||
EShLangMissNVMask = EShLangMissMask,
|
||||
EShLangCallableMask = (1 << EShLangCallable),
|
||||
EShLangCallableNVMask = EShLangCallableMask,
|
||||
EShLangTaskNVMask = (1 << EShLangTaskNV),
|
||||
EShLangMeshNVMask = (1 << EShLangMeshNV),
|
||||
EShLangTaskMask = (1 << EShLangTask),
|
||||
EShLangTaskNVMask = EShLangTaskMask,
|
||||
EShLangMeshMask = (1 << EShLangMesh),
|
||||
EShLangMeshNVMask = EShLangMeshMask,
|
||||
LAST_ELEMENT_MARKER(EShLanguageMaskCount),
|
||||
} EShLanguageMask;
|
||||
|
||||
|
@ -630,6 +630,17 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
"spv.WorkgroupMemoryExplicitLayout.std140.comp",
|
||||
"spv.WorkgroupMemoryExplicitLayout.std430.comp",
|
||||
"spv.WorkgroupMemoryExplicitLayout.scalar.comp",
|
||||
|
||||
// SPV_EXT_mesh_shader
|
||||
"spv.ext.meshShaderBuiltins.mesh",
|
||||
"spv.ext.meshShaderRedeclBuiltins.mesh",
|
||||
"spv.ext.meshShaderTaskMem.mesh",
|
||||
"spv.ext.meshShaderUserDefined.mesh",
|
||||
"spv.ext.meshTaskShader.task",
|
||||
"spv.atomiAddEXT.error.mesh",
|
||||
"spv.atomiAddEXT.task",
|
||||
"spv.460.subgroupEXT.task",
|
||||
"spv.460.subgroupEXT.mesh",
|
||||
})),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
@ -73,9 +73,9 @@ EShLanguage GetShaderStage(const std::string& stage)
|
||||
} else if (stage == "rcall") {
|
||||
return EShLangCallable;
|
||||
} else if (stage == "task") {
|
||||
return EShLangTaskNV;
|
||||
return EShLangTask;
|
||||
} else if (stage == "mesh") {
|
||||
return EShLangMeshNV;
|
||||
return EShLangMesh;
|
||||
} else {
|
||||
assert(0 && "Unknown shader stage");
|
||||
return EShLangCount;
|
||||
|
@ -5,14 +5,14 @@
|
||||
"site" : "github",
|
||||
"subrepo" : "KhronosGroup/SPIRV-Tools",
|
||||
"subdir" : "External/spirv-tools",
|
||||
"commit" : "5e61ea2098220059e89523f1f47b0bcd8c33b89a"
|
||||
"commit" : "4c456f7da67c5437a6fb7d4d20d78e2a5ae2acf2"
|
||||
},
|
||||
{
|
||||
"name" : "spirv-tools/external/spirv-headers",
|
||||
"site" : "github",
|
||||
"subrepo" : "KhronosGroup/SPIRV-Headers",
|
||||
"subdir" : "External/spirv-tools/external/spirv-headers",
|
||||
"commit" : "b2a156e1c0434bc8c99aaebba1c7be98be7ac580"
|
||||
"commit" : "87d5b782bec60822aa878941e6b13c0a9a954c9b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user