-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add device functions to InstanceGetProcAddr()
- Loading branch information
1 parent
f91d88f
commit 83ad75f
Showing
5 changed files
with
515 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
generator/vk_codegen/function_vkGetDeviceImageMemoryRequirementsKHR.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
LAYER_TRACE(__func__); | ||
|
||
// Hold the lock to access layer-wide global store | ||
std::unique_lock<std::mutex> lock { g_vulkanLock }; | ||
auto* layer = Device::retrieve(device); | ||
|
||
// Workaround Unreal Engine trying to invoke this via a function pointer | ||
// queried from a Vulkan 1.1 instance with vkInstanceGetProcAddress() with | ||
// device created from a later a Vulkan 1.0 context where the function is | ||
// not available ... | ||
if (!layer->driver.vkGetDeviceImageMemoryRequirementsKHR) | ||
{ | ||
pMemoryRequirements->memoryRequirements.size = 0; | ||
pMemoryRequirements->memoryRequirements.alignment = 0; | ||
pMemoryRequirements->memoryRequirements.memoryTypeBits = 0; | ||
return; | ||
} | ||
|
||
// Release the lock to call into the driver | ||
lock.unlock(); | ||
layer->driver.vkGetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.