From 28c696fa745611bac5c478e15e8dc924ab56b7a4 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 23 Nov 2020 11:42:41 +0100 Subject: [PATCH] Fix vertex ubershader GLES compile errors Regression from 51724c1. --- Source/Core/VideoCommon/UberShaderVertex.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/VideoCommon/UberShaderVertex.cpp b/Source/Core/VideoCommon/UberShaderVertex.cpp index fef809ec10..71363bd456 100644 --- a/Source/Core/VideoCommon/UberShaderVertex.cpp +++ b/Source/Core/VideoCommon/UberShaderVertex.cpp @@ -183,11 +183,11 @@ ShaderCode GenVertexShader(APIType api_type, const ShaderHostConfig& host_config "\n"); out.Write("// To use color 1, the vertex descriptor must have color 0 and 1.\n" "// If color 1 is present but not color 0, it is used for lighting channel 0.\n" - "bool use_color_1 = ((components & {0}) == {0}); // VB_HAS_COL0 | VB_HAS_COL1\n", + "bool use_color_1 = ((components & {0}u) == {0}u); // VB_HAS_COL0 | VB_HAS_COL1\n", VB_HAS_COL0 | VB_HAS_COL1); - out.Write("for (uint color = 0; color < {}; color++) {{\n", NUM_XF_COLOR_CHANNELS); - out.Write(" if ((color == 0 || use_color_1) && (components & ({} << color)) != 0) {{\n", + out.Write("for (uint color = 0u; color < {}u; color++) {{\n", NUM_XF_COLOR_CHANNELS); + out.Write(" if ((color == 0u || use_color_1) && (components & ({}u << color)) != 0u) {{\n", VB_HAS_COL0); out.Write(" float4 color_value;\n" " // Use color0 for channel 0, and color1 for channel 1 if both colors 0 and 1 are " @@ -196,7 +196,7 @@ ShaderCode GenVertexShader(APIType api_type, const ShaderHostConfig& host_config " vertex_color_0 = rawcolor0;\n" " else\n" " vertex_color_1 = rawcolor1;\n" - " }} else if (color == 0 && (components & {}) != 0) {{\n", + " }} else if (color == 0u && (components & {}u) != 0u) {{\n", VB_HAS_COL1); out.Write(" // Use color1 for channel 0 if color0 is not present.\n" " vertex_color_0 = rawcolor1;\n"