From: Jason Ekstrand Date: Tue, 9 Jun 2015 23:27:55 +0000 (-0700) Subject: vk/cmd_buffer: Properly initialize/reset dynamic states X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d4b6a01af4ceda37dbde0159247a45cfbff404e;p=mesa.git vk/cmd_buffer: Properly initialize/reset dynamic states --- diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 9eba8709a89..731cd8f32a4 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -2322,6 +2322,7 @@ VkResult anv_CreateCommandBuffer( cmd_buffer->rs_state = NULL; cmd_buffer->vp_state = NULL; cmd_buffer->cb_state = NULL; + cmd_buffer->ds_state = NULL; memset(&cmd_buffer->descriptors, 0, sizeof(cmd_buffer->descriptors)); result = anv_batch_bo_create(device, &cmd_buffer->last_batch_bo); @@ -2658,6 +2659,11 @@ VkResult anv_ResetCommandBuffer( cmd_buffer->surface_next = 1; cmd_buffer->surface_relocs.num_relocs = 0; + cmd_buffer->rs_state = NULL; + cmd_buffer->vp_state = NULL; + cmd_buffer->cb_state = NULL; + cmd_buffer->ds_state = NULL; + return VK_SUCCESS; }