Add string feature 'VulkanExternalMemoryMode' to override the memoryMode#111
Add string feature 'VulkanExternalMemoryMode' to override the memoryMode#111aaron-ruby wants to merge 4 commits intogoogle:mainfrom
Conversation
| "When enabled, allows host to use VK_KHR_external_memory_fd for Vulkan emulation and " | ||
| "memory sharing. " | ||
| "This corresponds to the externalMemoryMode that the host VkEmulation chooses." | ||
| "By default, this option is enabled. However, some platforms may explicitly choose not to " |
There was a problem hiding this comment.
So is the desired behavior just that screen buffer is selected over opaque fd in some cases?
I guess I'm just curious if would make more sense to just introduce some kind of "ExternalMemoryMode" feature that is a string where you can explicitly specify the mode you want (or potentially a "SupportedExternalMemoryModes" feature that is like a list of supported modes in the preferred order). Then we can add like a
GFXSTREAM_SET_FEATURE(&features, ExternalMemoryMode,
#if defined(ANDROID)
"ahb"
#elif defined(QNX)
"screenbuffer"
#elif ...
#endif
);
There was a problem hiding this comment.
Yeah exactly, you got it.
Yeah I was trying to figure out how to do this in the most universal way. Right now, i guess calculateMode() prioritizes based on the order in this list, but you're right; we basically just want a way to change that order, otherwise default to what is already there.
What you've suggested is a great idea! I will prototype that ...
fe43e69 to
a922b6d
Compare
|
@jmacnak updated the review ... allows for some features to specify a string value, instead of just their enabled/disabled boolean. That's the "features" part of the change. Then the rest is actually using that string value (as a This is a bit of an extension of the "Features" functionality ... so maybe I went to heavy-handed. Please let me know. |
95a89da to
a3f1caf
Compare
|
Some testing: With With With |
a3f1caf to
28bc38a
Compare
|
Latest patchset includes:
If desired, please review invidual commits to see grouped/related changes. |
28bc38a to
ad14a9f
Compare
ad14a9f to
932f603
Compare
... to allow for features specified as string values, not just "enabled"/"disabled".
932f603 to
d6cfbc0
Compare
d6cfbc0 to
64e4a2b
Compare
... following the priority-order of Apple external memory, for example.
64e4a2b to
9188e44
Compare
|
@jmacnak ready for review. |
…ver using OpaqueFd memoryMode. And add OpaqueFd as a supported externalMemory mode on QNX.