[3/3] libcamera: egl: Fix eGLImage() constructor stride calculation
diff mbox series

Message ID 20251122205507.37387-4-johannes.goede@oss.qualcomm.com
State New
Headers show
Series
  • GPUISP fixes
Related show

Commit Message

Hans de Goede Nov. 22, 2025, 8:55 p.m. UTC
The mimimum stride is width * bpp / 8 not width * bpp.

Correct this to fix setting the stride to a value which is
8 times too large.

Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
---
This can be squashed into "libcamera: software_isp: egl: Add a eGL base
helper class"
---
 include/libcamera/internal/egl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h
index e61a394a..5b7cb248 100644
--- a/include/libcamera/internal/egl.h
+++ b/include/libcamera/internal/egl.h
@@ -75,7 +75,7 @@  public:
 	 */
 	eGLImage(uint32_t width, uint32_t height, uint32_t bpp, GLenum texture_unit, uint32_t texture_unit_uniform_id)
 	{
-		uint32_t stride = libcamera::utils::alignUp(width * bpp, 256);
+		uint32_t stride = libcamera::utils::alignUp(width * bpp / 8, 256);
 
 		init(width, height, bpp, stride, texture_unit, texture_unit_uniform_id);
 	}