zink: fix some return values
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Sat, 11 Sep 2021 15:57:37 +0000 (11:57 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 14 Sep 2021 03:43:36 +0000 (03:43 +0000)
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>

src/gallium/drivers/zink/zink_descriptors.c

index b7241d0..9a0025c 100644 (file)
@@ -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);