diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c index b955d5f91a5..f9df891a088 100644 --- a/src/gallium/drivers/zink/zink_batch.c +++ b/src/gallium/drivers/zink/zink_batch.c @@ -75,7 +75,7 @@ zink_reset_batch_state(struct zink_context *ctx, struct zink_batch_state *bs) util_dynarray_clear(&bs->zombie_samplers); util_dynarray_clear(&bs->persistent_resources); - zink_batch_descriptor_reset_lazy(screen, bs); + zink_batch_descriptor_reset(screen, bs); set_foreach_remove(bs->programs, entry) { struct zink_program *pg = (struct zink_program*)entry->key; @@ -178,7 +178,7 @@ zink_batch_state_destroy(struct zink_screen *screen, struct zink_batch_state *bs _mesa_set_destroy(bs->bufferviews, NULL); _mesa_set_destroy(bs->programs, NULL); _mesa_set_destroy(bs->active_queries, NULL); - zink_batch_descriptor_deinit_lazy(screen, bs); + zink_batch_descriptor_deinit(screen, bs); ralloc_free(bs); } @@ -241,7 +241,7 @@ create_batch_state(struct zink_context *ctx) cnd_init(&bs->usage.flush); mtx_init(&bs->usage.mtx, mtx_plain); - if (!zink_batch_descriptor_init_lazy(screen, bs)) + if (!zink_batch_descriptor_init(screen, bs)) goto fail; util_queue_fence_init(&bs->flush_completed); diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index c2b9c04f773..b993471bdd4 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -100,13 +100,13 @@ zink_context_destroy(struct pipe_context *pctx) hash_table_foreach(&ctx->program_cache[i], entry) { struct zink_program *pg = entry->data; pg->removed = true; - zink_descriptor_program_deinit_lazy(ctx, pg); + zink_descriptor_program_deinit(ctx, pg); } } hash_table_foreach(&ctx->compute_program_cache, entry) { struct zink_program *pg = entry->data; pg->removed = true; - zink_descriptor_program_deinit_lazy(ctx, pg); + zink_descriptor_program_deinit(ctx, pg); } if (ctx->blitter) @@ -165,7 +165,7 @@ zink_context_destroy(struct pipe_context *pctx) _mesa_hash_table_destroy(ctx->render_pass_cache, NULL); slab_destroy_child(&ctx->transfer_pool_unsync); - zink_descriptors_deinit_lazy(ctx); + zink_descriptors_deinit(ctx); zink_descriptor_layouts_deinit(ctx); @@ -592,7 +592,7 @@ update_descriptor_state_sampler(struct zink_context *ctx, enum pipe_shader_type state->sampler_clamped : state->sampler; if (ctx->di.textures[shader][slot].sampler != sampler) { - zink_context_invalidate_descriptor_state_lazy(ctx, shader, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, slot, 1); + zink_context_invalidate_descriptor_state(ctx, shader, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, slot, 1); ctx->di.textures[shader][slot].sampler = sampler; } } @@ -681,7 +681,7 @@ zink_bind_sampler_states(struct pipe_context *pctx, for (unsigned i = 0; i < num_samplers; ++i) { struct zink_sampler_state *state = samplers[i]; if (ctx->sampler_states[shader][start_slot + i] != state) - zink_context_invalidate_descriptor_state_lazy(ctx, shader, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, start_slot, 1); + zink_context_invalidate_descriptor_state(ctx, shader, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, start_slot, 1); bool was_nonseamless = false; if (ctx->sampler_states[shader][start_slot + i]) was_nonseamless = ctx->sampler_states[shader][start_slot + i]->emulate_nonseamless; @@ -707,7 +707,7 @@ zink_bind_sampler_states(struct pipe_context *pctx, ctx->di.images[shader][start_slot + i].imageView = surface->image_view; ctx->di.image_surfaces[shader][start_slot + i].surface = surface; update_descriptor_state_sampler(ctx, shader, start_slot + i, zink_resource(surface->base.texture)); - zink_context_invalidate_descriptor_state_lazy(ctx, shader, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, start_slot + i, 1); + zink_context_invalidate_descriptor_state(ctx, shader, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, start_slot + i, 1); } } } else { @@ -1377,7 +1377,7 @@ zink_set_constant_buffer(struct pipe_context *pctx, } if (update) - zink_context_invalidate_descriptor_state_lazy(ctx, shader, ZINK_DESCRIPTOR_TYPE_UBO, index, 1); + zink_context_invalidate_descriptor_state(ctx, shader, ZINK_DESCRIPTOR_TYPE_UBO, index, 1); } ALWAYS_INLINE static void @@ -1474,7 +1474,7 @@ zink_set_shader_buffers(struct pipe_context *pctx, if (start_slot + count >= ctx->di.num_ssbos[p_stage]) ctx->di.num_ssbos[p_stage] = max_slot + 1; if (update) - zink_context_invalidate_descriptor_state_lazy(ctx, p_stage, ZINK_DESCRIPTOR_TYPE_SSBO, start_slot, count); + zink_context_invalidate_descriptor_state(ctx, p_stage, ZINK_DESCRIPTOR_TYPE_SSBO, start_slot, count); } static void @@ -1485,7 +1485,7 @@ update_binds_for_samplerviews(struct zink_context *ctx, struct zink_resource *re u_foreach_bit(slot, res->sampler_binds[PIPE_SHADER_COMPUTE]) { if (ctx->di.textures[PIPE_SHADER_COMPUTE][slot].imageLayout != layout) { update_descriptor_state_sampler(ctx, PIPE_SHADER_COMPUTE, slot, res); - zink_context_invalidate_descriptor_state_lazy(ctx, PIPE_SHADER_COMPUTE, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, slot, 1); + zink_context_invalidate_descriptor_state(ctx, PIPE_SHADER_COMPUTE, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, slot, 1); } } } else { @@ -1493,7 +1493,7 @@ update_binds_for_samplerviews(struct zink_context *ctx, struct zink_resource *re u_foreach_bit(slot, res->sampler_binds[i]) { if (ctx->di.textures[i][slot].imageLayout != layout) { update_descriptor_state_sampler(ctx, i, slot, res); - zink_context_invalidate_descriptor_state_lazy(ctx, i, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, slot, 1); + zink_context_invalidate_descriptor_state(ctx, i, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, slot, 1); } } } @@ -1707,7 +1707,7 @@ zink_set_shader_images(struct pipe_context *pctx, } ctx->di.num_images[p_stage] = start_slot + count; if (update) - zink_context_invalidate_descriptor_state_lazy(ctx, p_stage, ZINK_DESCRIPTOR_TYPE_IMAGE, start_slot, count); + zink_context_invalidate_descriptor_state(ctx, p_stage, ZINK_DESCRIPTOR_TYPE_IMAGE, start_slot, count); } ALWAYS_INLINE static void @@ -1838,7 +1838,7 @@ zink_set_sampler_views(struct pipe_context *pctx, ctx->di.num_sampler_views[shader_type] = start_slot + num_views; if (update) { struct zink_screen *screen = zink_screen(pctx->screen); - zink_context_invalidate_descriptor_state_lazy(ctx, shader_type, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, start_slot, num_views); + zink_context_invalidate_descriptor_state(ctx, shader_type, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, start_slot, num_views); if (!screen->info.have_EXT_non_seamless_cube_map) update_nonseamless_shader_key(ctx, shader_type); } @@ -2168,7 +2168,7 @@ zink_update_fbfetch(struct zink_context *ctx) ctx->di.fbfetch.imageView = zink_screen(ctx->base.screen)->info.rb2_feats.nullDescriptor ? VK_NULL_HANDLE : zink_csurface(ctx->dummy_surface[0])->image_view; - zink_context_invalidate_descriptor_state_lazy(ctx, PIPE_SHADER_FRAGMENT, ZINK_DESCRIPTOR_TYPE_UBO, 0, 1); + zink_context_invalidate_descriptor_state(ctx, PIPE_SHADER_FRAGMENT, ZINK_DESCRIPTOR_TYPE_UBO, 0, 1); return; } @@ -2187,7 +2187,7 @@ zink_update_fbfetch(struct zink_context *ctx) } ctx->di.fbfetch.imageLayout = VK_IMAGE_LAYOUT_GENERAL; if (changed) { - zink_context_invalidate_descriptor_state_lazy(ctx, PIPE_SHADER_FRAGMENT, ZINK_DESCRIPTOR_TYPE_UBO, 0, 1); + zink_context_invalidate_descriptor_state(ctx, PIPE_SHADER_FRAGMENT, ZINK_DESCRIPTOR_TYPE_UBO, 0, 1); if (!had_fbfetch) { ctx->rp_changed = true; zink_batch_no_rp(ctx); @@ -3826,7 +3826,7 @@ rebind_ubo(struct zink_context *ctx, enum pipe_shader_type shader, unsigned slot { struct zink_resource *res = update_descriptor_state_ubo(ctx, shader, slot, ctx->di.descriptor_res[ZINK_DESCRIPTOR_TYPE_UBO][shader][slot]); - zink_context_invalidate_descriptor_state_lazy(ctx, shader, ZINK_DESCRIPTOR_TYPE_UBO, slot, 1); + zink_context_invalidate_descriptor_state(ctx, shader, ZINK_DESCRIPTOR_TYPE_UBO, slot, 1); return res; } @@ -3840,7 +3840,7 @@ rebind_ssbo(struct zink_context *ctx, enum pipe_shader_type shader, unsigned slo util_range_add(&res->base.b, &res->valid_buffer_range, ssbo->buffer_offset, ssbo->buffer_offset + ssbo->buffer_size); update_descriptor_state_ssbo(ctx, shader, slot, res); - zink_context_invalidate_descriptor_state_lazy(ctx, shader, ZINK_DESCRIPTOR_TYPE_SSBO, slot, 1); + zink_context_invalidate_descriptor_state(ctx, shader, ZINK_DESCRIPTOR_TYPE_SSBO, slot, 1); return res; } @@ -3858,7 +3858,7 @@ rebind_tbo(struct zink_context *ctx, enum pipe_shader_type shader, unsigned slot zink_buffer_view_reference(zink_screen(ctx->base.screen), &sampler_view->buffer_view, NULL); sampler_view->buffer_view = get_buffer_view(ctx, res, &bvci); update_descriptor_state_sampler(ctx, shader, slot, res); - zink_context_invalidate_descriptor_state_lazy(ctx, shader, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, slot, 1); + zink_context_invalidate_descriptor_state(ctx, shader, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, slot, 1); return res; } @@ -3883,7 +3883,7 @@ rebind_ibo(struct zink_context *ctx, enum pipe_shader_type shader, unsigned slot util_range_add(&res->base.b, &res->valid_buffer_range, image_view->base.u.buf.offset, image_view->base.u.buf.offset + image_view->base.u.buf.size); update_descriptor_state_image(ctx, shader, slot, res); - zink_context_invalidate_descriptor_state_lazy(ctx, shader, ZINK_DESCRIPTOR_TYPE_IMAGE, slot, 1); + zink_context_invalidate_descriptor_state(ctx, shader, ZINK_DESCRIPTOR_TYPE_IMAGE, slot, 1); return res; } @@ -4269,7 +4269,7 @@ rebind_image(struct zink_context *ctx, struct zink_resource *res) struct pipe_surface *psurf = &sv->image_view->base; zink_rebind_surface(ctx, &psurf); sv->image_view = zink_surface(psurf); - zink_context_invalidate_descriptor_state_lazy(ctx, i, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, j, 1); + zink_context_invalidate_descriptor_state(ctx, i, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, j, 1); update_descriptor_state_sampler(ctx, i, j, res); } } @@ -4278,7 +4278,7 @@ rebind_image(struct zink_context *ctx, struct zink_resource *res) continue; for (unsigned j = 0; j < ctx->di.num_images[i]; j++) { if (zink_resource(ctx->image_views[i][j].base.resource) == res) { - zink_context_invalidate_descriptor_state_lazy(ctx, i, ZINK_DESCRIPTOR_TYPE_IMAGE, j, 1); + zink_context_invalidate_descriptor_state(ctx, i, ZINK_DESCRIPTOR_TYPE_IMAGE, j, 1); update_descriptor_state_image(ctx, i, j, res); _mesa_set_add(ctx->need_barriers[i == PIPE_SHADER_COMPUTE], res); } @@ -4345,7 +4345,7 @@ zink_rebind_all_images(struct zink_context *ctx) struct pipe_surface *psurf = &sv->image_view->base; zink_rebind_surface(ctx, &psurf); sv->image_view = zink_surface(psurf); - zink_context_invalidate_descriptor_state_lazy(ctx, i, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, j, 1); + zink_context_invalidate_descriptor_state(ctx, i, ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW, j, 1); update_descriptor_state_sampler(ctx, i, j, res); } } @@ -4357,7 +4357,7 @@ zink_rebind_all_images(struct zink_context *ctx) if (ctx->image_views[i][j].surface->obj != res->obj) { zink_surface_reference(zink_screen(ctx->base.screen), &image_view->surface, NULL); image_view->surface = create_image_surface(ctx, &image_view->base, i == PIPE_SHADER_COMPUTE); - zink_context_invalidate_descriptor_state_lazy(ctx, i, ZINK_DESCRIPTOR_TYPE_IMAGE, j, 1); + zink_context_invalidate_descriptor_state(ctx, i, ZINK_DESCRIPTOR_TYPE_IMAGE, j, 1); update_descriptor_state_image(ctx, i, j, res); _mesa_set_add(ctx->need_barriers[i == PIPE_SHADER_COMPUTE], res); } @@ -4595,7 +4595,7 @@ zink_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags) if (!zink_descriptor_layouts_init(ctx)) goto fail; - if (!zink_descriptors_init_lazy(ctx)) + if (!zink_descriptors_init(ctx)) goto fail; ctx->base.create_texture_handle = zink_create_texture_handle; diff --git a/src/gallium/drivers/zink/zink_descriptors.c b/src/gallium/drivers/zink/zink_descriptors.c index 5d6aeca9d05..ed89912269f 100644 --- a/src/gallium/drivers/zink/zink_descriptors.c +++ b/src/gallium/drivers/zink/zink_descriptors.c @@ -382,7 +382,7 @@ descriptor_program_num_sizes_compact(VkDescriptorPoolSize *sizes, unsigned desc_ } bool -zink_descriptor_program_init_lazy(struct zink_context *ctx, struct zink_program *pg) +zink_descriptor_program_init(struct zink_context *ctx, struct zink_program *pg) { struct zink_screen *screen = zink_screen(ctx->base.screen); VkDescriptorSetLayoutBinding bindings[ZINK_DESCRIPTOR_TYPES][PIPE_SHADER_TYPES * 64]; @@ -562,7 +562,7 @@ zink_descriptor_program_init_lazy(struct zink_context *ctx, struct zink_program } void -zink_descriptor_program_deinit_lazy(struct zink_context *ctx, struct zink_program *pg) +zink_descriptor_program_deinit(struct zink_context *ctx, struct zink_program *pg) { struct zink_screen *screen = zink_screen(ctx->base.screen); for (unsigned i = 0; pg->num_dsl && i < ZINK_DESCRIPTOR_TYPES; i++) { @@ -596,7 +596,7 @@ create_pool(struct zink_screen *screen, unsigned num_type_sizes, const VkDescrip } static struct zink_descriptor_pool * -get_descriptor_pool_lazy(struct zink_context *ctx, struct zink_program *pg, enum zink_descriptor_type type, struct zink_batch_state *bs, bool is_compute); +get_descriptor_pool(struct zink_context *ctx, struct zink_program *pg, enum zink_descriptor_type type, struct zink_batch_state *bs, bool is_compute); static struct zink_descriptor_pool * check_pool_alloc(struct zink_context *ctx, struct zink_descriptor_pool *pool, struct hash_entry *he, struct zink_program *pg, @@ -610,7 +610,7 @@ check_pool_alloc(struct zink_context *ctx, struct zink_descriptor_pool *pool, st /* overflowed pool: queue for deletion on next reset */ util_dynarray_append(&bs->dd.overflowed_pools, struct zink_descriptor_pool*, pool); _mesa_hash_table_remove(&bs->dd.pools[type], he); - return get_descriptor_pool_lazy(ctx, pg, type, bs, is_compute); + return get_descriptor_pool(ctx, pg, type, bs, is_compute); } if (!zink_descriptor_util_alloc_sets(screen, pg->dsl[type + 1], pool->pool, &pool->sets[pool->sets_alloc], sets_to_alloc)) @@ -662,7 +662,7 @@ check_push_pool_alloc(struct zink_context *ctx, struct zink_descriptor_pool *poo } static struct zink_descriptor_pool * -get_descriptor_pool_lazy(struct zink_context *ctx, struct zink_program *pg, enum zink_descriptor_type type, struct zink_batch_state *bs, bool is_compute) +get_descriptor_pool(struct zink_context *ctx, struct zink_program *pg, enum zink_descriptor_type type, struct zink_batch_state *bs, bool is_compute) { struct zink_screen *screen = zink_screen(ctx->base.screen); const struct zink_descriptor_pool_key *pool_key = pg->dd.pool_key[type]; @@ -686,7 +686,7 @@ get_descriptor_pool_lazy(struct zink_context *ctx, struct zink_program *pg, enum } ALWAYS_INLINE static VkDescriptorSet -get_descriptor_set_lazy(struct zink_descriptor_pool *pool) +get_descriptor_set(struct zink_descriptor_pool *pool) { if (!pool) return VK_NULL_HANDLE; @@ -701,8 +701,8 @@ populate_sets(struct zink_context *ctx, struct zink_batch_state *bs, { u_foreach_bit(type, *changed_sets) { if (pg->dd.pool_key[type]) { - struct zink_descriptor_pool *pool = get_descriptor_pool_lazy(ctx, pg, type, bs, pg->is_compute); - sets[type] = get_descriptor_set_lazy(pool); + struct zink_descriptor_pool *pool = get_descriptor_pool(ctx, pg, type, bs, pg->is_compute); + sets[type] = get_descriptor_set(pool); if (!sets[type]) return false; } else @@ -712,14 +712,14 @@ populate_sets(struct zink_context *ctx, struct zink_batch_state *bs, } void -zink_descriptor_set_update_lazy(struct zink_context *ctx, struct zink_program *pg, enum zink_descriptor_type type, VkDescriptorSet set) +zink_descriptor_set_update(struct zink_context *ctx, struct zink_program *pg, enum zink_descriptor_type type, VkDescriptorSet set) { struct zink_screen *screen = zink_screen(ctx->base.screen); VKCTX(UpdateDescriptorSetWithTemplate)(screen->dev, set, pg->dd.templates[type + 1], ctx); } void -zink_descriptors_update_lazy_masked(struct zink_context *ctx, bool is_compute, uint8_t changed_sets, uint8_t bind_sets) +zink_descriptors_update_masked(struct zink_context *ctx, bool is_compute, uint8_t changed_sets, uint8_t bind_sets) { struct zink_screen *screen = zink_screen(ctx->base.screen); struct zink_batch_state *bs = ctx->batch.state; @@ -760,7 +760,7 @@ zink_descriptors_update_lazy_masked(struct zink_context *ctx, bool is_compute, u } void -zink_descriptors_update_lazy(struct zink_context *ctx, bool is_compute) +zink_descriptors_update(struct zink_context *ctx, bool is_compute) { struct zink_batch_state *bs = ctx->batch.state; struct zink_program *pg = is_compute ? &ctx->curr_compute->base : &ctx->curr_program->base; @@ -796,7 +796,7 @@ zink_descriptors_update_lazy(struct zink_context *ctx, bool is_compute) VkDescriptorSet push_set = VK_NULL_HANDLE; if (need_push && !have_KHR_push_descriptor) { struct zink_descriptor_pool *pool = check_push_pool_alloc(ctx, bs->dd.push_pool[pg->is_compute], bs, pg->is_compute); - push_set = get_descriptor_set_lazy(pool); + push_set = get_descriptor_set(pool); if (!push_set) mesa_loge("ZINK: failed to get push descriptor set! prepare to crash!"); } @@ -824,7 +824,7 @@ zink_descriptors_update_lazy(struct zink_context *ctx, bool is_compute) } } ctx->dd.push_state_changed[is_compute] = false; - zink_descriptors_update_lazy_masked(ctx, is_compute, changed_sets, bind_sets); + zink_descriptors_update_masked(ctx, is_compute, changed_sets, bind_sets); if (pg->dd.bindless && unlikely(!ctx->dd.bindless_bound)) { VKCTX(CmdBindDescriptorSets)(ctx->batch.state->cmdbuf, is_compute ? VK_PIPELINE_BIND_POINT_COMPUTE : VK_PIPELINE_BIND_POINT_GRAPHICS, pg->layout, ZINK_DESCRIPTOR_BINDLESS, 1, &ctx->dd.bindless_set, @@ -838,7 +838,7 @@ zink_descriptors_update_lazy(struct zink_context *ctx, bool is_compute) } void -zink_context_invalidate_descriptor_state_lazy(struct zink_context *ctx, enum pipe_shader_type shader, enum zink_descriptor_type type, unsigned start, unsigned count) +zink_context_invalidate_descriptor_state(struct zink_context *ctx, enum pipe_shader_type shader, enum zink_descriptor_type type, unsigned start, unsigned count) { if (type == ZINK_DESCRIPTOR_TYPE_UBO && !start) ctx->dd.push_state_changed[shader == PIPE_SHADER_COMPUTE] = true; @@ -850,7 +850,7 @@ zink_context_invalidate_descriptor_state_lazy(struct zink_context *ctx, enum pip } void -zink_batch_descriptor_deinit_lazy(struct zink_screen *screen, struct zink_batch_state *bs) +zink_batch_descriptor_deinit(struct zink_screen *screen, struct zink_batch_state *bs) { for (unsigned i = 0; i < ZINK_DESCRIPTOR_TYPES; i++) { hash_table_foreach(&bs->dd.pools[i], entry) { @@ -872,7 +872,7 @@ pool_destroy(struct zink_screen *screen, struct zink_descriptor_pool *pool) } void -zink_batch_descriptor_reset_lazy(struct zink_screen *screen, struct zink_batch_state *bs) +zink_batch_descriptor_reset(struct zink_screen *screen, struct zink_batch_state *bs) { for (unsigned i = 0; i < ZINK_DESCRIPTOR_TYPES; i++) { hash_table_foreach(&bs->dd.pools[i], entry) { @@ -898,7 +898,7 @@ zink_batch_descriptor_reset_lazy(struct zink_screen *screen, struct zink_batch_s } bool -zink_batch_descriptor_init_lazy(struct zink_screen *screen, struct zink_batch_state *bs) +zink_batch_descriptor_init(struct zink_screen *screen, struct zink_batch_state *bs) { for (unsigned i = 0; i < ZINK_DESCRIPTOR_TYPES; i++) { if (!_mesa_hash_table_init(&bs->dd.pools[i], bs, _mesa_hash_pointer, _mesa_key_pointer_equal)) @@ -923,7 +923,7 @@ init_push_template_entry(VkDescriptorUpdateTemplateEntry *entry, unsigned i) } bool -zink_descriptors_init_lazy(struct zink_context *ctx) +zink_descriptors_init(struct zink_context *ctx) { for (unsigned i = 0; i < ZINK_SHADER_COUNT; i++) { VkDescriptorUpdateTemplateEntry *entry = &ctx->dd.push_entries[i]; @@ -948,7 +948,7 @@ zink_descriptors_init_lazy(struct zink_context *ctx) } void -zink_descriptors_deinit_lazy(struct zink_context *ctx) +zink_descriptors_deinit(struct zink_context *ctx) { struct zink_screen *screen = zink_screen(ctx->base.screen); if (ctx->dd.push_dsl[0]) diff --git a/src/gallium/drivers/zink/zink_descriptors.h b/src/gallium/drivers/zink/zink_descriptors.h index 1a18b9515be..6a7d2886c32 100644 --- a/src/gallium/drivers/zink/zink_descriptors.h +++ b/src/gallium/drivers/zink/zink_descriptors.h @@ -144,38 +144,36 @@ zink_descriptors_update_bindless(struct zink_context *ctx); - -//LAZY bool -zink_descriptor_program_init_lazy(struct zink_context *ctx, struct zink_program *pg); +zink_descriptor_program_init(struct zink_context *ctx, struct zink_program *pg); void -zink_descriptor_program_deinit_lazy(struct zink_context *ctx, struct zink_program *pg); +zink_descriptor_program_deinit(struct zink_context *ctx, struct zink_program *pg); void -zink_descriptors_update_lazy(struct zink_context *ctx, bool is_compute); +zink_descriptors_update(struct zink_context *ctx, bool is_compute); void -zink_context_invalidate_descriptor_state_lazy(struct zink_context *ctx, enum pipe_shader_type shader, enum zink_descriptor_type type, unsigned, unsigned); +zink_context_invalidate_descriptor_state(struct zink_context *ctx, enum pipe_shader_type shader, enum zink_descriptor_type type, unsigned, unsigned); void -zink_batch_descriptor_deinit_lazy(struct zink_screen *screen, struct zink_batch_state *bs); +zink_batch_descriptor_deinit(struct zink_screen *screen, struct zink_batch_state *bs); void -zink_batch_descriptor_reset_lazy(struct zink_screen *screen, struct zink_batch_state *bs); +zink_batch_descriptor_reset(struct zink_screen *screen, struct zink_batch_state *bs); bool -zink_batch_descriptor_init_lazy(struct zink_screen *screen, struct zink_batch_state *bs); +zink_batch_descriptor_init(struct zink_screen *screen, struct zink_batch_state *bs); bool -zink_descriptors_init_lazy(struct zink_context *ctx); +zink_descriptors_init(struct zink_context *ctx); void -zink_descriptors_deinit_lazy(struct zink_context *ctx); +zink_descriptors_deinit(struct zink_context *ctx); void -zink_descriptor_set_update_lazy(struct zink_context *ctx, struct zink_program *pg, enum zink_descriptor_type type, VkDescriptorSet set); +zink_descriptor_set_update(struct zink_context *ctx, struct zink_program *pg, enum zink_descriptor_type type, VkDescriptorSet set); void -zink_descriptors_update_lazy_masked(struct zink_context *ctx, bool is_compute, uint8_t changed_sets, uint8_t bind_sets); +zink_descriptors_update_masked(struct zink_context *ctx, bool is_compute, uint8_t changed_sets, uint8_t bind_sets); #ifdef __cplusplus } #endif diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp index f1d2369b7ad..58e7902187c 100644 --- a/src/gallium/drivers/zink/zink_draw.cpp +++ b/src/gallium/drivers/zink/zink_draw.cpp @@ -763,7 +763,7 @@ zink_draw(struct pipe_context *pctx, } if (zink_program_has_descriptors(&ctx->curr_program->base)) - zink_descriptors_update_lazy(ctx, false); + zink_descriptors_update(ctx, false); if (ctx->di.any_bindless_dirty && /* some apps (d3dretrace) call MakeTextureHandleResidentARB randomly */ @@ -959,7 +959,7 @@ zink_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info) } if (zink_program_has_descriptors(&ctx->curr_compute->base)) - zink_descriptors_update_lazy(ctx, true); + zink_descriptors_update(ctx, true); if (ctx->di.any_bindless_dirty && ctx->curr_compute->base.dd.bindless) zink_descriptors_update_bindless(ctx); diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index a59c5a15a71..03a32ce339c 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -554,7 +554,7 @@ zink_create_gfx_program(struct zink_context *ctx, } _mesa_sha1_final(&sctx, prog->base.sha1); - if (!zink_descriptor_program_init_lazy(ctx, &prog->base)) + if (!zink_descriptor_program_init(ctx, &prog->base)) goto fail; zink_screen_get_pipeline_cache(screen, &prog->base); @@ -634,7 +634,7 @@ zink_create_compute_program(struct zink_context *ctx, struct zink_shader *shader comp->shader = shader; memcpy(comp->base.sha1, shader->base.sha1, sizeof(shader->base.sha1)); - if (!zink_descriptor_program_init_lazy(ctx, &comp->base)) + if (!zink_descriptor_program_init(ctx, &comp->base)) goto fail; zink_screen_get_pipeline_cache(screen, &comp->base); @@ -797,7 +797,7 @@ zink_destroy_gfx_program(struct zink_context *ctx, } if (prog->base.pipeline_cache) VKSCR(DestroyPipelineCache)(screen->dev, prog->base.pipeline_cache, NULL); - zink_descriptor_program_deinit_lazy(ctx, &prog->base); + zink_descriptor_program_deinit(ctx, &prog->base); ralloc_free(prog); } @@ -827,7 +827,7 @@ zink_destroy_compute_program(struct zink_context *ctx, free(comp->module); if (comp->base.pipeline_cache) VKSCR(DestroyPipelineCache)(screen->dev, comp->base.pipeline_cache, NULL); - zink_descriptor_program_deinit_lazy(ctx, &comp->base); + zink_descriptor_program_deinit(ctx, &comp->base); ralloc_free(comp); }