From 0f6ec446ea3be41b1c22aa5c3870bd7a6c595d1f Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 11 Aug 2021 16:33:43 -0300 Subject: Replace BGRA and scale uniforms with a uniform block (#2496) * Replace BGRA and scale uniforms with a uniform block * Setting the data again on program change is no longer needed * Optimize and resolve some warnings * Avoid redundant support buffer updates * Some optimizations to BindBuffers (now inlined) * Unify render scale arrays --- .../CodeGen/Glsl/HelperFunctions/TexelFetchScale_cp.glsl | 4 ++-- .../CodeGen/Glsl/HelperFunctions/TexelFetchScale_fp.glsl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions') diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_cp.glsl b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_cp.glsl index abc3f428..4ebade5e 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_cp.glsl +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_cp.glsl @@ -1,6 +1,6 @@ ivec2 Helper_TexelFetchScale(ivec2 inputVec, int samplerIndex) { - float scale = cp_renderScale[samplerIndex]; + float scale = s_render_scale[samplerIndex]; if (scale == 1.0) { return inputVec; @@ -10,7 +10,7 @@ int Helper_TextureSizeUnscale(int size, int samplerIndex) { - float scale = cp_renderScale[samplerIndex]; + float scale = s_render_scale[samplerIndex]; if (scale == 1.0) { return size; diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_fp.glsl b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_fp.glsl index c13e2368..5def1390 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_fp.glsl +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_fp.glsl @@ -1,6 +1,6 @@ ivec2 Helper_TexelFetchScale(ivec2 inputVec, int samplerIndex) { - float scale = fp_renderScale[1 + samplerIndex]; + float scale = s_render_scale[1 + samplerIndex]; if (scale == 1.0) { return inputVec; @@ -17,7 +17,7 @@ int Helper_TextureSizeUnscale(int size, int samplerIndex) { - float scale = abs(fp_renderScale[1 + samplerIndex]); + float scale = abs(s_render_scale[1 + samplerIndex]); if (scale == 1.0) { return size; -- cgit v1.2.3