From 068052078fdb0e6bbe4073f1ad2fda9ec6d08e2b Mon Sep 17 00:00:00 2001 From: Fijxu Date: Mon, 25 Mar 2024 12:03:07 -0300 Subject: [PATCH 1/9] CI: Enable android artifacts --- .ci/scripts/android/build.sh | 3 +- .ci/scripts/android/upload.sh | 2 +- .forgejo/workflows/verify.yml | 92 +++++++++++++++++------------------ 3 files changed, 48 insertions(+), 49 deletions(-) diff --git a/.ci/scripts/android/build.sh b/.ci/scripts/android/build.sh index d0811adf7b..935919b6de 100755 --- a/.ci/scripts/android/build.sh +++ b/.ci/scripts/android/build.sh @@ -1,6 +1,7 @@ #!/bin/bash -ex # SPDX-FileCopyrightText: 2023 yuzu Emulator Project +# SPDX-FileCopyrightText: 2024 suyu Emulator Project # SPDX-License-Identifier: GPL-3.0-or-later export NDK_CCACHE="$(which ccache)" @@ -9,7 +10,7 @@ ccache -s BUILD_FLAVOR="mainline" BUILD_TYPE="release" -if [ "${GITHUB_REPOSITORY}" == "suyu-emu/suyu" ]; then +if [ "${GITHUB_REPOSITORY}" == "suyu/suyu" ]; then BUILD_TYPE="relWithDebInfo" fi diff --git a/.ci/scripts/android/upload.sh b/.ci/scripts/android/upload.sh index 05ccff2aa9..1db05bec11 100755 --- a/.ci/scripts/android/upload.sh +++ b/.ci/scripts/android/upload.sh @@ -11,7 +11,7 @@ BUILD_FLAVOR="mainline" BUILD_TYPE_LOWER="release" BUILD_TYPE_UPPER="Release" -if [ "${GITHUB_REPOSITORY}" == "suyu-emu/suyu" ]; then +if [ "${GITHUB_REPOSITORY}" == "suyu/suyu" ]; then BUILD_TYPE_LOWER="relWithDebInfo" BUILD_TYPE_UPPER="RelWithDebInfo" fi diff --git a/.forgejo/workflows/verify.yml b/.forgejo/workflows/verify.yml index 1d17c43a2b..f89166dbde 100644 --- a/.forgejo/workflows/verify.yml +++ b/.forgejo/workflows/verify.yml @@ -16,8 +16,8 @@ on: - 'externals/**' - 'CMakeLists.txt' - 'vcpkg.json' - paths-ignore: - - 'src/android/**' + # paths-ignore: + # - 'src/android/**' push: branches: [ "dev" ] paths: @@ -28,8 +28,9 @@ on: - 'CMakeLists.txt' - 'vcpkg.json' - '.forgejo/workflows/verify.yml' - paths-ignore: - - 'src/android/**' + - '.ci/**' + # paths-ignore: + # - 'src/android/**' env: PR_NUMBER: pr${{ github.event.number }} @@ -173,47 +174,44 @@ jobs: # with: # name: ${{ env.INDIVIDUAL_EXE }} # path: ${{ env.INDIVIDUAL_EXE }} - # android: - # runs-on: ubuntu-latest - # needs: format - # steps: - # - uses: https://code.forgejo.org/actions/checkout@v3 - # with: - # submodules: recursive - # fetch-depth: 0 - # - name: set up JDK 17 - # uses: https://github.com/actions/setup-java@v3 - # with: - # java-version: '17' - # distribution: 'temurin' - # - name: Set up cache - # uses: https://code.forgejo.org/actions/cache@v3 - # with: - # path: | - # ~/.gradle/caches - # ~/.gradle/wrapper - # .ccache - # key: ${{ runner.os }}-android-${{ github.sha }} - # restore-keys: | - # ${{ runner.os }}-android- - # - name: Query tag name - # uses: https://github.com/olegtarasov/get-tag@v2.1.2 - # id: tagName - # - name: Install dependencies - # run: | - # sudo apt-get update - # sudo apt-get install -y ccache apksigner glslang-dev glslang-tools - # - name: Build - # run: ./.ci/scripts/android/build.sh - # - name: Copy and sign artifacts - # env: - # ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }} - # ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} - # ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }} - # run: ./.ci/scripts/android/upload.sh - # - name: Upload - # uses: https://code.forgejo.org/actions/upload-artifact@v3 - # with: - # name: android - # path: artifacts/ + android: + runs-on: ubuntu-latest + container: fijxu/build-environments:android + needs: format + steps: + - uses: https://code.forgejo.org/actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + - name: set up JDK 17 + uses: https://github.com/actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Set up cache + uses: https://code.forgejo.org/actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + ~/.ccache + key: ${{ runner.os }}-android-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-android- + - name: Query tag name + uses: https://github.com/olegtarasov/get-tag@v2.1.2 + id: tagName + - name: Build + run: ./.ci/scripts/android/build.sh + - name: Copy and sign artifacts + env: + ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }} + ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} + ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }} + run: ./.ci/scripts/android/upload.sh + - name: Upload + uses: https://code.forgejo.org/actions/upload-artifact@v3 + with: + name: android + path: artifacts/ From 925ce2fad34aeb890103d52ea50c151a94fdcd1f Mon Sep 17 00:00:00 2001 From: Crimson-Hawk Date: Tue, 26 Mar 2024 16:39:56 +0800 Subject: [PATCH 2/9] preliminary fix to the peach game --- .../glasm/emit_glasm_context_get_set.cpp | 4 ++++ .../backend/glasm/glasm_emit_context.h | 1 + .../backend/glsl/emit_glsl_context_get_set.cpp | 4 ++++ .../spirv/emit_spirv_context_get_set.cpp | 2 ++ src/shader_recompiler/runtime_info.h | 18 ++++++++++++++++++ 5 files changed, 29 insertions(+) diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp index c7d7d5fefb..75c89ebd02 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp @@ -406,6 +406,10 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { case Stage::TessellationEval: ctx.Add("SHL.U {}.x,primitive.vertexcount,16;", inst); break; + case Stage::Geometry: + ctx.Add("SHL.U {}.x,{},16;", inst, + InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); + break; default: LOG_WARNING(Shader, "(STUBBED) called"); ctx.Add("MOV.S {}.x,0x00ff0000;", inst); diff --git a/src/shader_recompiler/backend/glasm/glasm_emit_context.h b/src/shader_recompiler/backend/glasm/glasm_emit_context.h index a81d64a9e4..b4d66ea559 100644 --- a/src/shader_recompiler/backend/glasm/glasm_emit_context.h +++ b/src/shader_recompiler/backend/glasm/glasm_emit_context.h @@ -11,6 +11,7 @@ #include "shader_recompiler/backend/glasm/reg_alloc.h" #include "shader_recompiler/stage.h" +#include "shader_recompiler/runtime_info.h" namespace Shader { struct Info; diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index 2e369ed723..35d99bad3e 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp @@ -426,6 +426,10 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { case Stage::TessellationEval: ctx.AddU32("{}=uint(gl_PatchVerticesIn)<<16;", inst); break; + case Stage::Geometry: + ctx.AddU32("{}=uint({}<<16);", inst, + InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); + break; default: LOG_WARNING(Shader, "(STUBBED) called"); ctx.AddU32("{}=uint(0x00ff0000);", inst); diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp index feca5105f9..2e7643fe9a 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp @@ -549,6 +549,8 @@ Id EmitInvocationInfo(EmitContext& ctx) { case Stage::TessellationEval: return ctx.OpShiftLeftLogical(ctx.U32[1], ctx.OpLoad(ctx.U32[1], ctx.patch_vertices_in), ctx.Const(16u)); + case Stage::Geometry: + return ctx.Const(InputTopologyVertices::vertices(ctx.runtime_info.input_topology) << 16); default: LOG_WARNING(Shader, "(STUBBED) called"); return ctx.Const(0x00ff0000u); diff --git a/src/shader_recompiler/runtime_info.h b/src/shader_recompiler/runtime_info.h index 619c0b1387..dc54d932a6 100644 --- a/src/shader_recompiler/runtime_info.h +++ b/src/shader_recompiler/runtime_info.h @@ -30,6 +30,24 @@ enum class InputTopology { TrianglesAdjacency, }; +struct InputTopologyVertices { + static u32 vertices(InputTopology input_topology) { + switch (input_topology) { + case InputTopology::Lines: + return 2; + case InputTopology::LinesAdjacency: + return 4; + case InputTopology::Triangles: + return 3; + case InputTopology::TrianglesAdjacency: + return 6; + case InputTopology::Points: + default: + return 1; + } + } +}; + enum class CompareFunction { Never, Less, From eb306775c616c4ba6db5fadafd19b509ae16f709 Mon Sep 17 00:00:00 2001 From: Crimson-Hawk Date: Tue, 26 Mar 2024 16:46:05 +0800 Subject: [PATCH 3/9] fix clong format --- .../backend/glasm/emit_glasm_context_get_set.cpp | 2 +- src/shader_recompiler/backend/glasm/glasm_emit_context.h | 2 +- .../backend/glsl/emit_glsl_context_get_set.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp index 75c89ebd02..f96bcc7097 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp @@ -408,7 +408,7 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { break; case Stage::Geometry: ctx.Add("SHL.U {}.x,{},16;", inst, - InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); + InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); break; default: LOG_WARNING(Shader, "(STUBBED) called"); diff --git a/src/shader_recompiler/backend/glasm/glasm_emit_context.h b/src/shader_recompiler/backend/glasm/glasm_emit_context.h index b4d66ea559..912fd53db4 100644 --- a/src/shader_recompiler/backend/glasm/glasm_emit_context.h +++ b/src/shader_recompiler/backend/glasm/glasm_emit_context.h @@ -10,8 +10,8 @@ #include #include "shader_recompiler/backend/glasm/reg_alloc.h" -#include "shader_recompiler/stage.h" #include "shader_recompiler/runtime_info.h" +#include "shader_recompiler/stage.h" namespace Shader { struct Info; diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index 35d99bad3e..ec35f71f87 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp @@ -428,7 +428,7 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { break; case Stage::Geometry: ctx.AddU32("{}=uint({}<<16);", inst, - InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); + InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); break; default: LOG_WARNING(Shader, "(STUBBED) called"); From fd1ec51496917ee656e9405826d3d26444b2a04c Mon Sep 17 00:00:00 2001 From: Crimson-Hawk Date: Tue, 26 Mar 2024 16:49:03 +0800 Subject: [PATCH 4/9] try 2 fix clang --- .../backend/glsl/emit_glsl_context_get_set.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index ec35f71f87..554acafadc 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp @@ -428,7 +428,7 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { break; case Stage::Geometry: ctx.AddU32("{}=uint({}<<16);", inst, - InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); + InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); break; default: LOG_WARNING(Shader, "(STUBBED) called"); From 77e9b7b59bb31bf93e4d2156e614f8944cc542af Mon Sep 17 00:00:00 2001 From: Crimson-Hawk Date: Tue, 26 Mar 2024 16:51:43 +0800 Subject: [PATCH 5/9] try 3 fixing clang omfg its just a space --- .../backend/glsl/emit_glsl_context_get_set.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index 554acafadc..f964c25507 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp @@ -428,7 +428,7 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { break; case Stage::Geometry: ctx.AddU32("{}=uint({}<<16);", inst, - InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); + InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); break; default: LOG_WARNING(Shader, "(STUBBED) called"); From 43c1a4c64349243e9f068db92f1372e8086dd3d5 Mon Sep 17 00:00:00 2001 From: ivchodev Date: Tue, 26 Mar 2024 18:36:29 +0100 Subject: [PATCH 6/9] revert 77e9b7b59bb31bf93e4d2156e614f8944cc542af revert try 3 fixing clang omfg its just a space --- .../backend/glsl/emit_glsl_context_get_set.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index f964c25507..554acafadc 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp @@ -428,7 +428,7 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { break; case Stage::Geometry: ctx.AddU32("{}=uint({}<<16);", inst, - InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); + InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); break; default: LOG_WARNING(Shader, "(STUBBED) called"); From 224cac988e0bd275265fcf5934dc1e7ec897a815 Mon Sep 17 00:00:00 2001 From: ivchodev Date: Tue, 26 Mar 2024 18:37:35 +0100 Subject: [PATCH 7/9] revert fd1ec51496917ee656e9405826d3d26444b2a04c revert try 2 fix clang --- .../backend/glsl/emit_glsl_context_get_set.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index 554acafadc..ec35f71f87 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp @@ -428,7 +428,7 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { break; case Stage::Geometry: ctx.AddU32("{}=uint({}<<16);", inst, - InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); + InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); break; default: LOG_WARNING(Shader, "(STUBBED) called"); From 9b77efe2b43ef8d93e895ceec5ba416843cc1bf8 Mon Sep 17 00:00:00 2001 From: ivchodev Date: Tue, 26 Mar 2024 18:37:54 +0100 Subject: [PATCH 8/9] revert eb306775c616c4ba6db5fadafd19b509ae16f709 revert fix clong format --- .../backend/glasm/emit_glasm_context_get_set.cpp | 2 +- src/shader_recompiler/backend/glasm/glasm_emit_context.h | 2 +- .../backend/glsl/emit_glsl_context_get_set.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp index f96bcc7097..75c89ebd02 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp @@ -408,7 +408,7 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { break; case Stage::Geometry: ctx.Add("SHL.U {}.x,{},16;", inst, - InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); + InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); break; default: LOG_WARNING(Shader, "(STUBBED) called"); diff --git a/src/shader_recompiler/backend/glasm/glasm_emit_context.h b/src/shader_recompiler/backend/glasm/glasm_emit_context.h index 912fd53db4..b4d66ea559 100644 --- a/src/shader_recompiler/backend/glasm/glasm_emit_context.h +++ b/src/shader_recompiler/backend/glasm/glasm_emit_context.h @@ -10,8 +10,8 @@ #include #include "shader_recompiler/backend/glasm/reg_alloc.h" -#include "shader_recompiler/runtime_info.h" #include "shader_recompiler/stage.h" +#include "shader_recompiler/runtime_info.h" namespace Shader { struct Info; diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index ec35f71f87..35d99bad3e 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp @@ -428,7 +428,7 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { break; case Stage::Geometry: ctx.AddU32("{}=uint({}<<16);", inst, - InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); + InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); break; default: LOG_WARNING(Shader, "(STUBBED) called"); From 09578d522b203458d8196001bc5130de8c4e619a Mon Sep 17 00:00:00 2001 From: ivchodev Date: Tue, 26 Mar 2024 18:38:52 +0100 Subject: [PATCH 9/9] revert 925ce2fad34aeb890103d52ea50c151a94fdcd1f Reverting potentially plagiarized code. The developer team did not sign off on this commit. --- .../glasm/emit_glasm_context_get_set.cpp | 4 ---- .../backend/glasm/glasm_emit_context.h | 1 - .../backend/glsl/emit_glsl_context_get_set.cpp | 4 ---- .../spirv/emit_spirv_context_get_set.cpp | 2 -- src/shader_recompiler/runtime_info.h | 18 ------------------ 5 files changed, 29 deletions(-) diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp index 75c89ebd02..c7d7d5fefb 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp @@ -406,10 +406,6 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { case Stage::TessellationEval: ctx.Add("SHL.U {}.x,primitive.vertexcount,16;", inst); break; - case Stage::Geometry: - ctx.Add("SHL.U {}.x,{},16;", inst, - InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); - break; default: LOG_WARNING(Shader, "(STUBBED) called"); ctx.Add("MOV.S {}.x,0x00ff0000;", inst); diff --git a/src/shader_recompiler/backend/glasm/glasm_emit_context.h b/src/shader_recompiler/backend/glasm/glasm_emit_context.h index b4d66ea559..a81d64a9e4 100644 --- a/src/shader_recompiler/backend/glasm/glasm_emit_context.h +++ b/src/shader_recompiler/backend/glasm/glasm_emit_context.h @@ -11,7 +11,6 @@ #include "shader_recompiler/backend/glasm/reg_alloc.h" #include "shader_recompiler/stage.h" -#include "shader_recompiler/runtime_info.h" namespace Shader { struct Info; diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index 35d99bad3e..2e369ed723 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp @@ -426,10 +426,6 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { case Stage::TessellationEval: ctx.AddU32("{}=uint(gl_PatchVerticesIn)<<16;", inst); break; - case Stage::Geometry: - ctx.AddU32("{}=uint({}<<16);", inst, - InputTopologyVertices::vertices(ctx.runtime_info.input_topology)); - break; default: LOG_WARNING(Shader, "(STUBBED) called"); ctx.AddU32("{}=uint(0x00ff0000);", inst); diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp index 2e7643fe9a..feca5105f9 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp @@ -549,8 +549,6 @@ Id EmitInvocationInfo(EmitContext& ctx) { case Stage::TessellationEval: return ctx.OpShiftLeftLogical(ctx.U32[1], ctx.OpLoad(ctx.U32[1], ctx.patch_vertices_in), ctx.Const(16u)); - case Stage::Geometry: - return ctx.Const(InputTopologyVertices::vertices(ctx.runtime_info.input_topology) << 16); default: LOG_WARNING(Shader, "(STUBBED) called"); return ctx.Const(0x00ff0000u); diff --git a/src/shader_recompiler/runtime_info.h b/src/shader_recompiler/runtime_info.h index dc54d932a6..619c0b1387 100644 --- a/src/shader_recompiler/runtime_info.h +++ b/src/shader_recompiler/runtime_info.h @@ -30,24 +30,6 @@ enum class InputTopology { TrianglesAdjacency, }; -struct InputTopologyVertices { - static u32 vertices(InputTopology input_topology) { - switch (input_topology) { - case InputTopology::Lines: - return 2; - case InputTopology::LinesAdjacency: - return 4; - case InputTopology::Triangles: - return 3; - case InputTopology::TrianglesAdjacency: - return 6; - case InputTopology::Points: - default: - return 1; - } - } -}; - enum class CompareFunction { Never, Less,