mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
iris: Skip some fast-clears even on color changes
Previously, we only skipped fast-clearing if the aux state was CLEAR and the clear color hadn't changed. That was because we relied on blorp_fast_clear() to update the clear color for us. Now that we update the clear color outside of blorp_fast_clear(), also skip fast-clearing when the clear color changes while in the CLEAR state. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30824>
This commit is contained in:
parent
2886851a8e
commit
64d861b700
1 changed files with 8 additions and 8 deletions
|
|
@ -259,14 +259,6 @@ fast_clear_color(struct iris_context *ice,
|
||||||
|
|
||||||
iris_resource_set_clear_color(ice, res, color);
|
iris_resource_set_clear_color(ice, res, color);
|
||||||
|
|
||||||
/* If the buffer is already in ISL_AUX_STATE_CLEAR, and the color hasn't
|
|
||||||
* changed, the clear is redundant and can be skipped.
|
|
||||||
*/
|
|
||||||
const enum isl_aux_state aux_state =
|
|
||||||
iris_resource_get_aux_state(res, level, box->z);
|
|
||||||
if (!color_changed && box->depth == 1 && aux_state == ISL_AUX_STATE_CLEAR)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Ivybridge PRM Vol 2, Part 1, "11.7 MCS Buffer for Render Target(s)":
|
/* Ivybridge PRM Vol 2, Part 1, "11.7 MCS Buffer for Render Target(s)":
|
||||||
*
|
*
|
||||||
* "Any transition from any value in {Clear, Render, Resolve} to a
|
* "Any transition from any value in {Clear, Render, Resolve} to a
|
||||||
|
|
@ -292,6 +284,14 @@ fast_clear_color(struct iris_context *ice,
|
||||||
if (color_changed && res->aux.clear_color_bo)
|
if (color_changed && res->aux.clear_color_bo)
|
||||||
iris_resource_update_indirect_color(batch, res);
|
iris_resource_update_indirect_color(batch, res);
|
||||||
|
|
||||||
|
/* If the buffer is already in ISL_AUX_STATE_CLEAR, the clear is redundant
|
||||||
|
* and can be skipped.
|
||||||
|
*/
|
||||||
|
const enum isl_aux_state aux_state =
|
||||||
|
iris_resource_get_aux_state(res, level, box->z);
|
||||||
|
if (box->depth == 1 && aux_state == ISL_AUX_STATE_CLEAR)
|
||||||
|
return;
|
||||||
|
|
||||||
iris_batch_sync_region_start(batch);
|
iris_batch_sync_region_start(batch);
|
||||||
|
|
||||||
struct blorp_batch blorp_batch;
|
struct blorp_batch blorp_batch;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue