diff options
| author | 2023-05-11 19:25:24 +0100 | |
|---|---|---|
| committer | 2023-05-11 19:25:24 +0100 | |
| commit | e42b4a16b6024c18e860c17c5c33d28f4dc37c58 (patch) | |
| tree | 02ab04ec9ea82663138366e319bdadead48ac8e2 /src/shader_recompiler/backend | |
| parent | Merge pull request #10132 from Kelebek1/fermi_blit2 (diff) | |
| download | yuzu-e42b4a16b6024c18e860c17c5c33d28f4dc37c58.tar.gz yuzu-e42b4a16b6024c18e860c17c5c33d28f4dc37c58.tar.xz yuzu-e42b4a16b6024c18e860c17c5c33d28f4dc37c58.zip | |
Fix Tears of the Kingdom flickering clouds and depths.
Diffstat (limited to 'src/shader_recompiler/backend')
| -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) { | |||
| 339 | if (ctx.profile.support_vertex_instance_id) { | 339 | if (ctx.profile.support_vertex_instance_id) { |
| 340 | return ctx.OpBitcast(ctx.F32[1], ctx.OpLoad(ctx.U32[1], ctx.vertex_id)); | 340 | return ctx.OpBitcast(ctx.F32[1], ctx.OpLoad(ctx.U32[1], ctx.vertex_id)); |
| 341 | } else { | 341 | } else { |
| 342 | const Id index{ctx.OpLoad(ctx.U32[1], ctx.vertex_index)}; | 342 | return ctx.OpBitcast(ctx.F32[1], ctx.OpLoad(ctx.U32[1], ctx.vertex_index)); |
| 343 | const Id base{ctx.OpLoad(ctx.U32[1], ctx.base_vertex)}; | ||
| 344 | return ctx.OpBitcast(ctx.F32[1], ctx.OpISub(ctx.U32[1], index, base)); | ||
| 345 | } | 343 | } |
| 346 | case IR::Attribute::BaseInstance: | 344 | case IR::Attribute::BaseInstance: |
| 347 | return ctx.OpBitcast(ctx.F32[1], ctx.OpLoad(ctx.U32[1], ctx.base_instance)); | 345 | 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) { | |||
| 386 | if (ctx.profile.support_vertex_instance_id) { | 384 | if (ctx.profile.support_vertex_instance_id) { |
| 387 | return ctx.OpLoad(ctx.U32[1], ctx.vertex_id); | 385 | return ctx.OpLoad(ctx.U32[1], ctx.vertex_id); |
| 388 | } else { | 386 | } else { |
| 389 | const Id index{ctx.OpLoad(ctx.U32[1], ctx.vertex_index)}; | 387 | return ctx.OpLoad(ctx.U32[1], ctx.vertex_index); |
| 390 | const Id base{ctx.OpLoad(ctx.U32[1], ctx.base_vertex)}; | ||
| 391 | return ctx.OpISub(ctx.U32[1], index, base); | ||
| 392 | } | 388 | } |
| 393 | case IR::Attribute::BaseInstance: | 389 | case IR::Attribute::BaseInstance: |
| 394 | return ctx.OpLoad(ctx.U32[1], ctx.base_instance); | 390 | return ctx.OpLoad(ctx.U32[1], ctx.base_instance); |