aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Ashburn <jon@lunarg.com>2015-12-14 08:52:14 -0700
committerJon Ashburn <jon@lunarg.com>2015-12-14 11:19:12 -0700
commit271e523f3aafe5ce01613ef5d3b117bc3b4546eb (patch)
tree65e49dd843b27cfa7cec6307b28d9bd82b9cdb2c
parent7d35757be71ab4dd33dee7616c8539401cc9fc83 (diff)
downloadusermoji-271e523f3aafe5ce01613ef5d3b117bc3b4546eb.tar.xz
loader: Fix physical device cast for enumerate properties trampoline code
Enumerate layer and extension properties don't always call down chain so can't just cast physical device to the loader struct. Must search for it in cases where a layer wrapped it.
-rw-r--r--loader/loader.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/loader/loader.c b/loader/loader.c
index 73a3939b..0b0e1306 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -3711,11 +3711,13 @@ VKAPI_ATTR VkResult VKAPI_CALL loader_EnumerateDeviceExtensionProperties(
uint32_t* pPropertyCount,
VkExtensionProperties* pProperties)
{
- struct loader_physical_device *phys_dev = (struct loader_physical_device *) physicalDevice;
+ struct loader_physical_device *phys_dev;
uint32_t copy_size;
uint32_t count;
struct loader_device_extension_list *dev_ext_list=NULL;
+ //TODO fix this aliases physical devices
+ phys_dev = loader_get_physical_device(physicalDevice);
/* get layer libraries if needed */
if (pLayerName && strlen(pLayerName) != 0) {
@@ -3767,8 +3769,9 @@ VKAPI_ATTR VkResult VKAPI_CALL loader_EnumerateDeviceLayerProperties(
VkLayerProperties* pProperties)
{
uint32_t copy_size;
- struct loader_physical_device *phys_dev = (struct loader_physical_device *) physicalDevice;
-
+ struct loader_physical_device *phys_dev;
+ //TODO fix this, aliases physical devices
+ phys_dev = loader_get_physical_device(physicalDevice);
uint32_t count = phys_dev->this_instance->device_layer_list.count;
if (pProperties == NULL) {