mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 23:10:23 +01:00
iris: Allow fast clears on compressed image load/store access
While I haven't found documentation saying definitively that HDC supports fast clear blocks, it seems to work just fine, even on Tigerlake. I have found several issues (atomics and HDC support for linear compression) that both call out fast clears as an issue in those corner cases, which suggests that fast clears do actually work outside of those corners (which we already disable). The previous commit implemented actual aux state updates for image views. With ISL_AUX_USAGE_GFX12_CCS_E, this means that we update the aux state to COMPRESSED_CLEAR after writes. But because we weren't supporting fast clears, this meant that any such images would need partial resolves to remove the clear color on next use. Supporting fast clears allows us to drop all these resolves. Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19060>
This commit is contained in:
parent
7b2a690a35
commit
bf3d6ca94f
1 changed files with 11 additions and 1 deletions
|
|
@ -141,10 +141,20 @@ resolve_image_views(struct iris_context *ice,
|
|||
enum isl_aux_usage aux_usage =
|
||||
iris_image_view_aux_usage(ice, pview, info);
|
||||
|
||||
enum isl_format view_format = iris_image_view_get_format(ice, pview);
|
||||
|
||||
bool clear_supported = isl_aux_usage_has_fast_clears(aux_usage);
|
||||
|
||||
if (!iris_render_formats_color_compatible(view_format,
|
||||
res->surf.format,
|
||||
res->aux.clear_color,
|
||||
res->aux.clear_color_unknown))
|
||||
clear_supported = false;
|
||||
|
||||
iris_resource_prepare_access(ice, res,
|
||||
pview->u.tex.level, 1,
|
||||
pview->u.tex.first_layer, num_layers,
|
||||
aux_usage, false);
|
||||
aux_usage, clear_supported);
|
||||
|
||||
shs->image_aux_usage[i] = aux_usage;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue