[v2,27/37] libcamera: shaders: Use highp not mediump for float precision
diff mbox series

Message ID 20250824-b4-v0-5-2-gpuisp-v2-a-v2-27-96f4576c814e@linaro.org
State New
Headers show
Series
  • Add GLES 2.0 GPUISP to libcamera
Related show

Commit Message

Bryan O'Donoghue Aug. 24, 2025, 12:48 a.m. UTC
We get better sample resolution with highp instead of mediump.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 include/libcamera/internal/shaders/RGB.frag             | 2 +-
 include/libcamera/internal/shaders/YUV_2_planes.frag    | 2 +-
 include/libcamera/internal/shaders/YUV_3_planes.frag    | 2 +-
 include/libcamera/internal/shaders/YUV_packed.frag      | 2 +-
 include/libcamera/internal/shaders/bayer_1x_packed.frag | 2 +-
 include/libcamera/internal/shaders/bayer_8.frag         | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

Patch
diff mbox series

diff --git a/include/libcamera/internal/shaders/RGB.frag b/include/libcamera/internal/shaders/RGB.frag
index 4c374ac980958281506771d30584dc56f10735bb..7243958941cfed1e5e7f203173864e46ac07fed3 100644
--- a/include/libcamera/internal/shaders/RGB.frag
+++ b/include/libcamera/internal/shaders/RGB.frag
@@ -6,7 +6,7 @@ 
  */
 
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 varying vec2 textureOut;
diff --git a/include/libcamera/internal/shaders/YUV_2_planes.frag b/include/libcamera/internal/shaders/YUV_2_planes.frag
index 1d5d1206248f3a53e5e0c93c3a3ce6eba73e4437..d286f1179f7b998dd2f9f0406a68c5b45cccddce 100644
--- a/include/libcamera/internal/shaders/YUV_2_planes.frag
+++ b/include/libcamera/internal/shaders/YUV_2_planes.frag
@@ -6,7 +6,7 @@ 
  */
 
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 varying vec2 textureOut;
diff --git a/include/libcamera/internal/shaders/YUV_3_planes.frag b/include/libcamera/internal/shaders/YUV_3_planes.frag
index 8f788e90a6f86a584673c5706caaaf2bca25c97a..8e3e0b4a57039142d9741a0be8a6d71475d134a5 100644
--- a/include/libcamera/internal/shaders/YUV_3_planes.frag
+++ b/include/libcamera/internal/shaders/YUV_3_planes.frag
@@ -6,7 +6,7 @@ 
  */
 
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 varying vec2 textureOut;
diff --git a/include/libcamera/internal/shaders/YUV_packed.frag b/include/libcamera/internal/shaders/YUV_packed.frag
index b9ef9d41beaebdbeb04901b51d77696e28f7c6b7..3c9e3e397ada3eea7e3e31f12559e2fd92bb5026 100644
--- a/include/libcamera/internal/shaders/YUV_packed.frag
+++ b/include/libcamera/internal/shaders/YUV_packed.frag
@@ -6,7 +6,7 @@ 
  */
 
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 varying vec2 textureOut;
diff --git a/include/libcamera/internal/shaders/bayer_1x_packed.frag b/include/libcamera/internal/shaders/bayer_1x_packed.frag
index f53f5575802628d79c03c83a0565cee2d51429bd..19b13ad08b3a71e408774dbb8e75ca4e22d9ba8e 100644
--- a/include/libcamera/internal/shaders/bayer_1x_packed.frag
+++ b/include/libcamera/internal/shaders/bayer_1x_packed.frag
@@ -20,7 +20,7 @@ 
  */
 
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 /*
diff --git a/include/libcamera/internal/shaders/bayer_8.frag b/include/libcamera/internal/shaders/bayer_8.frag
index 7e35ca88e7ff516e81b751382e4e3e463c2c36fa..aa7a1b00436ae15d2ed6af7d666441d20db6bb0b 100644
--- a/include/libcamera/internal/shaders/bayer_8.frag
+++ b/include/libcamera/internal/shaders/bayer_8.frag
@@ -16,7 +16,7 @@  Copyright (C) 2021, Linaro
 
 //Pixel Shader
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 /** Monochrome RGBA or GL_LUMINANCE Bayer encoded texture.*/