diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-05-15 18:03:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 18:03:31 +0200 |
commit | 736a31e4ffcfcd325b7ae7693bd9e9c621dd6580 (patch) | |
tree | 8f6d07f919ec93311683e43c49780b1afa9e43e5 /src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | |
parent | Merge pull request #10249 from FernandoS27/sorry-i-am-late (diff) | |
parent | Fix Tears of the Kingdom flickering clouds and depths. (diff) | |
download | yuzu-736a31e4ffcfcd325b7ae7693bd9e9c621dd6580.tar yuzu-736a31e4ffcfcd325b7ae7693bd9e9c621dd6580.tar.gz yuzu-736a31e4ffcfcd325b7ae7693bd9e9c621dd6580.tar.bz2 yuzu-736a31e4ffcfcd325b7ae7693bd9e9c621dd6580.tar.lz yuzu-736a31e4ffcfcd325b7ae7693bd9e9c621dd6580.tar.xz yuzu-736a31e4ffcfcd325b7ae7693bd9e9c621dd6580.tar.zst yuzu-736a31e4ffcfcd325b7ae7693bd9e9c621dd6580.zip |
Diffstat (limited to '')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | 8 |
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); |