Is it possible to tell if the handle is a GPU handle (e.g. 0x000000000000157c)?
Sorta. You should get a
Of course you should know if it is, because you need to create it and you need to match the GUIDs (or LUIDs) of the GPU across the APIs.
Or maybe trying to re-import it in DX would fail with some
I am now getting
VK_ERROR_OUT_OF_DEVICE_MEMORY . Do you know what the problem is?
I think it might be if you do not check if it needs a Dedicated Allocation.
On AMD I had problems with a bug that it does not properly report in queries. Write a magic value to a query parameter, and check afterwards if the driver actually modifies the value.
Otherwise just go over the Valid Usage section like a checklist.
I was wondering if the same string can be used to access the same memory in Vulkan?
Well yea, I would assume that is what the parameter does.
Regarding your previous comment: how do I create a Vulkan texture from a DX11 texture?
You mean how to create DX11 texture from Vulkan Image?
If you are gonna copy anyway, it feels more natural this direction.
vkCreateImage as you would normally do. Use
vkGetMemoryWin32HandleKHR to get
OpenSharedResource on DX and copy into it.
Is it possible to do it without copying the texture to the CPU memory?
That’s what the extension is for. The assumption is import\export is 0-copy; just a type cast.