shader_ir/other: Implement S2R InvocationId

This commit is contained in:
ReinUsesLisp 2019-10-30 18:17:27 -03:00
parent ecbfa416f0
commit 0b5b93053d
No known key found for this signature in database
GPG key ID: 2DFC508897B39CFE
4 changed files with 9 additions and 0 deletions

View file

@ -1915,6 +1915,10 @@ private:
return {};
}
Expression InvocationId(Operation operation) {
return {"gl_InvocationID", Type::Int};
}
Expression YNegate(Operation operation) {
return {"y_direction", Type::Float};
}
@ -2153,6 +2157,7 @@ private:
&GLSLDecompiler::EmitVertex,
&GLSLDecompiler::EndPrimitive,
&GLSLDecompiler::InvocationId,
&GLSLDecompiler::YNegate,
&GLSLDecompiler::LocalInvocationId<0>,
&GLSLDecompiler::LocalInvocationId<1>,