zink: assert that image-view format isn't undefined
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 9 Jun 2020 19:08:05 +0000 (21:08 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 9 Jun 2020 19:35:26 +0000 (19:35 +0000)
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5407>

src/gallium/drivers/zink/zink_surface.c

index e9c02af0c92afb694c08f996a6c67f8954d62691..d5d0a3c6dbc1d1ea5f91df4db83836b6623c0bab 100644 (file)
@@ -94,6 +94,7 @@ zink_create_surface(struct pipe_context *pctx,
    }
 
    ivci.format = zink_get_format(screen, templ->format);
+   assert(ivci.format != VK_FORMAT_UNDEFINED);
 
    // TODO: format swizzles
    ivci.components.r = VK_COMPONENT_SWIZZLE_R;