summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-08-29 12:33:54 +0200
committerGitHub <noreply@github.com>2023-08-29 12:33:54 +0200
commit69db8a615fb38318be1a2cbb03a7135eddaad83e (patch)
tree37272579581e0b02ba4b9c42b6049a84bc3fc493 /Source/Core
parentdf120b063023cbe540a42ae61eff5f0df8a91336 (diff)
parent5b112dbf2c5c6c1025fb811689df06e89a12eed8 (diff)
Merge pull request #12145 from JosJuice/ubershaderpixel-uint
VideoCommon: Fix GLSL uint handling in UberShaderPixel
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/UberShaderPixel.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/Core/VideoCommon/UberShaderPixel.cpp b/Source/Core/VideoCommon/UberShaderPixel.cpp
index bcddde4adc..7e8c07cfb8 100644
--- a/Source/Core/VideoCommon/UberShaderPixel.cpp
+++ b/Source/Core/VideoCommon/UberShaderPixel.cpp
@@ -499,33 +499,33 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config,
for (u32 i = 0; i < numTexgen; i++)
{
out.Write(" case {}u:\n"
- " return {};\n",
+ " return {}u;\n",
i, i);
}
out.Write(" default:\n"
- " return 0;\n"
+ " return 0u;\n"
" }}\n");
}
else
{
out.Write(" if (texmap >= {}u) {{\n", numTexgen);
- out.Write(" return 0;\n"
+ out.Write(" return 0u;\n"
" }}\n");
if (numTexgen > 4)
out.Write(" if (texmap < 4u) {{\n");
if (numTexgen > 2)
out.Write(" if (texmap < 2u) {{\n");
if (numTexgen > 1)
- out.Write(" return (texmap == 0u) ? 0 : 1;\n");
+ out.Write(" return (texmap == 0u) ? 0u : 1u;\n");
else
- out.Write(" return 0;\n");
+ out.Write(" return 0u;\n");
if (numTexgen > 2)
{
out.Write(" }} else {{\n"); // >= 2 < min(4, numTexgen)
if (numTexgen > 3)
- out.Write(" return (texmap == 2u) ? 2 : 3;\n");
+ out.Write(" return (texmap == 2u) ? 2u : 3u;\n");
else
- out.Write(" return 2;\n");
+ out.Write(" return 2u;\n");
out.Write(" }}\n");
}
if (numTexgen > 4)
@@ -534,16 +534,16 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config,
if (numTexgen > 6)
out.Write(" if (texmap < 6u) {{\n");
if (numTexgen > 5)
- out.Write(" return (texmap == 4u) ? 4 : 5;\n");
+ out.Write(" return (texmap == 4u) ? 4u : 5u;\n");
else
- out.Write(" return 4;\n");
+ out.Write(" return 4u;\n");
if (numTexgen > 6)
{
out.Write(" }} else {{\n"); // >= 6 < min(8, numTexgen)
if (numTexgen > 7)
- out.Write(" return (texmap == 6u) ? 6 : 7;\n");
+ out.Write(" return (texmap == 6u) ? 6u : 7u;\n");
else
- out.Write(" return 6;\n");
+ out.Write(" return 6u;\n");
out.Write(" }}\n");
}
out.Write(" }}\n");