From b774b615d273f2948f2d9a9d13fe5ca1c3d04119 Mon Sep 17 00:00:00 2001 From: James Hogan Date: Fri, 24 Jan 2025 17:40:22 +0000 Subject: [PATCH] glsl: Expose gl_ViewID_OVR back to GLSL 1.30 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OVR_multiview requires OpenGL 3.0, so expose gl_ViewID_OVR builtin back to GLSL 1.30 on OpenGL. v2: Minor whitespace fix Fixes: 328c29d6007 ("mesa,glsl,gallium: add GL_OVR_multiview") Signed-off-by: James Hogan Reviewed-By: Mike Blumenkrantz Reviewed-by: Zoltán Böszörményi Part-of: --- src/compiler/glsl/builtin_variables.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp index 40e48eefb8d..2ee428bdd66 100644 --- a/src/compiler/glsl/builtin_variables.cpp +++ b/src/compiler/glsl/builtin_variables.cpp @@ -1130,7 +1130,7 @@ builtin_variable_generator::generate_special_vars() add_system_value(SYSTEM_VALUE_SUBGROUP_LE_MASK, uvec4_t, "gl_SubgroupLeMask"); add_system_value(SYSTEM_VALUE_SUBGROUP_LT_MASK, uvec4_t, "gl_SubgroupLtMask"); } - if (state->is_version(300, 300) && state->OVR_multiview_enable){ + if (state->is_version(130, 300) && state->OVR_multiview_enable) { add_system_value(SYSTEM_VALUE_VIEW_INDEX, int_t, GLSL_PRECISION_MEDIUM, "gl_ViewID_OVR"); }