mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 16:55:46 +00:00
shader: Fix storage type when reading patches on tess control
This commit is contained in:
parent
c8b0377a67
commit
e37ec2790d
1 changed files with 2 additions and 1 deletions
|
@ -303,7 +303,8 @@ Id EmitGetPatch(EmitContext& ctx, IR::Patch patch) {
|
||||||
}
|
}
|
||||||
const u32 index{IR::GenericPatchIndex(patch)};
|
const u32 index{IR::GenericPatchIndex(patch)};
|
||||||
const Id element{ctx.Const(IR::GenericPatchElement(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);
|
return ctx.OpLoad(ctx.F32[1], pointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue