[v2,35/37] libcamera: shaders: Rename bayer_8 to bayer_unpacked
diff mbox series

Message ID 20250824-b4-v0-5-2-gpuisp-v2-a-v2-35-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
From: Milan Zamazal <mzamazal@redhat.com>

bayer_8.* shaders are now used for all unpacked sensor data formats,
regardless of the pixel bit width.  Let's rename the "8-bit" shaders to
avoid confusion.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 .../shaders/{bayer_8.frag => bayer_unpacked.frag}        |  0
 .../shaders/{bayer_8.vert => bayer_unpacked.vert}        |  0
 include/libcamera/internal/shaders/meson.build           |  4 ++--
 src/apps/qcam/assets/shader/shaders.qrc                  |  4 ++--
 src/apps/qcam/viewfinder_gl.cpp                          | 16 ++++++++--------
 5 files changed, 12 insertions(+), 12 deletions(-)

Patch
diff mbox series

diff --git a/include/libcamera/internal/shaders/bayer_8.frag b/include/libcamera/internal/shaders/bayer_unpacked.frag
similarity index 100%
rename from include/libcamera/internal/shaders/bayer_8.frag
rename to include/libcamera/internal/shaders/bayer_unpacked.frag
diff --git a/include/libcamera/internal/shaders/bayer_8.vert b/include/libcamera/internal/shaders/bayer_unpacked.vert
similarity index 100%
rename from include/libcamera/internal/shaders/bayer_8.vert
rename to include/libcamera/internal/shaders/bayer_unpacked.vert
diff --git a/include/libcamera/internal/shaders/meson.build b/include/libcamera/internal/shaders/meson.build
index 386b342d03b106e8303121ae9b84b2d2ee4e96d8..dd441a5776700f6ffc17eb9e73652d728aee02c9 100644
--- a/include/libcamera/internal/shaders/meson.build
+++ b/include/libcamera/internal/shaders/meson.build
@@ -4,7 +4,7 @@ 
 # for the purposes of inclusion in OpenGL debayering
 shader_files = files([
     'bayer_1x_packed.frag',
-    'bayer_8.frag',
-    'bayer_8.vert',
+    'bayer_unpacked.frag',
+    'bayer_unpacked.vert',
     'identity.vert',
 ])
diff --git a/src/apps/qcam/assets/shader/shaders.qrc b/src/apps/qcam/assets/shader/shaders.qrc
index 04f9d7061b16d0bcd6c1fe1aceeaac97bf0fc295..32dfa51bfef01b3a80a4255fe83807f9b76cdbf5 100644
--- a/src/apps/qcam/assets/shader/shaders.qrc
+++ b/src/apps/qcam/assets/shader/shaders.qrc
@@ -6,8 +6,8 @@ 
 	<file>../../../../../include/libcamera/internal/shaders/YUV_3_planes.frag</file>
 	<file>../../../../../include/libcamera/internal/shaders/YUV_packed.frag</file>
 	<file>../../../../../include/libcamera/internal/shaders/bayer_1x_packed.frag</file>
-	<file>../../../../../include/libcamera/internal/shaders/bayer_8.frag</file>
-	<file>../../../../../include/libcamera/internal/shaders/bayer_8.vert</file>
+	<file>../../../../../include/libcamera/internal/shaders/bayer_unpacked.frag</file>
+	<file>../../../../../include/libcamera/internal/shaders/bayer_unpacked.vert</file>
 	<file>../../../../../include/libcamera/internal/shaders/identity.vert</file>
 </qresource>
 </RCC>
diff --git a/src/apps/qcam/viewfinder_gl.cpp b/src/apps/qcam/viewfinder_gl.cpp
index 70f600650b7b925f10d2f699e6498a6cbd0a238a..95965ab7170e5ea951869dda83537ed0bca9978d 100644
--- a/src/apps/qcam/viewfinder_gl.cpp
+++ b/src/apps/qcam/viewfinder_gl.cpp
@@ -235,29 +235,29 @@  bool ViewFinderGL::selectFormat(const libcamera::PixelFormat &format)
 	case libcamera::formats::SBGGR8:
 		firstRed_.setX(1.0);
 		firstRed_.setY(1.0);
-		vertexShaderFile_ = ":include/libcamera/internal/shaders/bayer_8.vert";
-		fragmentShaderFile_ = ":include/libcamera/internal/shaders/bayer_8.frag";
+		vertexShaderFile_ = ":include/libcamera/internal/shaders/bayer_unpacked.vert";
+		fragmentShaderFile_ = ":include/libcamera/internal/shaders/bayer_unpacked.frag";
 		textureMinMagFilters_ = GL_NEAREST;
 		break;
 	case libcamera::formats::SGBRG8:
 		firstRed_.setX(0.0);
 		firstRed_.setY(1.0);
-		vertexShaderFile_ = ":include/libcamera/internal/shaders/bayer_8.vert";
-		fragmentShaderFile_ = ":include/libcamera/internal/shaders/bayer_8.frag";
+		vertexShaderFile_ = ":include/libcamera/internal/shaders/bayer_unpacked.vert";
+		fragmentShaderFile_ = ":include/libcamera/internal/shaders/bayer_unpacked.frag";
 		textureMinMagFilters_ = GL_NEAREST;
 		break;
 	case libcamera::formats::SGRBG8:
 		firstRed_.setX(1.0);
 		firstRed_.setY(0.0);
-		vertexShaderFile_ = ":include/libcamera/internal/shaders/bayer_8.vert";
-		fragmentShaderFile_ = ":include/libcamera/internal/shaders/bayer_8.frag";
+		vertexShaderFile_ = ":include/libcamera/internal/shaders/bayer_unpacked.vert";
+		fragmentShaderFile_ = ":include/libcamera/internal/shaders/bayer_unpacked.frag";
 		textureMinMagFilters_ = GL_NEAREST;
 		break;
 	case libcamera::formats::SRGGB8:
 		firstRed_.setX(0.0);
 		firstRed_.setY(0.0);
-		vertexShaderFile_ = ":include/libcamera/internal/shaders/bayer_8.vert";
-		fragmentShaderFile_ = ":include/libcamera/internal/shaders/bayer_8.frag";
+		vertexShaderFile_ = ":include/libcamera/internal/shaders/bayer_unpacked.vert";
+		fragmentShaderFile_ = ":include/libcamera/internal/shaders/bayer_unpacked.frag";
 		textureMinMagFilters_ = GL_NEAREST;
 		break;
 	case libcamera::formats::SBGGR10_CSI2P: