mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 08:30:10 +01:00
venus: drop is_wsi tracking and some asserts
This is to help with kms support. Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36388>
This commit is contained in:
parent
8a156fb695
commit
e559d76066
5 changed files with 4 additions and 21 deletions
|
|
@ -287,8 +287,6 @@ vn_android_image_from_anb_internal(struct vn_device *dev,
|
|||
}
|
||||
}
|
||||
|
||||
img->wsi.is_wsi = true;
|
||||
|
||||
int dma_buf_fd = vn_android_gralloc_get_dma_buf_fd(anb_info->handle);
|
||||
if (dma_buf_fd < 0) {
|
||||
result = VK_ERROR_INVALID_EXTERNAL_HANDLE;
|
||||
|
|
|
|||
|
|
@ -218,8 +218,6 @@ vn_cmd_fix_image_memory_barrier_common(const struct vn_image *img,
|
|||
*new_layout != VK_IMAGE_LAYOUT_PRESENT_SRC_KHR)
|
||||
return result;
|
||||
|
||||
assert(img->wsi.is_wsi);
|
||||
|
||||
/* prime blit src or no layout transition */
|
||||
if (img->wsi.is_prime_blit_src || *old_layout == *new_layout) {
|
||||
if (*old_layout == VK_IMAGE_LAYOUT_PRESENT_SRC_KHR)
|
||||
|
|
|
|||
|
|
@ -425,7 +425,8 @@ vn_image_deferred_info_init(struct vn_image *img,
|
|||
((const VkImageFormatListCreateInfo *)src)->pViewFormats,
|
||||
size);
|
||||
info->list.pViewFormats = view_formats;
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO:
|
||||
memcpy(&info->stencil, src, sizeof(info->stencil));
|
||||
pnext = &info->stencil;
|
||||
|
|
@ -435,10 +436,8 @@ vn_image_deferred_info_init(struct vn_image *img,
|
|||
(uint32_t)((const VkExternalFormatANDROID *)src)->externalFormat;
|
||||
if (external_format != 0)
|
||||
info->create.format = external_format;
|
||||
} break;
|
||||
case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR:
|
||||
img->wsi.is_wsi = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -678,10 +677,6 @@ vn_CreateImage(VkDevice device,
|
|||
* Will have to fix more when renderer handle type is no longer dma_buf.
|
||||
*/
|
||||
if (wsi_info) {
|
||||
assert(wsi_info->blit_src ||
|
||||
wsi_info->scanout ||
|
||||
pCreateInfo->tiling == VK_IMAGE_TILING_LINEAR ||
|
||||
external_info->handleTypes == renderer_handle_type);
|
||||
result = vn_wsi_create_image(dev, pCreateInfo, wsi_info, alloc, &img);
|
||||
} else if (anb_info) {
|
||||
result =
|
||||
|
|
@ -829,8 +824,7 @@ vn_BindImageMemory2(VkDevice device,
|
|||
struct vn_device *dev = vn_device_from_handle(device);
|
||||
|
||||
for (uint32_t i = 0; i < bindInfoCount; i++) {
|
||||
struct vn_image *img = vn_image_from_handle(pBindInfos[i].image);
|
||||
if (img->wsi.is_wsi)
|
||||
if (pBindInfos[i].memory == VK_NULL_HANDLE)
|
||||
return vn_image_bind_wsi_memory(dev, bindInfoCount, pBindInfos);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,12 +62,6 @@ struct vn_image {
|
|||
struct vn_image_create_deferred_info *deferred_info;
|
||||
|
||||
struct {
|
||||
/* True if this is a swapchain image and VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
|
||||
* is a valid layout. A swapchain image can be created internally
|
||||
* (wsi_image_create_info) or externally (VkNativeBufferANDROID and
|
||||
* VkImageSwapchainCreateInfoKHR).
|
||||
*/
|
||||
bool is_wsi;
|
||||
bool is_prime_blit_src;
|
||||
|
||||
struct vn_device_memory *memory;
|
||||
|
|
|
|||
|
|
@ -151,7 +151,6 @@ vn_wsi_create_image(struct vn_device *dev,
|
|||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
img->wsi.is_wsi = true;
|
||||
img->wsi.is_prime_blit_src = wsi_info->blit_src;
|
||||
|
||||
*out_img = img;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue