mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-11-25 19:23:17 +01:00
Replace ShaderOutputLayer with equivalent ShaderViewportIndexLayerEXT capability (#5683)
This commit is contained in:
parent
7ccff037e8
commit
88df636c87
1 changed files with 10 additions and 8 deletions
|
@ -89,6 +89,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||||
context.AddCapability(Capability.DrawParameters);
|
context.AddCapability(Capability.DrawParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (context.Definitions.Stage != ShaderStage.Fragment &&
|
||||||
|
context.Definitions.Stage != ShaderStage.Geometry &&
|
||||||
|
context.Definitions.Stage != ShaderStage.Compute &&
|
||||||
|
(context.Info.IoDefinitions.Contains(new IoDefinition(StorageKind.Output, IoVariable.Layer)) ||
|
||||||
|
context.Info.IoDefinitions.Contains(new IoDefinition(StorageKind.Output, IoVariable.ViewportIndex))))
|
||||||
|
{
|
||||||
|
context.AddExtension("SPV_EXT_shader_viewport_index_layer");
|
||||||
|
context.AddCapability(Capability.ShaderViewportIndexLayerEXT);
|
||||||
|
}
|
||||||
|
|
||||||
if (context.Info.IoDefinitions.Contains(new IoDefinition(StorageKind.Output, IoVariable.ViewportMask)))
|
if (context.Info.IoDefinitions.Contains(new IoDefinition(StorageKind.Output, IoVariable.ViewportMask)))
|
||||||
{
|
{
|
||||||
context.AddExtension("SPV_NV_viewport_array2");
|
context.AddExtension("SPV_NV_viewport_array2");
|
||||||
|
@ -277,14 +287,6 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||||
localSizeZ);
|
localSizeZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context.Definitions.Stage != ShaderStage.Fragment &&
|
|
||||||
context.Definitions.Stage != ShaderStage.Geometry &&
|
|
||||||
context.Definitions.Stage != ShaderStage.Compute &&
|
|
||||||
context.Info.IoDefinitions.Contains(new IoDefinition(StorageKind.Output, IoVariable.Layer)))
|
|
||||||
{
|
|
||||||
context.AddCapability(Capability.ShaderLayer);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (context.Definitions.TransformFeedbackEnabled && context.Definitions.LastInVertexPipeline)
|
if (context.Definitions.TransformFeedbackEnabled && context.Definitions.LastInVertexPipeline)
|
||||||
{
|
{
|
||||||
context.AddExecutionMode(spvFunc, ExecutionMode.Xfb);
|
context.AddExecutionMode(spvFunc, ExecutionMode.Xfb);
|
||||||
|
|
Loading…
Reference in a new issue