[gtk/wip/baedert/for-master: 11/13] gl renderer: Lower maximum gradient stop count
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 11/13] gl renderer: Lower maximum gradient stop count
- Date: Wed, 23 Sep 2020 04:12:18 +0000 (UTC)
commit a5bd9211d4d192ce185da7ca125e9de03af17050
Author: Timm Bäder <mail baedert org>
Date: Mon Sep 21 21:23:57 2020 +0200
gl renderer: Lower maximum gradient stop count
6 is still plenty according to my market research.
Should help with #2624
gsk/gl/gskglrenderopsprivate.h | 2 +-
gsk/resources/glsl/linear_gradient.glsl | 2 +-
gsk/resources/glsl/radial_gradient.glsl | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gsk/gl/gskglrenderopsprivate.h b/gsk/gl/gskglrenderopsprivate.h
index b4eafea543..b2a574a401 100644
--- a/gsk/gl/gskglrenderopsprivate.h
+++ b/gsk/gl/gskglrenderopsprivate.h
@@ -14,7 +14,7 @@
#define GL_N_VERTICES 6
#define GL_N_PROGRAMS 14
-#define GL_MAX_GRADIENT_STOPS 8
+#define GL_MAX_GRADIENT_STOPS 6
typedef struct
{
diff --git a/gsk/resources/glsl/linear_gradient.glsl b/gsk/resources/glsl/linear_gradient.glsl
index dea01344f0..e0a75b5b42 100644
--- a/gsk/resources/glsl/linear_gradient.glsl
+++ b/gsk/resources/glsl/linear_gradient.glsl
@@ -1,7 +1,7 @@
// VERTEX_SHADER
uniform vec2 u_start_point;
uniform vec2 u_end_point;
-uniform float u_color_stops[8 * 5];
+uniform float u_color_stops[6 * 5];
uniform int u_num_color_stops;
_OUT_ vec2 startPoint;
diff --git a/gsk/resources/glsl/radial_gradient.glsl b/gsk/resources/glsl/radial_gradient.glsl
index 9d8be275b3..e4b36e29a8 100644
--- a/gsk/resources/glsl/radial_gradient.glsl
+++ b/gsk/resources/glsl/radial_gradient.glsl
@@ -1,7 +1,7 @@
// VERTEX_SHADER
uniform float u_start;
uniform float u_end;
-uniform float u_color_stops[8 * 5];
+uniform float u_color_stops[6 * 5];
uniform int u_num_color_stops;
uniform vec2 u_radius;
uniform vec2 u_center;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]