mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 04:46:27 -05:00
glasm: Simplify patch reads
This commit is contained in:
parent
b382f57b28
commit
7dadb2bef3
1 changed files with 2 additions and 5 deletions
|
@ -163,11 +163,8 @@ void EmitGetPatch(EmitContext& ctx, IR::Inst& inst, IR::Patch patch) {
|
||||||
const u32 index{IR::GenericPatchIndex(patch)};
|
const u32 index{IR::GenericPatchIndex(patch)};
|
||||||
const u32 element{IR::GenericPatchElement(patch)};
|
const u32 element{IR::GenericPatchElement(patch)};
|
||||||
const char swizzle{"xyzw"[element]};
|
const char swizzle{"xyzw"[element]};
|
||||||
if (ctx.stage == Stage::TessellationControl) {
|
const std::string_view out{ctx.stage == Stage::TessellationControl ? ".out" : ""};
|
||||||
ctx.Add("MOV.F {},primitive.out.patch.attrib[{}].{};", inst, index, swizzle);
|
ctx.Add("MOV.F {},primitive{}.patch.attrib[{}].{};", inst, out, index, swizzle);
|
||||||
} else {
|
|
||||||
ctx.Add("MOV.F {},primitive.patch.attrib[{}].{};", inst, index, swizzle);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitSetPatch(EmitContext& ctx, IR::Patch patch, ScalarF32 value) {
|
void EmitSetPatch(EmitContext& ctx, IR::Patch patch, ScalarF32 value) {
|
||||||
|
|
Loading…
Reference in a new issue