mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
venus: fix VkDeviceGroupSubmitInfo::deviceMask for feedback cmds
Unlike sync2, a legacy deviceMask of zero is indeed to skip.
Fixes: 80f532a636 ("venus: fix VkDeviceGroupSubmitInfo cmd counts from feedback")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28888>
This commit is contained in:
parent
46e4354940
commit
4fc3f11545
3 changed files with 11 additions and 2 deletions
|
|
@ -447,6 +447,7 @@ vn_device_init(struct vn_device *dev,
|
|||
|
||||
dev->instance = instance;
|
||||
dev->physical_device = physical_dev;
|
||||
dev->device_mask = 1;
|
||||
dev->renderer = instance->renderer;
|
||||
dev->primary_ring = instance->ring.ring;
|
||||
|
||||
|
|
@ -455,6 +456,11 @@ vn_device_init(struct vn_device *dev,
|
|||
if (!create_info)
|
||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
|
||||
const VkDeviceGroupDeviceCreateInfo *group = vk_find_struct_const(
|
||||
create_info->pNext, DEVICE_GROUP_DEVICE_CREATE_INFO);
|
||||
if (group && group->physicalDeviceCount)
|
||||
dev->device_mask = (1 << group->physicalDeviceCount) - 1;
|
||||
|
||||
result = vn_call_vkCreateDevice(dev->primary_ring, physical_dev_handle,
|
||||
create_info, NULL, &dev_handle);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ struct vn_device {
|
|||
|
||||
struct vn_instance *instance;
|
||||
struct vn_physical_device *physical_device;
|
||||
uint32_t device_mask;
|
||||
struct vn_renderer *renderer;
|
||||
struct vn_ring *primary_ring;
|
||||
|
||||
|
|
|
|||
|
|
@ -319,6 +319,8 @@ static void
|
|||
vn_fix_device_group_cmd_count(struct vn_queue_submission *submit,
|
||||
uint32_t batch_index)
|
||||
{
|
||||
struct vk_queue *queue_vk = vk_queue_from_handle(submit->queue_handle);
|
||||
struct vn_device *dev = (void *)queue_vk->base.device;
|
||||
const VkSubmitInfo *src_batch = &submit->submit_batches[batch_index];
|
||||
struct vn_submit_info_pnext_fix *pnext_fix = submit->temp.pnexts;
|
||||
VkBaseOutStructure *dst =
|
||||
|
|
@ -343,9 +345,9 @@ vn_fix_device_group_cmd_count(struct vn_queue_submission *submit,
|
|||
sizeof(uint32_t) * orig_cmd_count);
|
||||
}
|
||||
|
||||
/* Set feedback cmd device masks to 0 */
|
||||
/* Set the group device mask. Unlike sync2, zero means skip. */
|
||||
for (uint32_t i = orig_cmd_count; i < new_cmd_count; i++) {
|
||||
submit->temp.dev_masks[i] = 0;
|
||||
submit->temp.dev_masks[i] = dev->device_mask;
|
||||
}
|
||||
|
||||
pnext_fix->group.commandBufferCount = new_cmd_count;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue