v3d: v3d_resource Use LINEAR layout for importing with INVALID modifier

v3d_resource_from_handle when importing a DRM_FORMAT_MOD_INVALID
considered that if we had a render-only device the resource layout was
linear and if we didn't have render-only the resource layout was tiled.

This change honors the resource creation with the SCANOUT flag
independently of the availability of the render-only for the
DRM_FORMAT_MOD_INVALID modifier.

It also fixes most of the failing piglit text for:

spec@ext_image_dma_buf_import@ext_image_dma_buf_import.*

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11594
Cc: mesa-stable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30946>
This commit is contained in:
Jose Maria Casanova Crespo
2024-08-28 21:58:09 +02:00
parent 9a213b882e
commit 5fed6bee19
3 changed files with 2 additions and 43 deletions
-21
View File
@@ -199,29 +199,8 @@ spec@ext_framebuffer_multisample@interpolation 2 centroid-edges,Fail
spec@ext_framebuffer_multisample@interpolation 4 centroid-edges,Fail
spec@ext_framebuffer_object@getteximage-formats init-by-clear-and-render,Fail
spec@ext_framebuffer_object@getteximage-formats init-by-rendering,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-export,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R16-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_argb8888,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_nv12,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_nv21,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p010,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p012,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p016,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_uyvy,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_vyuy,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_xrgb8888,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y210,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y212,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y216,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y412,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y416,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuv420,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuyv,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvu420,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvyu,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-as-r8-gr88,Fail
spec@ext_packed_depth_stencil@texwrap formats bordercolor,Fail
spec@ext_packed_depth_stencil@texwrap formats bordercolor-swizzled,Fail
spec@ext_packed_depth_stencil@texwrap formats bordercolor-swizzled@GL_DEPTH24_STENCIL8- swizzled- border color only,Fail
-21
View File
@@ -188,29 +188,8 @@ spec@ext_framebuffer_multisample@interpolation 2 centroid-edges,Fail
spec@ext_framebuffer_multisample@interpolation 4 centroid-edges,Fail
spec@ext_framebuffer_object@getteximage-formats init-by-clear-and-render,Fail
spec@ext_framebuffer_object@getteximage-formats init-by-rendering,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-export,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers@autogen-R16-DRM_FORMAT_MOD_LINEAR-clear_reimport,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_argb8888,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_nv12,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_nv21,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p010,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p012,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p016,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_uyvy,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_vyuy,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_xrgb8888,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y210,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y212,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y216,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y412,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y416,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuv420,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuyv,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvu420,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvyu,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-as-r8-gr88,Fail
spec@ext_packed_depth_stencil@texwrap formats bordercolor,Fail
spec@ext_packed_depth_stencil@texwrap formats bordercolor-swizzled,Fail
spec@ext_packed_depth_stencil@texwrap formats bordercolor-swizzled@GL_DEPTH24_STENCIL8- swizzled- border color only,Fail
+2 -1
View File
@@ -842,6 +842,7 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen,
v3d_setup_slices(rsc, 0, tmpl->bind & PIPE_BIND_SHARED);
if (screen->ro && (tmpl->bind & PIPE_BIND_SCANOUT)) {
assert(!rsc->tiled);
struct winsys_handle handle;
struct pipe_resource scanout_tmpl = {
.target = prsc->target,
@@ -912,7 +913,7 @@ v3d_resource_from_handle(struct pipe_screen *pscreen,
rsc->tiled = true;
break;
case DRM_FORMAT_MOD_INVALID:
rsc->tiled = screen->ro == NULL;
rsc->tiled = false;
break;
default:
switch(fourcc_mod_broadcom_mod(whandle->modifier)) {