mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
zink: fix some return values
the function used to return the layout directly Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12844>
This commit is contained in:
parent
28386d0db5
commit
ca92a0d1ae
1 changed files with 2 additions and 2 deletions
|
|
@ -400,7 +400,7 @@ create_layout(struct zink_context *ctx, enum zink_descriptor_type type,
|
|||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
VkDescriptorSetLayout dsl = descriptor_layout_create(screen, type, bindings, MAX2(num_bindings, 1));
|
||||
if (!dsl)
|
||||
return VK_NULL_HANDLE;
|
||||
return NULL;
|
||||
|
||||
struct zink_descriptor_layout_key *k = ralloc(ctx, struct zink_descriptor_layout_key);
|
||||
k->use_count = 0;
|
||||
|
|
@ -410,7 +410,7 @@ create_layout(struct zink_context *ctx, enum zink_descriptor_type type,
|
|||
if (!k->bindings) {
|
||||
ralloc_free(k);
|
||||
VKSCR(DestroyDescriptorSetLayout)(screen->dev, dsl, NULL);
|
||||
return VK_NULL_HANDLE;
|
||||
return NULL;
|
||||
}
|
||||
memcpy(k->bindings, bindings, bindings_size);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue