zink: calloc separable program zink_gfx_library_key struct

this matches other zink_gfx_library_key allocations

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246>
This commit is contained in:
Mike Blumenkrantz 2023-02-12 16:46:40 -05:00 committed by Marge Bot
parent 4cda98c827
commit b5029a90df

View file

@ -1164,7 +1164,7 @@ create_gfx_program_separable(struct zink_context *ctx, struct zink_shader **stag
VkPipeline libs[] = {stages[MESA_SHADER_VERTEX]->precompile.gpl, stages[MESA_SHADER_FRAGMENT]->precompile.gpl};
prog->last_variant_hash = ctx->gfx_pipeline_state.optimal_key;
struct zink_gfx_library_key *gkey = rzalloc(prog, struct zink_gfx_library_key);
struct zink_gfx_library_key *gkey = CALLOC_STRUCT(zink_gfx_library_key);
gkey->optimal_key = prog->last_variant_hash;
assert(gkey->optimal_key);
gkey->pipeline = zink_create_gfx_pipeline_combined(screen, prog, VK_NULL_HANDLE, libs, 2, VK_NULL_HANDLE, false);