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)
{
if ((context.Config.Stage.SupportsRenderScale()) &&
if (context.Config.Stage.SupportsRenderScale() &&
texOp.Inst == Instruction.ImageLoad &&
!isBindless &&
!isIndexed)
@ -621,7 +621,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
{
if (intCoords)
{
if ((context.Config.Stage.SupportsRenderScale()) &&
if (context.Config.Stage.SupportsRenderScale() &&
!isBindless &&
!isIndexed)
{

View file

@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
{
if (intCoords)
{
if ((context.Config.Stage.SupportsRenderScale()) &&
if (context.Config.Stage.SupportsRenderScale() &&
!isBindless &&
!isIndexed)
{
@ -63,7 +63,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
if (context.Config.Stage == ShaderStage.Vertex)
{
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);
scaleIndex = context.IAdd(context.TypeU32(), scaleIndex, scaleCount);
@ -177,7 +177,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
bool isBindless,
bool isIndexed)
{
if ((context.Config.Stage.SupportsRenderScale()) &&
if (context.Config.Stage.SupportsRenderScale() &&
!isBindless &&
!isIndexed)
{