diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c index 3b640b67919..c40ae8e21aa 100644 --- a/src/gallium/drivers/zink/zink_batch.c +++ b/src/gallium/drivers/zink/zink_batch.c @@ -332,8 +332,8 @@ post_submit(void *data, void *gdata, int thread_index) if (bs->ctx->reset.reset) bs->ctx->reset.reset(bs->ctx->reset.data, PIPE_GUILTY_CONTEXT_RESET); screen->device_lost = true; - } else if (bs->ctx->batch_states_count > screen->max_fences) { - zink_screen_timeline_wait(screen, bs->fence.batch_id - (screen->max_fences / 2), PIPE_TIMEOUT_INFINITE); + } else if (bs->ctx->batch_states_count > 5000) { + zink_screen_timeline_wait(screen, bs->fence.batch_id - 2500, PIPE_TIMEOUT_INFINITE); } } diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 6cd66050fb4..fc16d75ebea 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -2202,15 +2202,6 @@ zink_internal_create_screen(const struct pipe_screen_config *config) if (!os_get_total_physical_memory(&screen->total_mem)) goto fail; - switch (screen->info.driver_props.driverID) { - case VK_DRIVER_ID_NVIDIA_PROPRIETARY: - screen->max_fences = 500; - break; - default: - screen->max_fences = 5000; - break; - } - if (!zink_screen_init_semaphore(screen)) { mesa_loge("zink: failed to create timeline semaphore"); goto fail; diff --git a/src/gallium/drivers/zink/zink_screen.h b/src/gallium/drivers/zink/zink_screen.h index ea24588f665..c2e4700bf9d 100644 --- a/src/gallium/drivers/zink/zink_screen.h +++ b/src/gallium/drivers/zink/zink_screen.h @@ -144,7 +144,6 @@ struct zink_screen { uint32_t gfx_queue; uint32_t max_queues; uint32_t timestamp_valid_bits; - unsigned max_fences; VkDevice dev; VkQueue queue; //gfx+compute VkQueue thread_queue; //gfx+compute