SPIR-V: Fix another case of wrong field index

This commit is contained in:
gdk 2022-04-08 18:02:58 -03:00 committed by riperiperi
parent 670431f4fa
commit 3aa5397bad
2 changed files with 5 additions and 5 deletions

View file

@ -85,7 +85,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
string ApplyScaling(string vector) string ApplyScaling(string vector)
{ {
if ((context.Config.Stage.SupportsRenderScale()) && if (context.Config.Stage.SupportsRenderScale() &&
texOp.Inst == Instruction.ImageLoad && texOp.Inst == Instruction.ImageLoad &&
!isBindless && !isBindless &&
!isIndexed) !isIndexed)
@ -621,7 +621,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
{ {
if (intCoords) if (intCoords)
{ {
if ((context.Config.Stage.SupportsRenderScale()) && if (context.Config.Stage.SupportsRenderScale() &&
!isBindless && !isBindless &&
!isIndexed) !isIndexed)
{ {

View file

@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
{ {
if (intCoords) if (intCoords)
{ {
if ((context.Config.Stage.SupportsRenderScale()) && if (context.Config.Stage.SupportsRenderScale() &&
!isBindless && !isBindless &&
!isIndexed) !isIndexed)
{ {
@ -63,7 +63,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
if (context.Config.Stage == ShaderStage.Vertex) if (context.Config.Stage == ShaderStage.Vertex)
{ {
var scaleCountPointerType = context.TypePointer(StorageClass.Uniform, context.TypeS32()); var scaleCountPointerType = context.TypePointer(StorageClass.Uniform, context.TypeS32());
var scaleCountElemPointer = context.AccessChain(scaleCountPointerType, context.SupportBuffer, context.Constant(context.TypeU32(), 3)); var scaleCountElemPointer = context.AccessChain(scaleCountPointerType, context.SupportBuffer, context.Constant(context.TypeU32(), 2));
var scaleCount = context.Load(context.TypeS32(), scaleCountElemPointer); var scaleCount = context.Load(context.TypeS32(), scaleCountElemPointer);
scaleIndex = context.IAdd(context.TypeU32(), scaleIndex, scaleCount); scaleIndex = context.IAdd(context.TypeU32(), scaleIndex, scaleCount);
@ -177,7 +177,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
bool isBindless, bool isBindless,
bool isIndexed) bool isIndexed)
{ {
if ((context.Config.Stage.SupportsRenderScale()) && if (context.Config.Stage.SupportsRenderScale() &&
!isBindless && !isBindless &&
!isIndexed) !isIndexed)
{ {