GL renderer: Remove noperspective usage
authorBenjamin Otte <otte@redhat.com>
Mon, 29 Nov 2021 23:30:26 +0000 (00:30 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 30 Nov 2021 13:12:10 +0000 (14:12 +0100)
It causes issues with compilation of GLES shaders and isn't in any
way correct.

gsk/gl/resources/conic_gradient.glsl
gsk/gl/resources/linear_gradient.glsl
gsk/gl/resources/preamble.glsl
gsk/gl/resources/radial_gradient.glsl

index 3df33bcb1182ee11fbe2afacbd3ddceb2c7f2bde..f1d33cd6a70d1429003e8c075603bcea94a4f478 100644 (file)
@@ -3,7 +3,7 @@
 
 uniform vec4 u_geometry;
 
-_NOPERSPECTIVE_ _OUT_ vec2 coord;
+_OUT_ vec2 coord;
 
 void main() {
   gl_Position = u_projection * (u_modelview * vec4(aPosition, 0.0, 1.0));
@@ -29,7 +29,7 @@ uniform highp int u_num_color_stops; // Why? Because it works like this.
 uniform vec4 u_geometry;
 uniform float u_color_stops[MAX_COLOR_STOPS * 5];
 
-_NOPERSPECTIVE_ _IN_ vec2 coord;
+_IN_ vec2 coord;
 
 float get_offset(int index) {
   // u_color_stops[5 * index] makes Intel Windows driver crash.
index 153d7afc980b8169d7bdd40099841cdd8b3889df..fa130be4cb07626ba850955f586bee2b4a260d18 100644 (file)
@@ -2,7 +2,7 @@
 // linear_gradient.glsl
 uniform vec4 u_points;
 
-_NOPERSPECTIVE_ _OUT_ vec4 info;
+_OUT_ vec4 info;
 
 void main() {
   gl_Position = u_projection * (u_modelview * vec4(aPosition, 0.0, 1.0));
@@ -53,7 +53,7 @@ uniform highp int u_num_color_stops; // Why? Because it works like this.
 uniform float u_color_stops[MAX_COLOR_STOPS * 5];
 uniform bool u_repeat;
 
-_NOPERSPECTIVE_ _IN_ vec4 info;
+_IN_ vec4 info;
 
 float get_offset(int index) {
   // u_color_stops[5 * index] makes Intel Windows driver crash.
index 8bc007ba67685a17e90d451496fb6cb779e3d7e7..5f5d2b780a172e6d5702f5cd1b65769324ce28b1 100644 (file)
@@ -5,12 +5,10 @@ precision highp float;
 #if defined(GSK_GLES) || defined(GSK_LEGACY)
 #define _OUT_ varying
 #define _IN_ varying
-#define _NOPERSPECTIVE_
 #define _GSK_ROUNDED_RECT_UNIFORM_ vec4[3]
 #else
 #define _OUT_ out
 #define _IN_ in
-#define _NOPERSPECTIVE_ noperspective
 #define _GSK_ROUNDED_RECT_UNIFORM_ GskRoundedRect
 #endif
 
index 4311fc5d6304205a4176c6248a79aae4341b0cdc..59fad002908c4ed600807828c49e3399e4aa0d4d 100644 (file)
@@ -3,7 +3,7 @@
 
 uniform vec4 u_geometry;
 
-_NOPERSPECTIVE_ _OUT_ vec2 coord;
+_OUT_ vec2 coord;
 
 void main() {
   gl_Position = u_projection * (u_modelview * vec4(aPosition, 0.0, 1.0));
@@ -32,7 +32,7 @@ uniform bool u_repeat;
 uniform vec2 u_range;
 uniform float u_color_stops[MAX_COLOR_STOPS * 5];
 
-_NOPERSPECTIVE_ _IN_ vec2 coord;
+_IN_ vec2 coord;
 
 float get_offset(int index) {
   // u_color_stops[5 * index] makes Intel Windows driver crash.