From 8c3adf749d7cbedfb9da70166e05911240115d18 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 3 Jan 2024 10:10:18 -0500 Subject: [PATCH] zink: add an assert for dummy fb surface creation add some info in the improbable case that this fails Part-of: --- src/gallium/drivers/zink/zink_context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index e7b939e38c5..f38b32ed171 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -5200,6 +5200,7 @@ zink_get_dummy_pipe_surface(struct zink_context *ctx, int samples_index) if (!ctx->dummy_surface[samples_index]) { unsigned size = calc_max_dummy_fbo_size(ctx); ctx->dummy_surface[samples_index] = zink_surface_create_null(ctx, PIPE_TEXTURE_2D, size, size, BITFIELD_BIT(samples_index)); + assert(ctx->dummy_surface[samples_index]); /* This is possibly used with imageLoad which according to GL spec must return 0 */ if (!samples_index) { union pipe_color_union color = {0};