зеркало из https://github.com/stride3d/xkslang.git
Merge pull request #556 from dneto0/guard-amd-enums
SPV: Add missing guard to code that uses AMD extensions
This commit is contained in:
Коммит
720e89b314
|
@ -4133,10 +4133,12 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
|
||||||
builder.addCapability(spv::CapabilitySubgroupBallotKHR);
|
builder.addCapability(spv::CapabilitySubgroupBallotKHR);
|
||||||
} else {
|
} else {
|
||||||
builder.addCapability(spv::CapabilityGroups);
|
builder.addCapability(spv::CapabilityGroups);
|
||||||
|
#ifdef AMD_EXTENSIONS
|
||||||
if (op == glslang::EOpMinInvocationsNonUniform ||
|
if (op == glslang::EOpMinInvocationsNonUniform ||
|
||||||
op == glslang::EOpMaxInvocationsNonUniform ||
|
op == glslang::EOpMaxInvocationsNonUniform ||
|
||||||
op == glslang::EOpAddInvocationsNonUniform)
|
op == glslang::EOpAddInvocationsNonUniform)
|
||||||
builder.addExtension(spv::E_SPV_AMD_shader_ballot);
|
builder.addExtension(spv::E_SPV_AMD_shader_ballot);
|
||||||
|
#endif
|
||||||
|
|
||||||
spvGroupOperands.push_back(builder.makeUintConstant(spv::ScopeSubgroup));
|
spvGroupOperands.push_back(builder.makeUintConstant(spv::ScopeSubgroup));
|
||||||
#ifdef AMD_EXTENSIONS
|
#ifdef AMD_EXTENSIONS
|
||||||
|
|
Загрузка…
Ссылка в новой задаче