diff options
| author | Tilka <tilkax@gmail.com> | 2023-10-28 02:12:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-28 02:12:40 +0100 |
| commit | 7c243a110a1b210238a824f56d3a33fed4aee9c6 (patch) | |
| tree | b0671b61dc3545ed77b1b11df93e5e50113a651c /Source/Core/VideoCommon/VertexShaderGen.cpp | |
| parent | ef447bb40ba1bea3c8b5ff084d83bd49f5a08e8f (diff) | |
| parent | 4f2a79058a35a51e549c0ad5416cd5709fc35df4 (diff) | |
Merge pull request #12253 from TellowKrinkle/AsahiGL
Fix shader compiles on Asahi Linux
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexShaderGen.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp index d2898cb412..9f854f2d9e 100644 --- a/Source/Core/VideoCommon/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/VertexShaderGen.cpp @@ -149,7 +149,7 @@ ShaderCode GenerateVertexShaderCode(APIType api_type, const ShaderHostConfig& ho // Can't use float3, etc because we want 4-byte alignment out.Write( "uint4 unpack_ubyte4(uint value) {{\n" - " return uint4(value & 0xff, (value >> 8) & 0xff, (value >> 16) & 0xff, value >> 24);\n" + " return uint4(value & 0xffu, (value >> 8) & 0xffu, (value >> 16) & 0xffu, value >> 24);\n" "}}\n\n" "struct InputData {{\n"); if (uid_data->components & VB_HAS_POSMTXIDX) @@ -271,7 +271,7 @@ ShaderCode GenerateVertexShaderCode(APIType api_type, const ShaderHostConfig& ho if (api_type == APIType::D3D) out.Write("uint vertex_id = (gl_VertexID >> 2) + base_vertex;\n"); else - out.Write("uint vertex_id = gl_VertexID >> 2;\n"); + out.Write("uint vertex_id = uint(gl_VertexID) >> 2u;\n"); out.Write("InputData i = input_buffer[vertex_id];\n" "{}", input_extract.GetBuffer()); @@ -524,9 +524,9 @@ ShaderCode GenerateVertexShaderCode(APIType api_type, const ShaderHostConfig& ho out.Write("// Line expansion\n" "uint other_id = vertex_id;\n" "if (is_bottom) {{\n" - " other_id -= 1;\n" + " other_id -= 1u;\n" "}} else {{\n" - " other_id += 1;\n" + " other_id += 1u;\n" "}}\n" "InputData other = input_buffer[other_id];\n"); if (uid_data->position_has_3_elems) |
