From 5744d1763c8a094c5141f37c2affe24f5feb63f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg=20Kristensen?= Date: Tue, 2 Jun 2015 22:51:42 -0700 Subject: [PATCH] vk: Set cb_state to NULL at cmd buffer create time Dynamic color/blend state can be NULL in case we're not rendering to color targets (only output to depth and/or stencil). Initialize cmd_buffer->cb_state to NULL so we can reliably detect whether it's been set or not. --- src/vulkan/device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vulkan/device.c b/src/vulkan/device.c index e44f063237f..091d9280792 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -2297,6 +2297,7 @@ VkResult anv_CreateCommandBuffer( cmd_buffer->device = device; cmd_buffer->rs_state = NULL; cmd_buffer->vp_state = NULL; + cmd_buffer->cb_state = NULL; memset(&cmd_buffer->descriptors, 0, sizeof(cmd_buffer->descriptors)); result = anv_batch_bo_create(device, &cmd_buffer->last_batch_bo); -- 2.30.2