mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 12:18:09 +02:00
anv: fix fast clear type value with external images
Disable fast clear if not supported by the external modifier. v2: Set fast_clear value to NONE in case of import/export from/to external v3: Move logic next to existing acquire/release checks (Nanley) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6056 Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15096>
This commit is contained in:
parent
02fab4cf9e
commit
214092da87
1 changed files with 8 additions and 4 deletions
|
|
@ -1423,14 +1423,22 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer,
|
|||
anv_layout_to_aux_usage(devinfo, image, aspect, 0, initial_layout);
|
||||
enum isl_aux_usage final_aux_usage =
|
||||
anv_layout_to_aux_usage(devinfo, image, aspect, 0, final_layout);
|
||||
enum anv_fast_clear_type initial_fast_clear =
|
||||
anv_layout_to_fast_clear_type(devinfo, image, aspect, initial_layout);
|
||||
enum anv_fast_clear_type final_fast_clear =
|
||||
anv_layout_to_fast_clear_type(devinfo, image, aspect, final_layout);
|
||||
|
||||
/* We must override the anv_layout_to_* functions because they are unaware of
|
||||
* acquire/release direction.
|
||||
*/
|
||||
if (private_binding_acquire) {
|
||||
initial_aux_usage = isl_mod_info->aux_usage;
|
||||
initial_fast_clear = isl_mod_info->supports_clear_color ?
|
||||
initial_fast_clear : ANV_FAST_CLEAR_NONE;
|
||||
} else if (private_binding_release) {
|
||||
final_aux_usage = isl_mod_info->aux_usage;
|
||||
final_fast_clear = isl_mod_info->supports_clear_color ?
|
||||
final_fast_clear : ANV_FAST_CLEAR_NONE;
|
||||
}
|
||||
|
||||
/* The current code assumes that there is no mixing of CCS_E and CCS_D.
|
||||
|
|
@ -1453,10 +1461,6 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer,
|
|||
/* If the initial layout supports more fast clear than the final layout
|
||||
* then we need at least a partial resolve.
|
||||
*/
|
||||
const enum anv_fast_clear_type initial_fast_clear =
|
||||
anv_layout_to_fast_clear_type(devinfo, image, aspect, initial_layout);
|
||||
const enum anv_fast_clear_type final_fast_clear =
|
||||
anv_layout_to_fast_clear_type(devinfo, image, aspect, final_layout);
|
||||
if (final_fast_clear < initial_fast_clear)
|
||||
resolve_op = ISL_AUX_OP_PARTIAL_RESOLVE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue