zink: remove color_write_missing driver workaround

this is no longer used

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784>
This commit is contained in:
Mike Blumenkrantz
2022-09-14 08:18:30 -04:00
committed by Marge Bot
parent ceb34a2145
commit 93696693b2
5 changed files with 5 additions and 9 deletions
+2 -2
View File
@@ -2706,7 +2706,7 @@ static void
reapply_color_write(struct zink_context *ctx)
{
struct zink_screen *screen = zink_screen(ctx->base.screen);
if (!screen->driver_workarounds.color_write_missing) {
if (screen->info.have_EXT_color_write_enable) {
const VkBool32 enables[PIPE_MAX_COLOR_BUFS] = {1, 1, 1, 1, 1, 1, 1, 1};
const VkBool32 disables[PIPE_MAX_COLOR_BUFS] = {0};
const unsigned max_att = MIN2(PIPE_MAX_COLOR_BUFS, screen->info.props.limits.maxColorAttachments);
@@ -2824,7 +2824,7 @@ zink_set_color_write_enables(struct zink_context *ctx)
if (disable_color_writes && ctx->clears_enabled)
zink_batch_rp(ctx);
ctx->disable_color_writes = disable_color_writes;
if (zink_screen(ctx->base.screen)->driver_workarounds.color_write_missing) {
if (zink_screen(ctx->base.screen)->info.have_EXT_color_write_enable) {
/* use dummy color buffers instead of the more sane option */
zink_batch_no_rp(ctx);
ctx->rp_changed = true;
+1 -1
View File
@@ -140,7 +140,7 @@ fail:
bool
zink_use_dummy_attachments(const struct zink_context *ctx)
{
return ctx->disable_color_writes && zink_screen(ctx->base.screen)->driver_workarounds.color_write_missing;
return ctx->disable_color_writes && zink_screen(ctx->base.screen)->info.have_EXT_color_write_enable;
}
struct zink_framebuffer *
+2 -2
View File
@@ -248,7 +248,7 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
if (screen->info.dynamic_state2_feats.extendedDynamicState2PatchControlPoints)
dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT;
}
if (!screen->driver_workarounds.color_write_missing)
if (screen->info.have_EXT_color_write_enable)
dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT;
VkPipelineRasterizationLineStateCreateInfoEXT rast_line_state;
@@ -473,7 +473,7 @@ zink_create_gfx_pipeline_output(struct zink_screen *screen, struct zink_gfx_pipe
if (state->sample_locations_enabled)
dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT;
}
if (!screen->driver_workarounds.color_write_missing)
if (screen->info.have_EXT_color_write_enable)
dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT;
assert(state_count < ARRAY_SIZE(dynamicStateEnables));
-3
View File
@@ -2248,9 +2248,6 @@ init_driver_workarounds(struct zink_screen *screen)
if (!screen->driver_workarounds.force_pipeline_library)
screen->info.have_EXT_graphics_pipeline_library = false;
screen->driver_workarounds.broken_l4a4 = screen->info.driver_props.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY;
screen->driver_workarounds.color_write_missing =
!screen->info.have_EXT_color_write_enable ||
!screen->info.cwrite_feats.colorWriteEnable;
screen->driver_workarounds.depth_clip_control_missing = !screen->info.have_EXT_depth_clip_control;
if (screen->info.driver_props.driverID == VK_DRIVER_ID_AMD_PROPRIETARY)
/* this completely breaks xfb somehow */
-1
View File
@@ -1163,7 +1163,6 @@ struct zink_screen {
struct {
bool broken_l4a4;
bool color_write_missing;
bool depth_clip_control_missing;
bool implicit_sync;
bool force_pipeline_library;