mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
anv: Don't allow STORAGE + CCS for Y_TILED mod
This can happen as a result of us adding on CCS to modifiers which don't support it on gfx9-11. Fixes image corruption seen with the following test: $ mpv av://lavfi:testsrc --config=no --vo=gpu-next --scale=ewa_lanczossharp --fs Fixes:01c4ea771c("anv: Enable storage accesses with modifiers on gfx12+") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12910 Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (cherry picked from commitfe372f3b1b) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
This commit is contained in:
parent
418e7cfad1
commit
5a9c6de6d3
2 changed files with 8 additions and 4 deletions
|
|
@ -1644,7 +1644,7 @@
|
|||
"description": "anv: Don't allow STORAGE + CCS for Y_TILED mod",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "01c4ea771cd6c091320c918553fd7de3f2b9940e",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -506,8 +506,7 @@ anv_formats_ccs_e_compatible(const struct anv_physical_device *physical_device,
|
|||
return false;
|
||||
}
|
||||
|
||||
if ((vk_usage & VK_IMAGE_USAGE_STORAGE_BIT) &&
|
||||
vk_tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
|
||||
if (vk_usage & VK_IMAGE_USAGE_STORAGE_BIT) {
|
||||
/* Only color */
|
||||
assert((vk_format_aspects(vk_format) & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0);
|
||||
if (devinfo->ver == 12) {
|
||||
|
|
@ -523,8 +522,13 @@ anv_formats_ccs_e_compatible(const struct anv_physical_device *physical_device,
|
|||
* On gfx12.0, compression is not supported with atomic
|
||||
* operations. On gfx12.5, the support is there, but it's slow
|
||||
* (see HSD 1406337848).
|
||||
*
|
||||
* We only care about the non-modifier case. Modifier capabilities
|
||||
* are exposed via the standard interfaces and unlike prior
|
||||
* platforms, we don't enable compression for uncompressed modifiers.
|
||||
*/
|
||||
if (image_may_use_r32_view(create_flags, vk_format, fmt_list))
|
||||
if (vk_tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT &&
|
||||
image_may_use_r32_view(create_flags, vk_format, fmt_list))
|
||||
return false;
|
||||
|
||||
} else if (devinfo->ver <= 11) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue