Mesa (master): zink: assert that image-view format isn't undefined

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 9 20:29:27 UTC 2020


Module: Mesa
Branch: master
Commit: 48925f6927e0623afaa43e98ee94e876a909d3db
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=48925f6927e0623afaa43e98ee94e876a909d3db

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Tue Jun  9 21:08:05 2020 +0200

zink: assert that image-view format isn't undefined

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5407>

---

 src/gallium/drivers/zink/zink_surface.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/zink/zink_surface.c b/src/gallium/drivers/zink/zink_surface.c
index e9c02af0c92..d5d0a3c6dbc 100644
--- a/src/gallium/drivers/zink/zink_surface.c
+++ b/src/gallium/drivers/zink/zink_surface.c
@@ -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;



More information about the mesa-commit mailing list