venus: relax 2 assertions for prime blit path

Prime blit can be used in setups like venus on lavapipe over vtest. It's
native env so Venus relies on renderer side driver to tell about the pci
info, while lavapipe doesn't implement that extension, which ends up
with mismatched gpu thus prime blit.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33956>
This commit is contained in:
Yiwei Zhang 2025-03-07 23:33:41 -08:00 committed by Marge Bot
parent de91b18be4
commit a315a64291
2 changed files with 5 additions and 5 deletions

View file

@ -673,7 +673,8 @@ vn_CreateImage(VkDevice device,
* Will have to fix more when renderer handle type is no longer dma_buf. * Will have to fix more when renderer handle type is no longer dma_buf.
*/ */
if (wsi_info) { if (wsi_info) {
assert(external_info->handleTypes == renderer_handle_type); assert(wsi_info->blit_src ||
external_info->handleTypes == renderer_handle_type);
result = vn_wsi_create_image(dev, pCreateInfo, wsi_info, alloc, &img); result = vn_wsi_create_image(dev, pCreateInfo, wsi_info, alloc, &img);
} else if (anb_info) { } else if (anb_info) {
result = result =

View file

@ -514,10 +514,8 @@ vn_queue_submission_prepare(struct vn_queue_submission *submit)
submit->batch_type != VK_STRUCTURE_TYPE_BIND_SPARSE_INFO) { submit->batch_type != VK_STRUCTURE_TYPE_BIND_SPARSE_INFO) {
const struct wsi_memory_signal_submit_info *info = vk_find_struct_const( const struct wsi_memory_signal_submit_info *info = vk_find_struct_const(
submit->submit_batches[0].pNext, WSI_MEMORY_SIGNAL_SUBMIT_INFO_MESA); submit->submit_batches[0].pNext, WSI_MEMORY_SIGNAL_SUBMIT_INFO_MESA);
if (info) { if (info)
submit->wsi_mem = vn_device_memory_from_handle(info->memory); submit->wsi_mem = vn_device_memory_from_handle(info->memory);
assert(submit->wsi_mem->base_bo);
}
} }
for (uint32_t i = 0; i < submit->batch_count; i++) { for (uint32_t i = 0; i < submit->batch_count; i++) {
@ -988,7 +986,8 @@ vn_queue_wsi_present(struct vn_queue_submission *submit)
struct vk_queue *queue_vk = vk_queue_from_handle(submit->queue_handle); struct vk_queue *queue_vk = vk_queue_from_handle(submit->queue_handle);
struct vn_device *dev = (void *)queue_vk->base.device; struct vn_device *dev = (void *)queue_vk->base.device;
if (!submit->wsi_mem) /* base_bo can be NULL for prime blit src */
if (!submit->wsi_mem || !submit->wsi_mem->base_bo)
return; return;
if (dev->renderer->info.has_implicit_fencing) { if (dev->renderer->info.has_implicit_fencing) {