Module: Mesa
Branch: main
Commit: b5029a90df48c2bbb109ecf1d113b56b45723e94
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b5029a90df48c2bbb109ecf1d113b56b45723e94

Author: Mike Blumenkrantz <[email protected]>
Date:   Sun Feb 12 16:46:40 2023 -0500

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>

---

 src/gallium/drivers/zink/zink_program.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_program.c 
b/src/gallium/drivers/zink/zink_program.c
index edd4a540d1b..9c617151d93 100644
--- a/src/gallium/drivers/zink/zink_program.c
+++ b/src/gallium/drivers/zink/zink_program.c
@@ -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);

Reply via email to