[Mesa-dev] [PATCH 1/3] radv: make use of ATI_VENDOR_ID everywhere
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Fri Sep 22 16:24:59 UTC 2017
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
for the series.
On Fri, Sep 22, 2017 at 9:21 AM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/amd/vulkan/radv_device.c | 4 ++--
> src/amd/vulkan/radv_image.c | 2 +-
> src/amd/vulkan/radv_pipeline_cache.c | 4 ++--
> src/amd/vulkan/radv_private.h | 2 ++
> 4 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
> index f674051b25..28a941e219 100644
> --- a/src/amd/vulkan/radv_device.c
> +++ b/src/amd/vulkan/radv_device.c
> @@ -564,7 +564,7 @@ radv_enumerate_devices(struct radv_instance *instance)
> for (unsigned i = 0; i < (unsigned)max_devices; i++) {
> if (devices[i]->available_nodes & 1 << DRM_NODE_RENDER &&
> devices[i]->bustype == DRM_BUS_PCI &&
> - devices[i]->deviceinfo.pci->vendor_id == 0x1002) {
> + devices[i]->deviceinfo.pci->vendor_id == ATI_VENDOR_ID) {
>
> result = radv_physical_device_init(instance->physicalDevices +
> instance->physicalDeviceCount,
> @@ -827,7 +827,7 @@ void radv_GetPhysicalDeviceProperties(
> *pProperties = (VkPhysicalDeviceProperties) {
> .apiVersion = VK_MAKE_VERSION(1, 0, 42),
> .driverVersion = vk_get_driver_version(),
> - .vendorID = 0x1002,
> + .vendorID = ATI_VENDOR_ID,
> .deviceID = pdevice->rad_info.pci_id,
> .deviceType = pdevice->rad_info.has_dedicated_vram ? VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU : VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
> .limits = limits,
> diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
> index cff1b8d03f..c96e9e66e1 100644
> --- a/src/amd/vulkan/radv_image.c
> +++ b/src/amd/vulkan/radv_image.c
> @@ -147,7 +147,7 @@ radv_init_surface(struct radv_device *device,
> surface->flags |= RADEON_SURF_SCANOUT;
> return 0;
> }
> -#define ATI_VENDOR_ID 0x1002
> +
> static uint32_t si_get_bo_metadata_word1(struct radv_device *device)
> {
> return (ATI_VENDOR_ID << 16) | device->physical_device->rad_info.pci_id;
> diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c
> index ba5104339a..fa760f31ee 100644
> --- a/src/amd/vulkan/radv_pipeline_cache.c
> +++ b/src/amd/vulkan/radv_pipeline_cache.c
> @@ -330,7 +330,7 @@ radv_pipeline_cache_load(struct radv_pipeline_cache *cache,
> return;
> if (header.header_version != VK_PIPELINE_CACHE_HEADER_VERSION_ONE)
> return;
> - if (header.vendor_id != 0x1002)
> + if (header.vendor_id != ATI_VENDOR_ID)
> return;
> if (header.device_id != device->physical_device->rad_info.pci_id)
> return;
> @@ -431,7 +431,7 @@ VkResult radv_GetPipelineCacheData(
> header = p;
> header->header_size = sizeof(*header);
> header->header_version = VK_PIPELINE_CACHE_HEADER_VERSION_ONE;
> - header->vendor_id = 0x1002;
> + header->vendor_id = ATI_VENDOR_ID;
> header->device_id = device->physical_device->rad_info.pci_id;
> memcpy(header->uuid, device->physical_device->cache_uuid, VK_UUID_SIZE);
> p += header->header_size;
> diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
> index f9853df5a3..b298387929 100644
> --- a/src/amd/vulkan/radv_private.h
> +++ b/src/amd/vulkan/radv_private.h
> @@ -74,6 +74,8 @@ typedef uint32_t xcb_window_t;
>
> #include "wsi_common.h"
>
> +#define ATI_VENDOR_ID 0x1002
> +
> #define MAX_VBS 32
> #define MAX_VERTEX_ATTRIBS 32
> #define MAX_RTS 8
> --
> 2.14.1
>
> _______________________________________________
> 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