[gtk/wip/otte/for-main: 5/6] GL renderer: Remove noperspective usage




commit ade7509b974f28871e2a52e9e3da0edff4a0957b
Author: Benjamin Otte <otte redhat com>
Date:   Tue Nov 30 00:30:26 2021 +0100

    GL renderer: Remove noperspective usage
    
    It causes issues with compilation of GLES shaders and isn't in any
    way correct.

 gsk/gl/resources/conic_gradient.glsl  | 4 ++--
 gsk/gl/resources/linear_gradient.glsl | 4 ++--
 gsk/gl/resources/preamble.glsl        | 2 --
 gsk/gl/resources/radial_gradient.glsl | 4 ++--
 4 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/gsk/gl/resources/conic_gradient.glsl b/gsk/gl/resources/conic_gradient.glsl
index 3df33bcb11..f1d33cd6a7 100644
--- a/gsk/gl/resources/conic_gradient.glsl
+++ b/gsk/gl/resources/conic_gradient.glsl
@@ -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.
diff --git a/gsk/gl/resources/linear_gradient.glsl b/gsk/gl/resources/linear_gradient.glsl
index 153d7afc98..fa130be4cb 100644
--- a/gsk/gl/resources/linear_gradient.glsl
+++ b/gsk/gl/resources/linear_gradient.glsl
@@ -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.
diff --git a/gsk/gl/resources/preamble.glsl b/gsk/gl/resources/preamble.glsl
index 8bc007ba67..5f5d2b780a 100644
--- a/gsk/gl/resources/preamble.glsl
+++ b/gsk/gl/resources/preamble.glsl
@@ -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
 
diff --git a/gsk/gl/resources/radial_gradient.glsl b/gsk/gl/resources/radial_gradient.glsl
index 4311fc5d63..59fad00290 100644
--- a/gsk/gl/resources/radial_gradient.glsl
+++ b/gsk/gl/resources/radial_gradient.glsl
@@ -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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]