mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
Merge branch 'pvr-allow-storage-wsi-images' into 'main'
pvr: allow STORAGE usage for WSI images See merge request mesa/mesa!41382
This commit is contained in:
commit
9bc78b2405
1 changed files with 13 additions and 1 deletions
|
|
@ -629,6 +629,16 @@ pvr_get_image_format_properties(struct pvr_physical_device *pdevice,
|
|||
goto err_unsupported_format;
|
||||
}
|
||||
|
||||
/* Allow STORAGE usage for WSI linear images, which is expected by the
|
||||
* Vulkan specification (because WSI images should be as capable as optimal
|
||||
* images). WSI images are expected to be all 2D.
|
||||
*/
|
||||
if (vk_find_struct_const(info->pNext, WSI_IMAGE_CREATE_INFO_MESA) &&
|
||||
tiling == VK_IMAGE_TILING_LINEAR &&
|
||||
(pvr_format->bind & PVR_BIND_STORAGE_IMAGE)) {
|
||||
tiling_features2 |= VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT;
|
||||
}
|
||||
|
||||
/* If VK_IMAGE_CREATE_EXTENDED_USAGE_BIT is set, the driver can't decide if a
|
||||
* specific format isn't supported based on the usage.
|
||||
*/
|
||||
|
|
@ -809,7 +819,8 @@ VkResult pvr_GetPhysicalDeviceImageFormatProperties2(
|
|||
|
||||
/* Extract input structs */
|
||||
vk_foreach_struct_const (ext, pImageFormatInfo->pNext) {
|
||||
switch (ext->sType) {
|
||||
/* Casting to accept Mesa-private types w/o compiler warning */
|
||||
switch ((unsigned)ext->sType) {
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO:
|
||||
external_info = (const void *)ext;
|
||||
break;
|
||||
|
|
@ -817,6 +828,7 @@ VkResult pvr_GetPhysicalDeviceImageFormatProperties2(
|
|||
break;
|
||||
case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO:
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT:
|
||||
case VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA:
|
||||
/* Nothing to do here, it's handled in
|
||||
* pvr_get_image_format_properties)
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue