From d74855fe9fbb62a66baff7f00fc47ba5c31ec2aa Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 26 Jan 2024 12:16:43 +0100 Subject: [PATCH] gpu: Don't use layout binding in old GL versions GL needs version 4.2 before it supports explicit bindings. We use GLES usually, and Mesa supports GL 4.6, so we didn't hit this case before. However, MacOS does use GL and Mac OS is stuck on GL 4.1. Fixes #6363 --- gsk/gpu/shaders/common-gl.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gsk/gpu/shaders/common-gl.glsl b/gsk/gpu/shaders/common-gl.glsl index e5e30c0e46..98becb7867 100644 --- a/gsk/gpu/shaders/common-gl.glsl +++ b/gsk/gpu/shaders/common-gl.glsl @@ -1,6 +1,6 @@ precision highp float; -#if defined(GSK_GLES) && __VERSION__ < 310 +#if __VERSION__ < 420 || (defined(GSK_GLES) && __VERSION__ < 310) layout(std140) #else layout(std140, binding = 0) @@ -17,7 +17,7 @@ uniform PushConstants #define GSK_GLOBAL_CLIP_RECT push.clip[0] #define GSK_GLOBAL_SCALE push.scale -#if defined(GSK_GLES) && __VERSION__ < 310 +#if __VERSION__ < 420 || (defined(GSK_GLES) && __VERSION__ < 310) layout(std140) #else layout(std140, binding = 1)