Merge branch 'shader' into 'master'

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

Closes #3783

See merge request GNOME/gtk!3344
This commit is contained in:
Matthias Clasen 2021-03-25 12:37:12 +00:00
commit bd7df4b816
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) {