summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 713eded6d..d437afad1 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -1513,6 +1513,16 @@ private:
return "uintBitsToFloat(config_pack[2])";
}
+ template <u32 element>
+ std::string LocalInvocationId(Operation) {
+ return "utof(gl_LocalInvocationID"s + GetSwizzle(element) + ')';
+ }
+
+ template <u32 element>
+ std::string WorkGroupId(Operation) {
+ return "utof(gl_WorkGroupID"s + GetSwizzle(element) + ')';
+ }
+
static constexpr OperationDecompilersArray operation_decompilers = {
&GLSLDecompiler::Assign,
@@ -1652,6 +1662,12 @@ private:
&GLSLDecompiler::EndPrimitive,
&GLSLDecompiler::YNegate,
+ &GLSLDecompiler::LocalInvocationId<0>,
+ &GLSLDecompiler::LocalInvocationId<1>,
+ &GLSLDecompiler::LocalInvocationId<2>,
+ &GLSLDecompiler::WorkGroupId<0>,
+ &GLSLDecompiler::WorkGroupId<1>,
+ &GLSLDecompiler::WorkGroupId<2>,
};
std::string GetRegister(u32 index) const {