2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

shader: Fix storage type when reading patches on tess control

This commit is contained in:
ReinUsesLisp 2021-04-23 07:32:56 -03:00 committed by ameerj
parent d2b54c6e42
commit 57464e3b72

View file

@ -303,7 +303,8 @@ Id EmitGetPatch(EmitContext& ctx, IR::Patch patch) {
}
const u32 index{IR::GenericPatchIndex(patch)};
const Id element{ctx.Const(IR::GenericPatchElement(patch))};
const Id pointer{ctx.OpAccessChain(ctx.input_f32, ctx.patches.at(index), element)};
const Id type{ctx.stage == Stage::TessellationControl ? ctx.output_f32 : ctx.input_f32};
const Id pointer{ctx.OpAccessChain(type, ctx.patches.at(index), element)};
return ctx.OpLoad(ctx.F32[1], pointer);
}