zink: fix linear modifier dmabuf imports

these are disguised as INVALID modifiers, but really they're LINEAR

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25002>
This commit is contained in:
Mike Blumenkrantz
2023-09-01 13:23:32 -04:00
committed by Marge Bot
parent 31b5f5a51f
commit ca162bc82d
4 changed files with 6 additions and 14 deletions

View File

@@ -113,7 +113,6 @@ glx@glx-buffer-age,Fail
glx@glx-buffer-age vblank_mode=0,Fail
glx@glx-swap-pixmap-bad,Fail
glx@glx-tfp,Crash
# ../src/gallium/drivers/zink/zink_kopper.c:859: zink_kopper_update: Assertion `pres->bind & PIPE_BIND_DISPLAY_TARGET' failed.
glx@glx-visuals-depth -pixmap,Crash

View File

@@ -125,7 +125,6 @@ spec@ext_framebuffer_multisample@sample-alpha-to-one 2,Fail
spec@ext_framebuffer_multisample@sample-alpha-to-one 4,Fail
spec@ext_framebuffer_multisample@sample-alpha-to-one 6,Fail
spec@ext_framebuffer_multisample@sample-alpha-to-one 8,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_nv12,Fail
spec@ext_packed_float@query-rgba-signed-components,Fail
spec@glsl-1.10@execution@glsl-fs-inline-explosion,Crash
@@ -270,9 +269,6 @@ spec@!opengl 1.1@teximage-colors gl_sluminance8_alpha8@GL_SLUMINANCE8_ALPHA8 tex
spec@!opengl 1.1@teximage-colors gl_sluminance8_alpha8@GL_SLUMINANCE8_ALPHA8 texture with GL_RGBA and GL_UNSIGNED_SHORT,Fail
spec@!opengl 1.1@teximage-colors gl_sluminance8_alpha8@GL_SLUMINANCE8_ALPHA8 texture with GL_RGBA and GL_UNSIGNED_SHORT_4_4_4_4,Fail
spec@!opengl 1.1@teximage-colors gl_sluminance8_alpha8@GL_SLUMINANCE8_ALPHA8 texture with GL_RGBA and GL_UNSIGNED_SHORT_4_4_4_4_REV,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_yvu420,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-as-r8-gr88,Fail
spec@ext_texture_srgb@fbo-generatemipmap-formats,Fail
spec@ext_texture_srgb@fbo-generatemipmap-formats-s3tc,Fail
spec@ext_texture_srgb@fbo-generatemipmap-formats-s3tc@GL_COMPRESSED_SLUMINANCE_ALPHA,Fail

View File

@@ -124,7 +124,6 @@ spec@ext_framebuffer_multisample@sample-alpha-to-one 2,Fail
spec@ext_framebuffer_multisample@sample-alpha-to-one 4,Fail
spec@ext_framebuffer_multisample@sample-alpha-to-one 6,Fail
spec@ext_framebuffer_multisample@sample-alpha-to-one 8,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_nv12,Fail
spec@ext_packed_float@query-rgba-signed-components,Fail
spec@glsl-1.10@execution@glsl-fs-inline-explosion,Crash
@@ -269,9 +268,6 @@ spec@!opengl 1.1@teximage-colors gl_sluminance8_alpha8@GL_SLUMINANCE8_ALPHA8 tex
spec@!opengl 1.1@teximage-colors gl_sluminance8_alpha8@GL_SLUMINANCE8_ALPHA8 texture with GL_RGBA and GL_UNSIGNED_SHORT,Fail
spec@!opengl 1.1@teximage-colors gl_sluminance8_alpha8@GL_SLUMINANCE8_ALPHA8 texture with GL_RGBA and GL_UNSIGNED_SHORT_4_4_4_4,Fail
spec@!opengl 1.1@teximage-colors gl_sluminance8_alpha8@GL_SLUMINANCE8_ALPHA8 texture with GL_RGBA and GL_UNSIGNED_SHORT_4_4_4_4_REV,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_yvu420,Fail
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-as-r8-gr88,Fail
spec@ext_texture_srgb@fbo-generatemipmap-formats,Fail
spec@ext_texture_srgb@fbo-generatemipmap-formats-s3tc,Fail
spec@ext_texture_srgb@fbo-generatemipmap-formats-s3tc@GL_COMPRESSED_SLUMINANCE_ALPHA,Fail

View File

@@ -1796,12 +1796,13 @@ zink_resource_from_handle(struct pipe_screen *pscreen,
if (templ->format == PIPE_FORMAT_NONE)
templ2.format = whandle->format;
uint64_t modifier = DRM_FORMAT_MOD_INVALID;
int modifier_count = 0;
if (whandle->modifier != DRM_FORMAT_MOD_INVALID) {
uint64_t modifier = DRM_FORMAT_MOD_LINEAR;
int modifier_count = 1;
if (whandle->modifier != DRM_FORMAT_MOD_INVALID)
modifier = whandle->modifier;
modifier_count = 1;
}
else
whandle->modifier = modifier;
templ2.bind |= ZINK_BIND_DMABUF;
struct pipe_resource *pres = resource_create(pscreen, &templ2, whandle, usage, &modifier, modifier_count, NULL, NULL);
if (pres) {
struct zink_resource *res = zink_resource(pres);