summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_pipeline_cache.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-01-16 21:23:48 +0100
committerBas Nieuwenhuizen <[email protected]>2017-01-16 22:15:22 +0100
commit8406f79d6a3511dc6bf4d9c2ab3a80828c363d3a (patch)
tree7a891f20214fa9469b46b3a6cb9c12fe30b63aff /src/amd/vulkan/radv_pipeline_cache.c
parent0baa639f76b8e62327709298bc14637e28f27701 (diff)
radv: Get physical device from radv_device instead of the instance.
Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_pipeline_cache.c')
-rw-r--r--src/amd/vulkan/radv_pipeline_cache.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c
index 4fd09beb633..2cb1dfb6eb0 100644
--- a/src/amd/vulkan/radv_pipeline_cache.c
+++ b/src/amd/vulkan/radv_pipeline_cache.c
@@ -308,7 +308,6 @@ radv_pipeline_cache_load(struct radv_pipeline_cache *cache,
const void *data, size_t size)
{
struct radv_device *device = cache->device;
- struct radv_physical_device *pdevice = &device->instance->physicalDevice;
struct cache_header header;
if (size < sizeof(header))
@@ -320,9 +319,9 @@ radv_pipeline_cache_load(struct radv_pipeline_cache *cache,
return;
if (header.vendor_id != 0x1002)
return;
- if (header.device_id != device->instance->physicalDevice.rad_info.pci_id)
+ if (header.device_id != device->physical_device->rad_info.pci_id)
return;
- if (memcmp(header.uuid, pdevice->uuid, VK_UUID_SIZE) != 0)
+ if (memcmp(header.uuid, device->physical_device->uuid, VK_UUID_SIZE) != 0)
return;
char *end = (void *) data + size;
@@ -404,7 +403,6 @@ VkResult radv_GetPipelineCacheData(
{
RADV_FROM_HANDLE(radv_device, device, _device);
RADV_FROM_HANDLE(radv_pipeline_cache, cache, _cache);
- struct radv_physical_device *pdevice = &device->instance->physicalDevice;
struct cache_header *header;
VkResult result = VK_SUCCESS;
const size_t size = sizeof(*header) + cache->total_size;
@@ -421,8 +419,8 @@ VkResult radv_GetPipelineCacheData(
header->header_size = sizeof(*header);
header->header_version = VK_PIPELINE_CACHE_HEADER_VERSION_ONE;
header->vendor_id = 0x1002;
- header->device_id = device->instance->physicalDevice.rad_info.pci_id;
- memcpy(header->uuid, pdevice->uuid, VK_UUID_SIZE);
+ header->device_id = device->physical_device->rad_info.pci_id;
+ memcpy(header->uuid, device->physical_device->uuid, VK_UUID_SIZE);
p += header->header_size;
struct cache_entry *entry;