diff --git a/src/microsoft/vulkan/dzn_device.c b/src/microsoft/vulkan/dzn_device.c index 16d946718b7..c7064d4cca2 100644 --- a/src/microsoft/vulkan/dzn_device.c +++ b/src/microsoft/vulkan/dzn_device.c @@ -2963,13 +2963,12 @@ dzn_device_memory_create(struct dzn_device *device, if (export_flags) { error = VK_ERROR_INVALID_EXTERNAL_HANDLE; ID3D12DeviceChild *shareable = mem->heap ? (void *)mem->heap : (void *)mem->dedicated_res; + DWORD dwAccess = GENERIC_ALL; /* Ignore any provided access, this is the only one D3D allows */ #ifdef _WIN32 const SECURITY_ATTRIBUTES *pAttributes = win32_export ? win32_export->pAttributes : NULL; - DWORD dwAccess = win32_export ? win32_export->dwAccess : GENERIC_ALL; const wchar_t *name = win32_export ? win32_export->name : NULL; #else const SECURITY_ATTRIBUTES *pAttributes = NULL; - DWORD dwAccess = GENERIC_ALL; const wchar_t *name = NULL; #endif if (FAILED(ID3D12Device_CreateSharedHandle(device->dev, shareable, pAttributes, diff --git a/src/microsoft/vulkan/dzn_sync.c b/src/microsoft/vulkan/dzn_sync.c index 76e047c57b7..0736401e2e4 100644 --- a/src/microsoft/vulkan/dzn_sync.c +++ b/src/microsoft/vulkan/dzn_sync.c @@ -274,7 +274,7 @@ dzn_sync_prep_win32_export(struct vk_device *device, struct vk_sync *sync, struct dzn_device *ddev = container_of(device, struct dzn_device, vk); if (FAILED(ID3D12Device_CreateSharedHandle(ddev->dev, (ID3D12DeviceChild *)dsync->fence, (const LPSECURITY_ATTRIBUTES)security_attributes, - access, name, &dsync->export_handle))) + GENERIC_ALL, name, &dsync->export_handle))) return vk_error(device, VK_ERROR_OUT_OF_DEVICE_MEMORY); return VK_SUCCESS; }