mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
anv: Set VK_QUEUE_PROTECTED_BIT during queue families initialization
Don't make sense to only set it in VkGetPhysicalDeviceQueueFamilyProperties2(). Not setting it to the code path without pdevice->engine_info because the protected support landed on i915 after DRM_I915_QUERY_ENGINE_INFO. 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/28161>
This commit is contained in:
parent
9102cb972a
commit
c20388d617
1 changed files with 11 additions and 8 deletions
|
|
@ -2096,6 +2096,8 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
|
|||
uint32_t family_count = 0;
|
||||
VkQueueFlags sparse_flags = pdevice->sparse_type != ANV_SPARSE_TYPE_NOT_SUPPORTED ?
|
||||
VK_QUEUE_SPARSE_BINDING_BIT : 0;
|
||||
VkQueueFlags protected_flag = pdevice->has_protected_contexts ?
|
||||
VK_QUEUE_PROTECTED_BIT : 0;
|
||||
|
||||
if (pdevice->engine_info) {
|
||||
int gc_count =
|
||||
|
|
@ -2137,7 +2139,8 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
|
|||
.queueFlags = VK_QUEUE_GRAPHICS_BIT |
|
||||
VK_QUEUE_COMPUTE_BIT |
|
||||
VK_QUEUE_TRANSFER_BIT |
|
||||
sparse_flags,
|
||||
sparse_flags |
|
||||
protected_flag,
|
||||
.queueCount = gc_count,
|
||||
.engine_class = INTEL_ENGINE_CLASS_RENDER,
|
||||
};
|
||||
|
|
@ -2146,7 +2149,8 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
|
|||
pdevice->queue.families[family_count++] = (struct anv_queue_family) {
|
||||
.queueFlags = VK_QUEUE_GRAPHICS_BIT |
|
||||
VK_QUEUE_TRANSFER_BIT |
|
||||
sparse_flags,
|
||||
sparse_flags |
|
||||
protected_flag,
|
||||
.queueCount = g_count,
|
||||
.engine_class = INTEL_ENGINE_CLASS_RENDER,
|
||||
};
|
||||
|
|
@ -2155,7 +2159,8 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
|
|||
pdevice->queue.families[family_count++] = (struct anv_queue_family) {
|
||||
.queueFlags = VK_QUEUE_COMPUTE_BIT |
|
||||
VK_QUEUE_TRANSFER_BIT |
|
||||
sparse_flags,
|
||||
sparse_flags |
|
||||
protected_flag,
|
||||
.queueCount = c_count,
|
||||
.engine_class = compute_class,
|
||||
};
|
||||
|
|
@ -2171,6 +2176,7 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
|
|||
* When this bug is fixed we should be able to check HEVC support to determine the
|
||||
* correct number of queues.
|
||||
*/
|
||||
/* TODO: enable protected content on video queue */
|
||||
pdevice->queue.families[family_count++] = (struct anv_queue_family) {
|
||||
.queueFlags = VK_QUEUE_VIDEO_DECODE_BIT_KHR,
|
||||
.queueCount = pdevice->info.ver == 9 ? MIN2(1, v_count) : v_count,
|
||||
|
|
@ -2179,7 +2185,8 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
|
|||
}
|
||||
if (blit_count > 0) {
|
||||
pdevice->queue.families[family_count++] = (struct anv_queue_family) {
|
||||
.queueFlags = VK_QUEUE_TRANSFER_BIT,
|
||||
.queueFlags = VK_QUEUE_TRANSFER_BIT |
|
||||
protected_flag,
|
||||
.queueCount = blit_count,
|
||||
.engine_class = INTEL_ENGINE_CLASS_COPY,
|
||||
};
|
||||
|
|
@ -2732,10 +2739,6 @@ anv_device_physical_get_queue_properties(const struct anv_physical_device *devic
|
|||
|
||||
properties.queueFlags = family->queueFlags;
|
||||
properties.queueCount = family->queueCount;
|
||||
/* TODO: enable protected content on video queue */
|
||||
if (device->has_protected_contexts &&
|
||||
(family->queueFlags & VK_QUEUE_VIDEO_DECODE_BIT_KHR) == 0)
|
||||
properties.queueFlags |= VK_QUEUE_PROTECTED_BIT;
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue