From bba4785f60401ef99b7158fed0d3562a112d6f06 Mon Sep 17 00:00:00 2001 From: Ryan Mckeever Date: Thu, 5 Jun 2025 16:34:12 -0700 Subject: [PATCH] pan/format: Add render target support for R8G8B8/B8G8R8 formats Add render target support to the existing R8G8B8/B8G8R8 formats and add the B8G8R8_UNORM format. Signed-off-by: Ryan Mckeever Reviewed-by: Eric R. Smith Reviewed-by: Erik Faye-Lund Part-of: --- src/panfrost/ci/panfrost-g52-fails.txt | 16 ++++++++++++++++ src/panfrost/ci/panfrost-g610-fails.txt | 16 ++++++++++++++++ src/panfrost/ci/panfrost-g720-fails.txt | 16 ++++++++++++++++ src/panfrost/ci/panfrost-g725-fails.txt | 16 ++++++++++++++++ src/panfrost/lib/pan_format.c | 7 ++++--- 5 files changed, 68 insertions(+), 3 deletions(-) diff --git a/src/panfrost/ci/panfrost-g52-fails.txt b/src/panfrost/ci/panfrost-g52-fails.txt index 177163518ab..c8f050c80c5 100644 --- a/src/panfrost/ci/panfrost-g52-fails.txt +++ b/src/panfrost/ci/panfrost-g52-fails.txt @@ -545,6 +545,22 @@ dEQP-VK.draw.dynamic_rendering.primary_cmd_buff.indexed_draw.draw_instanced_inde dEQP-VK.draw.dynamic_rendering.primary_cmd_buff.indexed_draw.draw_instanced_indexed_triangle_strip_with_alloc_offset,Fail dEQP-VK.draw.dynamic_rendering.primary_cmd_buff.indexed_draw.draw_instanced_indexed_triangle_strip_with_bind_offset_with_alloc_offset,Fail +# CTS bug, see https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5700 +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign_linear,Fail + +# CTS bug, see https://github.com/KhronosGroup/VK-GL-CTS/issues/523 +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign_uniform,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign_uniform_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign_uniform,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign_uniform_linear,Fail + dEQP-VK.rasterization.rasterization_order_attachment_access.depth.samples_1.multi_draw_barriers,Crash dEQP-VK.rasterization.rasterization_order_attachment_access.depth.samples_4.multi_draw_barriers,Crash dEQP-VK.rasterization.rasterization_order_attachment_access.stencil.samples_1.multi_draw_barriers,Crash diff --git a/src/panfrost/ci/panfrost-g610-fails.txt b/src/panfrost/ci/panfrost-g610-fails.txt index 79766b65fd7..3baa2108dbf 100644 --- a/src/panfrost/ci/panfrost-g610-fails.txt +++ b/src/panfrost/ci/panfrost-g610-fails.txt @@ -3,3 +3,19 @@ spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread,Cras afbcp-spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread,Crash dEQP-VK.glsl.loops.special.do_while_dynamic_iterations.dowhile_trap_vertex,Crash + +# CTS bug, see https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5700 +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign_linear,Fail + +# CTS bug, see https://github.com/KhronosGroup/VK-GL-CTS/issues/523 +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign_uniform,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign_uniform_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign_uniform,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign_uniform_linear,Fail diff --git a/src/panfrost/ci/panfrost-g720-fails.txt b/src/panfrost/ci/panfrost-g720-fails.txt index 1c602058c60..660ad34dd85 100644 --- a/src/panfrost/ci/panfrost-g720-fails.txt +++ b/src/panfrost/ci/panfrost-g720-fails.txt @@ -2,3 +2,19 @@ spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread,Crash dEQP-VK.glsl.loops.special.do_while_dynamic_iterations.dowhile_trap_vertex,Crash + +# CTS bug, see https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5700 +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign_linear,Fail + +# CTS bug, see https://github.com/KhronosGroup/VK-GL-CTS/issues/523 +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign_uniform,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign_uniform_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign_uniform,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign_uniform_linear,Fail diff --git a/src/panfrost/ci/panfrost-g725-fails.txt b/src/panfrost/ci/panfrost-g725-fails.txt index 41240417abb..7a78c40cb8f 100644 --- a/src/panfrost/ci/panfrost-g725-fails.txt +++ b/src/panfrost/ci/panfrost-g725-fails.txt @@ -1,2 +1,18 @@ # uprev Piglit in Mesa spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread,Crash + +# CTS bug, see https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5700 +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign_linear,Fail + +# CTS bug, see https://github.com/KhronosGroup/VK-GL-CTS/issues/523 +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign_uniform,Fail +dEQP-VK.image.load_store.without_any_format.buffer.b8g8r8_srgb_minalign_uniform_linear,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign_uniform,Fail +dEQP-VK.image.load_store.without_any_format.buffer.r8g8b8_srgb_minalign_uniform_linear,Fail diff --git a/src/panfrost/lib/pan_format.c b/src/panfrost/lib/pan_format.c index a4539a5b71d..78ebd000f46 100644 --- a/src/panfrost/lib/pan_format.c +++ b/src/panfrost/lib/pan_format.c @@ -420,7 +420,8 @@ const struct pan_format GENX(pan_pipe_format)[PIPE_FORMAT_COUNT] = { FMT(R16_UNORM, R16_UNORM, R001, L, VTR_I), FMT(R8G8_UNORM, RG8_UNORM, RG01, L, VTR_I), FMT(R16G16_UNORM, RG16_UNORM, RG01, L, VTR_I), - FMT(R8G8B8_UNORM, RGB8_UNORM, RGB1, L, V____), + FMT(R8G8B8_UNORM, RGB8_UNORM, RGB1, L, VTR_I), + FMT(B8G8R8_UNORM, RGB8_UNORM, BGR1, L, VTR_I), /* 32-bit NORM is not texturable in v7 onwards. It's renderable * everywhere, but rendering without texturing is not useful. @@ -483,8 +484,8 @@ const struct pan_format GENX(pan_pipe_format)[PIPE_FORMAT_COUNT] = { FMT(L8_SRGB, R8_UNORM, RRR1, S, VTR_I), FMT(R8_SRGB, R8_UNORM, R001, S, VTR_I), FMT(R8G8_SRGB, RG8_UNORM, RG01, S, VTR_I), - FMT(R8G8B8_SRGB, RGB8_UNORM, RGB1, S, V____), - FMT(B8G8R8_SRGB, RGB8_UNORM, BGR1, S, V____), + FMT(R8G8B8_SRGB, RGB8_UNORM, RGB1, S, VTR_I), + FMT(B8G8R8_SRGB, RGB8_UNORM, BGR1, S, VTR_I), FMT(R8G8B8A8_SRGB, RGBA8_UNORM, RGBA, S, VTR_I), FMT(A8B8G8R8_SRGB, RGBA8_UNORM, ABGR, S, VTR_I), FMT(X8B8G8R8_SRGB, RGBA8_UNORM, ABG1, S, VTR_I),