From ffb5d5d224dba0bdfd9ba8e9d5b00a1e4633012d Mon Sep 17 00:00:00 2001 From: Lakshman Chandu Kondreddy Date: Tue, 16 Dec 2025 18:47:11 +0000 Subject: [PATCH] dri: Add R32F,RG32F,RGBA32F format mappings for DRIImage Add pipe format to sized internal format mappings for R32F, RG32F and RGBA32F in the DRIImage format table. This fixes shader image store operations on EGL images imported from DMA-BUF with respective DRM formats. Without these mappings, DMA-BUF imported textures received base internal formats instead of sized internal formats, causing shader image unit validation to fail and DispatchCompute write zeroes on compute shader imageStore operation. Fixes: 6d3f2664066 ("dri: Add additional 16/32b float/int formats") Signed-off-by: Lakshman Chandu Kondreddy Part-of: --- src/gallium/frontends/dri/dri_util.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gallium/frontends/dri/dri_util.c b/src/gallium/frontends/dri/dri_util.c index fd670f6b577..0d02d3f5ff4 100644 --- a/src/gallium/frontends/dri/dri_util.c +++ b/src/gallium/frontends/dri/dri_util.c @@ -903,6 +903,18 @@ static const struct { .image_format = __DRI_IMAGE_FORMAT_XBGR16161616, .internal_format = GL_RGB16, }, + { + .image_format = PIPE_FORMAT_R32G32B32A32_FLOAT, + .internal_format = GL_RGBA32F, + }, + { + .image_format = PIPE_FORMAT_R32_FLOAT, + .internal_format = GL_R32F, + }, + { + .image_format = PIPE_FORMAT_R32G32_FLOAT, + .internal_format = GL_RG32F, + }, { .image_format = __DRI_IMAGE_FORMAT_ARGB2101010, .internal_format = GL_RGB10_A2,