[Mesa-dev] [PATCH 2/9] radv: simplify if statement

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Tue Apr 11 22:19:53 UTC 2017


On Wed, Apr 12, 2017 at 12:04 AM, Thomas Hindoe Paaboel Andersen
<phomes at gmail.com> wrote:
> ---
>  src/amd/vulkan/radv_wsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c
> index b8999f4..37cb322 100644
> --- a/src/amd/vulkan/radv_wsi.c
> +++ b/src/amd/vulkan/radv_wsi.c
> @@ -210,7 +210,7 @@ radv_wsi_image_create(VkDevice device_h,
>          * return the fd for the image in the no copy mode,
>          * or the fd for the linear image if a copy is required.
>          */
> -       if (!needs_linear_copy || (needs_linear_copy && linear)) {
> +       if (!needs_linear_copy || linear) {

Dave, shouldn't this be

(!needs_linear_copy && !linear) || (needs_linear_copy && linear)

?
>                 RADV_FROM_HANDLE(radv_device, device, device_h);
>                 RADV_FROM_HANDLE(radv_device_memory, memory, memory_h);
>                 if (!radv_get_memory_fd(device, memory, &fd))
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list