radv: it isn't an error to not support a format or driver
authorDave Airlie <airlied@redhat.com>
Tue, 14 Nov 2017 03:23:00 +0000 (13:23 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 15 Nov 2017 20:12:42 +0000 (06:12 +1000)
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)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_formats.c

index 6666b62aa2cabf4c41fd2e4cc3c4e057799f9610..722c768aa06435d6a3dfcfb9a7a2c58b55186e31 100644 (file)
@@ -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);
 
index 7f679e876824bcd311497441e2ba8ada5a1d7e4b..5c79ea74069f847c1e50007fe50d6ec7217e284f 100644 (file)
@@ -1144,7 +1144,7 @@ unsupported:
                .maxResourceSize = 0,
        };
 
-       return vk_error(VK_ERROR_FORMAT_NOT_SUPPORTED);
+       return VK_ERROR_FORMAT_NOT_SUPPORTED;
 }
 
 VkResult radv_GetPhysicalDeviceImageFormatProperties(