summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2023-05-11 20:25:24 +0200
committerKelebek1 <eeeedddccc@hotmail.co.uk>2023-05-11 20:25:24 +0200
commite42b4a16b6024c18e860c17c5c33d28f4dc37c58 (patch)
tree02ab04ec9ea82663138366e319bdadead48ac8e2 /src/shader_recompiler/backend
parentMerge pull request #10132 from Kelebek1/fermi_blit2 (diff)
downloadyuzu-e42b4a16b6024c18e860c17c5c33d28f4dc37c58.tar
yuzu-e42b4a16b6024c18e860c17c5c33d28f4dc37c58.tar.gz
yuzu-e42b4a16b6024c18e860c17c5c33d28f4dc37c58.tar.bz2
yuzu-e42b4a16b6024c18e860c17c5c33d28f4dc37c58.tar.lz
yuzu-e42b4a16b6024c18e860c17c5c33d28f4dc37c58.tar.xz
yuzu-e42b4a16b6024c18e860c17c5c33d28f4dc37c58.tar.zst
yuzu-e42b4a16b6024c18e860c17c5c33d28f4dc37c58.zip
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp8
1 files changed, 2 insertions, 6 deletions
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 fee510f7b..07c2b7b8a 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
@@ -339,9 +339,7 @@ Id EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, Id vertex) {
if (ctx.profile.support_vertex_instance_id) {
return ctx.OpBitcast(ctx.F32[1], ctx.OpLoad(ctx.U32[1], ctx.vertex_id));
} else {
- const Id index{ctx.OpLoad(ctx.U32[1], ctx.vertex_index)};
- const Id base{ctx.OpLoad(ctx.U32[1], ctx.base_vertex)};
- return ctx.OpBitcast(ctx.F32[1], ctx.OpISub(ctx.U32[1], index, base));
+ return ctx.OpBitcast(ctx.F32[1], ctx.OpLoad(ctx.U32[1], ctx.vertex_index));
}
case IR::Attribute::BaseInstance:
return ctx.OpBitcast(ctx.F32[1], ctx.OpLoad(ctx.U32[1], ctx.base_instance));
@@ -386,9 +384,7 @@ Id EmitGetAttributeU32(EmitContext& ctx, IR::Attribute attr, Id) {
if (ctx.profile.support_vertex_instance_id) {
return ctx.OpLoad(ctx.U32[1], ctx.vertex_id);
} else {
- const Id index{ctx.OpLoad(ctx.U32[1], ctx.vertex_index)};
- const Id base{ctx.OpLoad(ctx.U32[1], ctx.base_vertex)};
- return ctx.OpISub(ctx.U32[1], index, base);
+ return ctx.OpLoad(ctx.U32[1], ctx.vertex_index);
}
case IR::Attribute::BaseInstance:
return ctx.OpLoad(ctx.U32[1], ctx.base_instance);