[SpirvTranslator] Fix SPIR-V viewport/layer capability handling
This commit is contained in:
parent
5c347d2cb2
commit
54ab51e117
|
|
@ -5165,9 +5165,13 @@ public static partial class Gen5SpirvTranslator
|
|||
SpirvBuiltIn.PointSize,
|
||||
"gl_PointSize");
|
||||
}
|
||||
if (needLayer || needViewport)
|
||||
{
|
||||
_module.AddExtension("SPV_EXT_shader_viewport_index_layer");
|
||||
_module.AddCapability(SpirvCapability.ShaderViewportIndexLayerExt);
|
||||
}
|
||||
if (needLayer)
|
||||
{
|
||||
_module.AddCapability(SpirvCapability.ShaderLayer);
|
||||
_layerOutput = DeclareBuiltInOutput(
|
||||
_uintType,
|
||||
SpirvBuiltIn.Layer,
|
||||
|
|
@ -5175,7 +5179,6 @@ public static partial class Gen5SpirvTranslator
|
|||
}
|
||||
if (needViewport)
|
||||
{
|
||||
_module.AddCapability(SpirvCapability.ShaderViewportIndex);
|
||||
_viewportIndexOutput = DeclareBuiltInOutput(
|
||||
_uintType,
|
||||
SpirvBuiltIn.ViewportIndex,
|
||||
|
|
|
|||
|
|
@ -207,8 +207,7 @@ public enum SpirvCapability : uint
|
|||
GroupNonUniformVote = 62,
|
||||
GroupNonUniformBallot = 64,
|
||||
GroupNonUniformShuffle = 65,
|
||||
ShaderLayer = 5253,
|
||||
ShaderViewportIndex = 5254,
|
||||
ShaderViewportIndexLayerExt = 5254,
|
||||
RuntimeDescriptorArray = 5302,
|
||||
PhysicalStorageBufferAddresses = 5347,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue