zink: put zink_program::reference on separate cacheline

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33738>
This commit is contained in:
Mike Blumenkrantz
2025-02-14 09:20:04 -05:00
committed by Marge Bot
parent 08dc6aa354
commit 480d8bea2b
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -994,7 +994,7 @@ zink_pipeline_layout_create(struct zink_screen *screen, VkDescriptorSetLayout *d
static void *
create_program(struct zink_context *ctx, bool is_compute)
{
struct zink_program *pg = rzalloc_size(NULL, is_compute ? sizeof(struct zink_compute_program) : sizeof(struct zink_gfx_program));
struct zink_program *pg = is_compute ? (void*)CALLOC_STRUCT_CL(zink_compute_program) : (void*)CALLOC_STRUCT_CL(zink_gfx_program);
if (!pg)
return NULL;
@@ -1690,7 +1690,7 @@ zink_destroy_gfx_program(struct zink_screen *screen,
zink_gfx_lib_cache_unref(screen, prog->libs);
ralloc_free(prog->base.ralloc_ctx);
ralloc_free(prog);
FREE_CL(prog);
}
void
@@ -1717,7 +1717,7 @@ zink_destroy_compute_program(struct zink_screen *screen,
zink_destroy_shader_module(screen, comp->module);
ralloc_free(comp->base.ralloc_ctx);
ralloc_free(comp);
FREE_CL(comp);
}
ALWAYS_INLINE static bool
+1 -1
View File
@@ -993,7 +993,7 @@ struct zink_shader_module {
};
struct zink_program {
struct pipe_reference reference;
EXCLUSIVE_CACHELINE(struct pipe_reference reference);
struct zink_context *ctx;
void *ralloc_ctx;
blake3_hash blake3;