From 5d4b6a01af4ceda37dbde0159247a45cfbff404e Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 9 Jun 2015 16:27:55 -0700 Subject: [PATCH] vk/cmd_buffer: Properly initialize/reset dynamic states --- src/vulkan/device.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- 2.30.2