zink: add depth/stencil needs shader swizzle workaround field

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21571>
This commit is contained in:
SoroushIMG
2023-02-24 10:04:39 +00:00
committed by Marge Bot
parent cc15dbc4f8
commit 2cf117ee39
2 changed files with 15 additions and 1 deletions
+14 -1
View File
@@ -2514,6 +2514,18 @@ init_driver_workarounds(struct zink_screen *screen)
screen->driver_workarounds.needs_sanitised_layer = false;
break;
}
/* these drivers will produce undefined results when using swizzle 1 with combined z/s textures
* TODO: use a future device property when available
*/
switch (screen->info.driver_props.driverID) {
case VK_DRIVER_ID_IMAGINATION_PROPRIETARY:
case VK_DRIVER_ID_IMAGINATION_OPEN_SOURCE_MESA:
screen->driver_workarounds.needs_zs_shader_swizzle = true;
break;
default:
screen->driver_workarounds.needs_zs_shader_swizzle = false;
break;
}
/* When robust contexts are advertised but robustImageAccess2 is not available */
screen->driver_workarounds.lower_robustImageAccess2 =
@@ -3037,7 +3049,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
!screen->driver_workarounds.no_linesmooth &&
!screen->driver_workarounds.no_hw_gl_point &&
!screen->driver_workarounds.lower_robustImageAccess2 &&
!screen->driconf.emulate_point_smooth;
!screen->driconf.emulate_point_smooth &&
!screen->driver_workarounds.needs_zs_shader_swizzle;
if (!screen->optimal_keys)
screen->info.have_EXT_graphics_pipeline_library = false;
+1
View File
@@ -1413,6 +1413,7 @@ struct zink_screen {
bool no_linesmooth;
bool no_hw_gl_point;
bool lower_robustImageAccess2;
bool needs_zs_shader_swizzle;
unsigned z16_unscaled_bias;
unsigned z24_unscaled_bias;
unsigned extra_swapchain_images;