Module: Mesa Branch: staging/23.0 Commit: da8139e5e4e4b409b3c152f06ad888b817c17052 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=da8139e5e4e4b409b3c152f06ad888b817c17052
Author: Charmaine Lee <[email protected]> Date: Fri Feb 3 21:24:19 2023 -0500 svga: fix compatible formats for shareable surfaces Add typeless format to the compatible format lists for shareable surfaces. Fixes webgl benchmark crash in eglCreateImage running from firefox on Fedora 37. Cc: mesa-stable Reviewed-by: Martin Krastev <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21393> (cherry picked from commit 3a359385cb1560fde560edc74f7a070ef1e3d953) --- .pick_status.json | 2 +- src/gallium/drivers/svga/svga_format.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index d6f4f040fcf..62b52a9702f 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -265,7 +265,7 @@ "description": "svga: fix compatible formats for shareable surfaces", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c index a0af7e3b502..c3ee5ae901f 100644 --- a/src/gallium/drivers/svga/svga_format.c +++ b/src/gallium/drivers/svga/svga_format.c @@ -1438,7 +1438,10 @@ static const struct format_cap format_cap_table[] = { static const SVGA3dSurfaceFormat compat_x8r8g8b8[] = { SVGA3D_X8R8G8B8, SVGA3D_A8R8G8B8, SVGA3D_B8G8R8X8_UNORM, - SVGA3D_B8G8R8A8_UNORM, 0 + SVGA3D_B8G8R8A8_UNORM, SVGA3D_B8G8R8X8_TYPELESS, SVGA3D_B8G8R8A8_TYPELESS, 0 +}; +static const SVGA3dSurfaceFormat compat_r8g8b8a8[] = { + SVGA3D_R8G8B8A8_UNORM, SVGA3D_R8G8B8A8_TYPELESS, 0 }; static const SVGA3dSurfaceFormat compat_r8[] = { SVGA3D_R8_UNORM, SVGA3D_NV12, SVGA3D_YV12, 0 @@ -1453,6 +1456,7 @@ static const SVGA3dSurfaceFormat compat_r5g6b5[] = { static const struct format_compat_entry format_compats[] = { {PIPE_FORMAT_B8G8R8X8_UNORM, compat_x8r8g8b8}, {PIPE_FORMAT_B8G8R8A8_UNORM, compat_x8r8g8b8}, + {PIPE_FORMAT_R8G8B8A8_UNORM, compat_r8g8b8a8}, {PIPE_FORMAT_R8_UNORM, compat_r8}, {PIPE_FORMAT_R8G8_UNORM, compat_g8r8}, {PIPE_FORMAT_B5G6R5_UNORM, compat_r5g6b5}
