diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-06-25 18:01:43 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-06-29 11:45:16 -0600 |
| commit | cfa6643201d47ccb6ccc630d60ad4b1f4cdf0102 (patch) | |
| tree | 1482269daa565a428ecffad7047f0e6b9dab1fa4 /include | |
| parent | 1f221b264ed51952fcecd34af0bfa405b0f27734 (diff) | |
| download | usermoji-cfa6643201d47ccb6ccc630d60ad4b1f4cdf0102.tar.xz | |
loader: Move CreateDevice to device table
Discovered an issue where a layer was doing cleanup
in it's DestroyDevice function but the CreateDevice
was never called.
This happened because the extension was only enabled
on the device chain and the device chain doesn't actually
call CreateDevice. That happens on the Instance chain.
Making it so that we can call down the device chain -
which is terminated by the ICD.
We need to know the real device object to construct the
device chain heiarchy and when calling down the device
chain it should end with the ICD doing the actual device
object creation.
This patch fixes the issue by using the
same process as CreateInstance. The loader will call
the ICD's CreateDevice and pass that in the *pDevice
argument. The layers then ignore the PhysicalDevice parameter
and use the *pDevice to access the device chain.
To prevent the ICD from being called twice needed to
stub in a special loader_GetDeviceChainProcAddr to provide
a stub for only CreateDevice as the end of the chain.
integrate review feedback.
Diffstat (limited to 'include')
| -rw-r--r-- | include/vkLayer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/vkLayer.h b/include/vkLayer.h index 971f0307..3742725b 100644 --- a/include/vkLayer.h +++ b/include/vkLayer.h @@ -29,6 +29,7 @@ typedef struct VkBaseLayerObject_ typedef struct VkLayerDispatchTable_ { PFN_vkGetDeviceProcAddr GetDeviceProcAddr; + PFN_vkCreateDevice CreateDevice; PFN_vkDestroyDevice DestroyDevice; PFN_vkGetDeviceQueue GetDeviceQueue; PFN_vkQueueSubmit QueueSubmit; @@ -144,7 +145,6 @@ typedef struct VkLayerInstanceDispatchTable_ PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures; PFN_vkGetPhysicalDeviceFormatInfo GetPhysicalDeviceFormatInfo; PFN_vkGetPhysicalDeviceLimits GetPhysicalDeviceLimits; - PFN_vkCreateDevice CreateDevice; PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties; PFN_vkGetPhysicalDevicePerformance GetPhysicalDevicePerformance; PFN_vkGetPhysicalDeviceQueueCount GetPhysicalDeviceQueueCount; |
