v3dv: fix format swizzle for buffer views

Fixes:
dEQP-VK.api.buffer_view.access.uniform_texel_buffer.b8g8r8a8_unorm

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22131>
This commit is contained in:
Iago Toral Quiroga
2023-03-27 11:42:23 +02:00
committed by Marge Bot
parent 3647b05ae9
commit 40a00fc065
2 changed files with 8 additions and 7 deletions

View File

@@ -561,6 +561,3 @@ x11-dEQP-EGL.functional.create_context_ext.robust_gl_31.rgb888_no_depth_no_stenc
x11-dEQP-EGL.functional.create_context_ext.robust_gl_31.rgba8888_depth_no_stencil,Fail
x11-dEQP-EGL.functional.create_context_ext.robust_gl_31.rgba8888_depth_stencil,Fail
x11-dEQP-EGL.functional.create_context_ext.robust_gl_31.rgba8888_no_depth_no_stencil,Fail
# New CTS failures in 1.3.5.0
dEQP-VK.api.buffer_view.access.uniform_texel_buffer.b8g8r8a8_unorm,Fail

View File

@@ -143,10 +143,14 @@ v3dX(pack_texture_shader_state_from_buffer_view)(struct v3dv_device *device,
const struct v3dv_buffer *buffer = buffer_view->buffer;
v3dvx_pack(buffer_view->texture_shader_state, TEXTURE_SHADER_STATE, tex) {
tex.swizzle_r = v3d_translate_pipe_swizzle(PIPE_SWIZZLE_X);
tex.swizzle_g = v3d_translate_pipe_swizzle(PIPE_SWIZZLE_Y);
tex.swizzle_b = v3d_translate_pipe_swizzle(PIPE_SWIZZLE_Z);
tex.swizzle_a = v3d_translate_pipe_swizzle(PIPE_SWIZZLE_W);
tex.swizzle_r =
v3d_translate_pipe_swizzle(buffer_view->format->planes[0].swizzle[0]);
tex.swizzle_g =
v3d_translate_pipe_swizzle(buffer_view->format->planes[0].swizzle[1]);
tex.swizzle_b =
v3d_translate_pipe_swizzle(buffer_view->format->planes[0].swizzle[2]);
tex.swizzle_a =
v3d_translate_pipe_swizzle(buffer_view->format->planes[0].swizzle[3]);
tex.image_depth = 1;