[PATCH 3/4] winevulkan: Remove unnecessary checks in wine_vkCmdExecuteCommands

Joshua Ashton joshua at froggi.es
Thu Mar 5 18:19:53 CST 2020


A size of zero violates the Vulkan spec so it should be a non-issue.


- Josh 🐸

---- On Fri, 06 Mar 2020 00:10:40 +0000 Liam Middlebrook <mailto:lmiddlebrook at nvidia.com> wrote ----


I'm not sure that we can remove this if we keep both the alloca and heap_alloc 
implementations in-place, to my understanding RtlAllocateHeap would run into issues 
when given an input size of zero. 
 
 
Thanks, 
 
Liam Middlebrook 
 
On 3/5/20 9:03 AM, Joshua Ashton wrote: 
> The Vulkan spec states commandBufferCount must be greater than zero and pCommandBuffers must be a valid pointer. 
> 
> Signed-off-by: Joshua Ashton <mailto:joshua at froggi.es> 
> --- 
>   dlls/winevulkan/vulkan.c | 3 --- 
>   1 file changed, 3 deletions(-) 
> 
> diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c 
> index 1cc1b4f61f..f767b86dc4 100644 
> --- a/dlls/winevulkan/vulkan.c 
> +++ b/dlls/winevulkan/vulkan.c 
> @@ -517,9 +517,6 @@ void WINAPI wine_vkCmdExecuteCommands(VkCommandBuffer buffer, uint32_t count, 
> 
>       TRACE("%p %u %p\n", buffer, count, buffers); 
> 
> -    if (!buffers || !count) 
> -        return; 
> - 
>       tmp_buffers = WINEVULKAN_ALLOCA(count * sizeof(*tmp_buffers)); 
> 
>       for (i = 0; i < count; i++) 
> 
 
----------------------------------------------------------------------------------- 
This email message is for the sole use of the intended recipient(s) and may contain 
confidential information.  Any unauthorized review, use, disclosure or distribution 
is prohibited.  If you are not the intended recipient, please contact the sender by 
reply email and destroy all copies of the original message. 
-----------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200306/1d39a8cb/attachment.htm>


More information about the wine-devel mailing list