mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
anv: Move code adding protected memory type to common code
Xe KMD now has support for protected memory, so lets move it to common code. 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/30723>
This commit is contained in:
parent
187e65002f
commit
a99d90d015
2 changed files with 12 additions and 12 deletions
|
|
@ -2034,6 +2034,18 @@ anv_physical_device_init_heaps(struct anv_physical_device *device, int fd)
|
|||
break;
|
||||
}
|
||||
|
||||
if (device->has_protected_contexts) {
|
||||
/* Add a memory type for protected buffers, local and not host
|
||||
* visible.
|
||||
*/
|
||||
device->memory.types[device->memory.type_count++] =
|
||||
(struct anv_memory_type) {
|
||||
.propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
|
||||
VK_MEMORY_PROPERTY_PROTECTED_BIT,
|
||||
.heapIndex = 0,
|
||||
};
|
||||
}
|
||||
|
||||
assert(device->memory.type_count < ARRAY_SIZE(device->memory.types));
|
||||
|
||||
if (result != VK_SUCCESS)
|
||||
|
|
|
|||
|
|
@ -207,18 +207,6 @@ anv_i915_physical_device_init_memory_types(struct anv_physical_device *device)
|
|||
};
|
||||
}
|
||||
|
||||
if (device->has_protected_contexts) {
|
||||
/* Add a memory type for protected buffers, local and not host
|
||||
* visible.
|
||||
*/
|
||||
device->memory.types[device->memory.type_count++] =
|
||||
(struct anv_memory_type) {
|
||||
.propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
|
||||
VK_MEMORY_PROPERTY_PROTECTED_BIT,
|
||||
.heapIndex = 0,
|
||||
};
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue