mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 15:30:14 +01:00
anv/sparse: don't support depth/stencil with sparse
We can't support multi-sampling with depth/stencil, only 1x and only with 2D and sometimes 3D formats. Claim everything as not supported, since games don't seem to be affected. This will be noticeable once we fix anv_GetPhysicalDeviceImageFormatProperties2() to stop (accidentally) lying about what we support: without this patch we'll get failures. It seems CTS expects that, if we do support the format, we have to support it with multi-sampling as well. Testcase: dEQP-VK.api.info.image_format_properties.2d.optimal.s8_uint (and 5 others) Reviewed-by: Iván Briano <ivan.briano@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35524>
This commit is contained in:
parent
420cda4798
commit
d5da6980d3
1 changed files with 7 additions and 29 deletions
|
|
@ -1622,37 +1622,15 @@ anv_sparse_image_check_support(struct anv_physical_device *pdevice,
|
||||||
return VK_ERROR_FEATURE_NOT_PRESENT;
|
return VK_ERROR_FEATURE_NOT_PRESENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* While the Vulkan spec allows us to support depth/stencil sparse images
|
/* While our hardware allows us to support sparse with some depth/stencil
|
||||||
* everywhere, sometimes we're not able to have them with the tiling
|
* formats (e.g., single-sampled 2D), the spec seems to be expecting that,
|
||||||
* formats that give us the standard block shapes. Having standard block
|
* if we support a format, we have to support it with all the multi-sampled
|
||||||
* shapes is higher priority than supporting depth/stencil sparse images.
|
* flags we support for non-sparse. Therefore, just give up depth/stencil
|
||||||
*
|
* entirely since games don't seem to be requiring it.
|
||||||
* Please see ISL's filter_tiling() functions for accurate explanations on
|
|
||||||
* why depth/stencil images are not always supported with the tiling
|
|
||||||
* formats we want. But in short: depth/stencil support in our HW is
|
|
||||||
* limited to 2D and we can't build a 2D view of a 3D image with these
|
|
||||||
* tiling formats due to the address swizzling being different.
|
|
||||||
*/
|
*/
|
||||||
VkImageAspectFlags aspects = vk_format_aspects(vk_format);
|
VkImageAspectFlags aspects = vk_format_aspects(vk_format);
|
||||||
if (aspects & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
|
if (aspects & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT))
|
||||||
/* For multi-sampled images, the image layouts for color and
|
|
||||||
* depth/stencil are different, and only the color layout is compatible
|
|
||||||
* with the standard block shapes.
|
|
||||||
*/
|
|
||||||
valid_samples &= VK_SAMPLE_COUNT_1_BIT;
|
|
||||||
|
|
||||||
/* For 125+, isl_gfx125_filter_tiling() claims 3D is not supported.
|
|
||||||
* For the previous platforms, isl_gfx6_filter_tiling() says only 2D is
|
|
||||||
* supported.
|
|
||||||
*/
|
|
||||||
if (pdevice->info.verx10 >= 125) {
|
|
||||||
if (type == VK_IMAGE_TYPE_3D)
|
|
||||||
return VK_ERROR_FORMAT_NOT_SUPPORTED;
|
return VK_ERROR_FORMAT_NOT_SUPPORTED;
|
||||||
} else {
|
|
||||||
if (type != VK_IMAGE_TYPE_2D)
|
|
||||||
return VK_ERROR_FORMAT_NOT_SUPPORTED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const struct anv_format *anv_format = anv_get_format(pdevice, vk_format);
|
const struct anv_format *anv_format = anv_get_format(pdevice, vk_format);
|
||||||
if (!anv_format)
|
if (!anv_format)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue