From 1887ff2ebb78a1e0ca27d4626a29a3f0cb170d31 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 21 May 2021 10:38:32 +0200 Subject: [PATCH] zink: mark 2d-arrays as cube-compatible OpenGL allows reinterpreting 2D array textures as cubemaps, so we need to always set the cube-compatible flag for them. This fixes a piglit test on Lavapipe. Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt | 1 - src/gallium/drivers/zink/zink_resource.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt b/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt index a5cbf722c2e..900d15c8f2a 100644 --- a/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt +++ b/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt @@ -88,7 +88,6 @@ spec@arb_texture_cube_map_array@arb_texture_cube_map_array-sampler-cube-array-sh spec@arb_texture_float@fbo-blending-formats,Fail spec@arb_texture_rg@multisample-fast-clear gl_arb_texture_rg-int,Fail spec@arb_texture_view@rendering-formats,Fail -spec@arb_texture_view@sampling-2d-array-as-cubemap-array,Fail spec@egl 1.4@egl-copy-buffers,Fail spec@egl 1.4@eglterminate then unbind context,Fail spec@egl_khr_gl_image@egl_khr_gl_renderbuffer_image-clear-shared-image gl_depth_component24,Fail diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 4abea44c708..4a82acf236e 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -384,7 +384,8 @@ create_ici(struct zink_screen *screen, const struct pipe_resource *templ, unsign debug_printf("ZINK: failed to validate image creation\n"); if (templ->target == PIPE_TEXTURE_CUBE || - templ->target == PIPE_TEXTURE_CUBE_ARRAY) { + templ->target == PIPE_TEXTURE_CUBE_ARRAY || + templ->target == PIPE_TEXTURE_2D_ARRAY) { VkImageFormatProperties props; if (vkGetPhysicalDeviceImageFormatProperties(screen->pdev, ici.format, ici.imageType, ici.tiling,