diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index af79434bfdf..c1a9b95fac2 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -1533,8 +1533,7 @@ zink_get_format(struct zink_screen *screen, enum pipe_format format) if (ret == VK_FORMAT_D24_UNORM_S8_UINT && !screen->have_D24_UNORM_S8_UINT) { - assert(zink_is_depth_format_supported(screen, - VK_FORMAT_D32_SFLOAT_S8_UINT)); + assert(screen->have_D32_SFLOAT_S8_UINT); return VK_FORMAT_D32_SFLOAT_S8_UINT; } @@ -2207,6 +2206,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config) VK_FORMAT_X8_D24_UNORM_PACK32); screen->have_D24_UNORM_S8_UINT = zink_is_depth_format_supported(screen, VK_FORMAT_D24_UNORM_S8_UINT); + screen->have_D32_SFLOAT_S8_UINT = zink_is_depth_format_supported(screen, + VK_FORMAT_D32_SFLOAT_S8_UINT); if (!zink_get_physical_device_info(screen)) { debug_printf("ZINK: failed to detect features\n"); diff --git a/src/gallium/drivers/zink/zink_screen.h b/src/gallium/drivers/zink/zink_screen.h index 75edba81052..914633bd1a2 100644 --- a/src/gallium/drivers/zink/zink_screen.h +++ b/src/gallium/drivers/zink/zink_screen.h @@ -158,6 +158,7 @@ struct zink_screen { bool have_X8_D24_UNORM_PACK32; bool have_D24_UNORM_S8_UINT; + bool have_D32_SFLOAT_S8_UINT; bool have_triangle_fans; bool need_2D_zs; bool need_2D_sparse;