[Mesa-dev] [PATCH 2/7] radv: vkAllocateCommandBuffers should NULL all output handles

Andres Rodriguez andresx7 at gmail.com
Fri Jan 27 05:03:03 UTC 2017


This is part of the spec and fixes CTS tests:
dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_*
---
 src/amd/vulkan/radv_cmd_buffer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 0b090b7..a549a8e 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -1344,6 +1344,9 @@ VkResult radv_AllocateCommandBuffers(
 	VkResult result = VK_SUCCESS;
 	uint32_t i;
 
+	memset(pCommandBuffers, 0,
+			sizeof(*pCommandBuffers)*pAllocateInfo->commandBufferCount);
+
 	for (i = 0; i < pAllocateInfo->commandBufferCount; i++) {
 		result = radv_create_cmd_buffer(device, pool, pAllocateInfo->level,
 						&pCommandBuffers[i]);
-- 
2.9.3



More information about the mesa-dev mailing list