[Mesa-dev] [PATCH] radv: it isn't an error to not support a format or driver

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Nov 14 08:49:03 UTC 2017


Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

On 11/14/2017 04:27 AM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> This reverts two of the vk_error changes:
> 
> reporting unsupported format is common,
> and testing non-amdgpu drivers and ignoring them is also common.
> 
> Fixes: cd64a4f70 (radv: use vk_error() everywhere an error is returned)
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>   src/amd/vulkan/radv_device.c  | 2 +-
>   src/amd/vulkan/radv_formats.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
> index 929082182c..a67b735373 100644
> --- a/src/amd/vulkan/radv_device.c
> +++ b/src/amd/vulkan/radv_device.c
> @@ -196,7 +196,7 @@ radv_physical_device_init(struct radv_physical_device *device,
>   	if (strcmp(version->name, "amdgpu")) {
>   		drmFreeVersion(version);
>   		close(fd);
> -		return vk_error(VK_ERROR_INCOMPATIBLE_DRIVER);
> +		return VK_ERROR_INCOMPATIBLE_DRIVER;
>   	}
>   	drmFreeVersion(version);
>   
> diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
> index 7f679e8768..5c79ea7406 100644
> --- a/src/amd/vulkan/radv_formats.c
> +++ b/src/amd/vulkan/radv_formats.c
> @@ -1144,7 +1144,7 @@ unsupported:
>   		.maxResourceSize = 0,
>   	};
>   
> -	return vk_error(VK_ERROR_FORMAT_NOT_SUPPORTED);
> +	return VK_ERROR_FORMAT_NOT_SUPPORTED;
>   }
>   
>   VkResult radv_GetPhysicalDeviceImageFormatProperties(
> 


More information about the mesa-dev mailing list