anv: Remove protected memory types from default_buffer_mem_types

Without this application could allocate protected memory buffers
and use it in non-protected queues.

Fixes: c6a91f1695 ("anv: add new heap/pool for descriptor buffers")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28769>
This commit is contained in:
José Roberto de Souza 2024-04-16 08:03:24 -07:00 committed by Marge Bot
parent fc691d9f37
commit 68a91242dc
1 changed files with 1 additions and 0 deletions

View File

@ -1959,6 +1959,7 @@ anv_physical_device_init_heaps(struct anv_physical_device *device, int fd)
if (device->memory.types[i].propertyFlags &
VK_MEMORY_PROPERTY_PROTECTED_BIT) {
device->memory.protected_mem_types |= BITFIELD_BIT(i);
device->memory.default_buffer_mem_types &= (~BITFIELD_BIT(i));
continue;
}