diff --git a/src/intel/vulkan/anv_physical_device.c b/src/intel/vulkan/anv_physical_device.c index e496baacb85..e1e021bdc99 100644 --- a/src/intel/vulkan/anv_physical_device.c +++ b/src/intel/vulkan/anv_physical_device.c @@ -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) diff --git a/src/intel/vulkan/i915/anv_device.c b/src/intel/vulkan/i915/anv_device.c index 1c5bbf23ba5..d6fd25009c2 100644 --- a/src/intel/vulkan/i915/anv_device.c +++ b/src/intel/vulkan/i915/anv_device.c @@ -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; }