From: Kristian Høgsberg Kristensen Date: Wed, 3 Jun 2015 05:51:42 +0000 (-0700) Subject: vk: Set cb_state to NULL at cmd buffer create time X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5744d1763c8a094c5141f37c2affe24f5feb63f9;p=mesa.git 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. --- 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);