SWDEV-366992 - adding handle type for vk interop

Change-Id: I79ee0d89b948c21b96709e9e607abe7901621a97
This commit is contained in:
pghafari
2023-04-10 19:42:47 -04:00
committed by Payam Ghafari
parent d843c02843
commit 78de2ae692
5 changed files with 32 additions and 11 deletions
+2
View File
@@ -357,6 +357,8 @@ bool Memory::createInterop() {
memType = Resource::VkInterop;
vkRes.handle_ = vkObject->getVkSharedHandle();
vkRes.type_ = Resource::InteropTypeless;
vkRes.nt_handle_ =
(vkObject->getHandleType() == amd::VkObject::ExternalMemoryWin32) ? true : false;
}
else if (glObject != nullptr) {
+1
View File
@@ -763,6 +763,7 @@ bool Resource::CreateInterop(CreateParams* params) {
else if (memoryType() == VkInterop) {
VkInteropParams* vparams = reinterpret_cast<VkInteropParams*>(params);
openInfo.hExternalResource = vparams->handle_;
openInfo.flags.ntHandle = vparams->nt_handle_;
}
#ifdef ATI_OS_WIN
else {
+1
View File
@@ -139,6 +139,7 @@ class Resource : public amd::HeapObject {
struct VkInteropParams : public CreateParams {
InteropType type_; //!< Vulkan resource type
amd::Os::FileDesc handle_;
bool nt_handle_;
};
#ifdef _WIN32