From eed9e56bf4778f76235a71175fb546be5fe1e7ab Mon Sep 17 00:00:00 2001 From: kd-11 Date: Mon, 16 Jan 2023 23:46:31 +0300 Subject: [PATCH] rsx: Allow vertex fetch from uninitialized register --- rpcs3/Emu/RSX/Program/GLSLCommon.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/RSX/Program/GLSLCommon.cpp b/rpcs3/Emu/RSX/Program/GLSLCommon.cpp index ea1e9572a0..9aa0d86314 100644 --- a/rpcs3/Emu/RSX/Program/GLSLCommon.cpp +++ b/rpcs3/Emu/RSX/Program/GLSLCommon.cpp @@ -289,10 +289,10 @@ namespace glsl "vec4 fetch_attribute(const in attribute_desc desc, const in int vertex_id, usamplerBuffer input_stream)\n" "{\n" - " const int elem_size_table[] = { 2, 4, 2, 1, 2, 4, 1 };\n" - " const float scaling_table[] = { 32767.5, 1., 1., 255., 1., 32767., 1. };\n" - " const int elem_size = elem_size_table[desc.type - 1];\n" - " const vec4 scale = scaling_table[desc.type - 1].xxxx;\n\n" + " const int elem_size_table[] = { 0, 2, 4, 2, 1, 2, 4, 1 };\n" + " const float scaling_table[] = { 1., 32767.5, 1., 1., 255., 1., 32767., 1. };\n" + " const int elem_size = elem_size_table[desc.type];\n" + " const vec4 scale = scaling_table[desc.type].xxxx;\n\n" " uvec4 tmp, result = uvec4(0u);\n" " vec4 ret;\n"