summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-04-23 07:32:56 -0300
committerGravatar ameerj2021-07-22 21:51:29 -0400
commit57464e3b72ac31fdfe3b0824c0a9fe02e2805cb8 (patch)
treeaa39f92b097eeb339f7e3fa9fde74aae3fcd6987
parentshader: Fix VMNMX selector B (diff)
downloadyuzu-57464e3b72ac31fdfe3b0824c0a9fe02e2805cb8.tar.gz
yuzu-57464e3b72ac31fdfe3b0824c0a9fe02e2805cb8.tar.xz
yuzu-57464e3b72ac31fdfe3b0824c0a9fe02e2805cb8.zip
shader: Fix storage type when reading patches on tess control
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp3
1 files changed, 2 insertions, 1 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 5cc9d0d39..29da2ef70 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
@@ -303,7 +303,8 @@ Id EmitGetPatch(EmitContext& ctx, IR::Patch patch) {
303 } 303 }
304 const u32 index{IR::GenericPatchIndex(patch)}; 304 const u32 index{IR::GenericPatchIndex(patch)};
305 const Id element{ctx.Const(IR::GenericPatchElement(patch))}; 305 const Id element{ctx.Const(IR::GenericPatchElement(patch))};
306 const Id pointer{ctx.OpAccessChain(ctx.input_f32, ctx.patches.at(index), element)}; 306 const Id type{ctx.stage == Stage::TessellationControl ? ctx.output_f32 : ctx.input_f32};
307 const Id pointer{ctx.OpAccessChain(type, ctx.patches.at(index), element)};
307 return ctx.OpLoad(ctx.F32[1], pointer); 308 return ctx.OpLoad(ctx.F32[1], pointer);
308} 309}
309 310