ngl: Fix crash with intel driver on Windows when compiling shaders

Fixes #3783.
This commit is contained in:
Xavier Claessens 2021-03-24 09:30:02 -04:00
parent 5531906973
commit 086e1ed39f
3 changed files with 12 additions and 3 deletions

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {