mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
dzn: Ignore export access parameters
D3D requires these to just be GENERIC_ALL. Fixes some sharing tests.
Fixes: c64f1b66 ("dzn: Hook up win32 semaphore import/export")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23772>
This commit is contained in:
parent
63f44951ac
commit
2a1d97e3fc
2 changed files with 2 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue