nvk: Don't assert memory placement on import
Instead, we assert that the non-placement flags match, which is currently CAN_MAP and SHARED. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35213>
This commit is contained in:
@@ -178,8 +178,7 @@ nvk_AllocateMemory(VkDevice device,
|
||||
/* We can't really assert anything for dma-bufs because they could come
|
||||
* in from some other device.
|
||||
*/
|
||||
if (fd_info->handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT)
|
||||
assert(!(flags & ~mem->mem->flags));
|
||||
assert(!(flags & ~mem->mem->flags & ~NVKMD_MEM_PLACEMENT_FLAGS));
|
||||
} else if (pte_kind != 0 || tile_mode != 0) {
|
||||
result = nvkmd_dev_alloc_tiled_mem(dev->nvkmd, &dev->vk.base,
|
||||
aligned_size, alignment,
|
||||
|
||||
@@ -55,6 +55,9 @@ enum nvkmd_mem_flags {
|
||||
NVKMD_MEM_SHARED = 1 << 4,
|
||||
};
|
||||
|
||||
#define NVKMD_MEM_PLACEMENT_FLAGS \
|
||||
(NVKMD_MEM_LOCAL | NVKMD_MEM_GART | NVKMD_MEM_VRAM)
|
||||
|
||||
enum nvkmd_mem_map_flags {
|
||||
NVKMD_MEM_MAP_RD = 1 << 0,
|
||||
NVKMD_MEM_MAP_WR = 1 << 1,
|
||||
|
||||
Reference in New Issue
Block a user