From 0b5b93053d5f427c668a2494c52adfd468cf5728 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Wed, 30 Oct 2019 18:17:27 -0300 Subject: shader_ir/other: Implement S2R InvocationId --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/video_core/renderer_opengl') diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 3d3cd21f3..9700c2ebe 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -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>, -- cgit v1.2.3