vk/cmd_buffer: Properly initialize/reset dynamic states
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 9 Jun 2015 23:27:55 +0000 (16:27 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 9 Jun 2015 23:27:55 +0000 (16:27 -0700)
src/vulkan/device.c

index 9eba8709a89e16558bd0f212229877d22eac03cf..731cd8f32a46368487e07709c49625c6bf8a8a17 100644 (file)
@@ -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;
 }