[gtk: 1/2] ngl: Fix crash with intel driver on Windows when compiling shaders
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] ngl: Fix crash with intel driver on Windows when compiling shaders
- Date: Thu, 25 Mar 2021 12:37:14 +0000 (UTC)
commit 086e1ed39f1d4d3b27398d23f0573be6a7a0b7ee
Author: Xavier Claessens <xavier claessens collabora com>
Date: Wed Mar 24 09:30:02 2021 -0400
ngl: Fix crash with intel driver on Windows when compiling shaders
Fixes #3783.
gsk/ngl/resources/conic_gradient.glsl | 5 ++++-
gsk/ngl/resources/linear_gradient.glsl | 5 ++++-
gsk/ngl/resources/radial_gradient.glsl | 5 ++++-
3 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/gsk/ngl/resources/conic_gradient.glsl b/gsk/ngl/resources/conic_gradient.glsl
index 3a26cf9563..3df33bcb11 100644
--- a/gsk/ngl/resources/conic_gradient.glsl
+++ b/gsk/ngl/resources/conic_gradient.glsl
@@ -32,7 +32,10 @@ uniform float u_color_stops[MAX_COLOR_STOPS * 5];
_NOPERSPECTIVE_ _IN_ vec2 coord;
float get_offset(int index) {
- return u_color_stops[5 * index];
+ // u_color_stops[5 * index] makes Intel Windows driver crash.
+ // See https://gitlab.gnome.org/GNOME/gtk/-/issues/3783
+ int base = 5 * index;
+ return u_color_stops[base];
}
vec4 get_color(int index) {
diff --git a/gsk/ngl/resources/linear_gradient.glsl b/gsk/ngl/resources/linear_gradient.glsl
index c4dfb53722..153d7afc98 100644
--- a/gsk/ngl/resources/linear_gradient.glsl
+++ b/gsk/ngl/resources/linear_gradient.glsl
@@ -56,7 +56,10 @@ uniform bool u_repeat;
_NOPERSPECTIVE_ _IN_ vec4 info;
float get_offset(int index) {
- return u_color_stops[5 * index];
+ // u_color_stops[5 * index] makes Intel Windows driver crash.
+ // See https://gitlab.gnome.org/GNOME/gtk/-/issues/3783
+ int base = 5 * index;
+ return u_color_stops[base];
}
vec4 get_color(int index) {
diff --git a/gsk/ngl/resources/radial_gradient.glsl b/gsk/ngl/resources/radial_gradient.glsl
index 5990b39a84..4311fc5d63 100644
--- a/gsk/ngl/resources/radial_gradient.glsl
+++ b/gsk/ngl/resources/radial_gradient.glsl
@@ -35,7 +35,10 @@ uniform float u_color_stops[MAX_COLOR_STOPS * 5];
_NOPERSPECTIVE_ _IN_ vec2 coord;
float get_offset(int index) {
- return u_color_stops[5 * index];
+ // u_color_stops[5 * index] makes Intel Windows driver crash.
+ // See https://gitlab.gnome.org/GNOME/gtk/-/issues/3783
+ int base = 5 * index;
+ return u_color_stops[base];
}
vec4 get_color(int index) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]