mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 09:12:46 +01:00
glasm: Implement InvocationId
This commit is contained in:
parent
679e7146a7
commit
d5db96386d
2 changed files with 5 additions and 2 deletions
|
@ -77,6 +77,9 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile
|
||||||
if (stage == Stage::Geometry && info.loads_position) {
|
if (stage == Stage::Geometry && info.loads_position) {
|
||||||
Add("ATTRIB vertex_position=vertex.position;");
|
Add("ATTRIB vertex_position=vertex.position;");
|
||||||
}
|
}
|
||||||
|
if (info.uses_invocation_id) {
|
||||||
|
Add("ATTRIB primitive_invocation=primitive.invocation;");
|
||||||
|
}
|
||||||
for (size_t index = 0; index < program.info.stores_frag_color.size(); ++index) {
|
for (size_t index = 0; index < program.info.stores_frag_color.size(); ++index) {
|
||||||
if (!program.info.stores_frag_color[index]) {
|
if (!program.info.stores_frag_color[index]) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -160,8 +160,8 @@ void EmitLocalInvocationId(EmitContext& ctx, IR::Inst& inst) {
|
||||||
ctx.Add("MOV.S {},invocation.localid;", inst);
|
ctx.Add("MOV.S {},invocation.localid;", inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitInvocationId(EmitContext& ctx) {
|
void EmitInvocationId(EmitContext& ctx, IR::Inst& inst) {
|
||||||
NotImplemented();
|
ctx.Add("MOV.S {}.x,primitive_invocation.x;", inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitSampleId(EmitContext& ctx) {
|
void EmitSampleId(EmitContext& ctx) {
|
||||||
|
|
Loading…
Reference in a new issue