summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/ShaderGenCommon.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2023-08-22 22:35:06 +0200
committerGitHub <noreply@github.com>2023-08-22 22:35:06 +0200
commit260bad74eac728c3c64a1a2e8b00efc7d9bede92 (patch)
tree8c219a0bb05a3fcd3812fc3de183b6d53a965695 /Source/Core/VideoCommon/ShaderGenCommon.cpp
parent4223cd0264bb32b8df89b90f1393774abd7376ca (diff)
parentba99d17ac0883b24a57dc50f7e5f88b9730c4462 (diff)
Merge pull request #12132 from JosJuice/gles-uint-const
VideoCommon: Fix custom shader constants on GLES
Diffstat (limited to 'Source/Core/VideoCommon/ShaderGenCommon.cpp')
-rw-r--r--Source/Core/VideoCommon/ShaderGenCommon.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/Core/VideoCommon/ShaderGenCommon.cpp b/Source/Core/VideoCommon/ShaderGenCommon.cpp
index e4922f3e3e..57d9c4567f 100644
--- a/Source/Core/VideoCommon/ShaderGenCommon.cpp
+++ b/Source/Core/VideoCommon/ShaderGenCommon.cpp
@@ -370,13 +370,13 @@ void WriteCustomShaderStructDef(ShaderCode* out, u32 numtexgens)
out->Write("#define CUSTOM_SHADER_API_VERSION 1;\n");
// CUSTOM_SHADER_LIGHTING_ATTENUATION_TYPE "enum" values
- out->Write("const uint CUSTOM_SHADER_LIGHTING_ATTENUATION_TYPE_NONE = {};\n",
+ out->Write("const uint CUSTOM_SHADER_LIGHTING_ATTENUATION_TYPE_NONE = {}u;\n",
static_cast<u32>(AttenuationFunc::None));
- out->Write("const uint CUSTOM_SHADER_LIGHTING_ATTENUATION_TYPE_POINT = {};\n",
+ out->Write("const uint CUSTOM_SHADER_LIGHTING_ATTENUATION_TYPE_POINT = {}u;\n",
static_cast<u32>(AttenuationFunc::Spec));
- out->Write("const uint CUSTOM_SHADER_LIGHTING_ATTENUATION_TYPE_DIR = {};\n",
+ out->Write("const uint CUSTOM_SHADER_LIGHTING_ATTENUATION_TYPE_DIR = {}u;\n",
static_cast<u32>(AttenuationFunc::Dir));
- out->Write("const uint CUSTOM_SHADER_LIGHTING_ATTENUATION_TYPE_SPOT = {};\n",
+ out->Write("const uint CUSTOM_SHADER_LIGHTING_ATTENUATION_TYPE_SPOT = {}u;\n",
static_cast<u32>(AttenuationFunc::Spot));
out->Write("struct CustomShaderLightData\n");
@@ -390,13 +390,13 @@ void WriteCustomShaderStructDef(ShaderCode* out, u32 numtexgens)
out->Write("}};\n\n");
// CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE "enum" values
- out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_PREV = 0;\n");
- out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_COLOR = 1;\n");
- out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_TEX = 2;\n");
- out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_RAS = 3;\n");
- out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_KONST = 4;\n");
- out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_NUMERIC = 5;\n");
- out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_UNUSED = 6;\n");
+ out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_PREV = 0u;\n");
+ out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_COLOR = 1u;\n");
+ out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_TEX = 2u;\n");
+ out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_RAS = 3u;\n");
+ out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_KONST = 4u;\n");
+ out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_NUMERIC = 5u;\n");
+ out->Write("const uint CUSTOM_SHADER_TEV_STAGE_INPUT_TYPE_UNUSED = 6u;\n");
out->Write("struct CustomShaderTevStageInputColor\n");
out->Write("{{\n");