mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 18:00:13 +01:00
anv,hasvk: Always use BLORP_BATCH_NO_UPDATE_CLEAR_COLOR
Store the clear color from within the drivers, rather than from BLORP. 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
5fd42500cf
commit
721d0c3e77
4 changed files with 11 additions and 4 deletions
|
|
@ -2387,7 +2387,7 @@ anv_image_mcs_op(struct anv_cmd_buffer *cmd_buffer,
|
|||
struct blorp_batch batch;
|
||||
anv_blorp_batch_init(cmd_buffer, &batch,
|
||||
BLORP_BATCH_PREDICATE_ENABLE * predicate +
|
||||
BLORP_BATCH_NO_UPDATE_CLEAR_COLOR * !clear_value);
|
||||
BLORP_BATCH_NO_UPDATE_CLEAR_COLOR);
|
||||
assert((batch.flags & BLORP_BATCH_USE_COMPUTE) == 0);
|
||||
|
||||
exec_mcs_op(cmd_buffer, &batch, image, format, swizzle, aspect,
|
||||
|
|
@ -2408,7 +2408,7 @@ anv_image_ccs_op(struct anv_cmd_buffer *cmd_buffer,
|
|||
struct blorp_batch batch;
|
||||
anv_blorp_batch_init(cmd_buffer, &batch,
|
||||
BLORP_BATCH_PREDICATE_ENABLE * predicate +
|
||||
BLORP_BATCH_NO_UPDATE_CLEAR_COLOR * !clear_value);
|
||||
BLORP_BATCH_NO_UPDATE_CLEAR_COLOR);
|
||||
assert((batch.flags & BLORP_BATCH_USE_COMPUTE) == 0);
|
||||
|
||||
exec_ccs_op(cmd_buffer, &batch, image, format, swizzle, aspect, level,
|
||||
|
|
|
|||
|
|
@ -960,6 +960,10 @@ genX(set_fast_clear_state)(struct anv_cmd_buffer *cmd_buffer,
|
|||
const enum isl_format format,
|
||||
union isl_color_value clear_color)
|
||||
{
|
||||
uint32_t pixel[4];
|
||||
isl_color_value_pack(&clear_color, format, pixel);
|
||||
set_image_clear_color(cmd_buffer, image, VK_IMAGE_ASPECT_COLOR_BIT, pixel);
|
||||
|
||||
if (isl_color_value_is_zero(clear_color, format)) {
|
||||
/* This image has the auxiliary buffer enabled. We can mark the
|
||||
* subresource as not needing a resolve because the clear color
|
||||
|
|
|
|||
|
|
@ -1787,7 +1787,7 @@ anv_image_mcs_op(struct anv_cmd_buffer *cmd_buffer,
|
|||
struct blorp_batch batch;
|
||||
anv_blorp_batch_init(cmd_buffer, &batch,
|
||||
BLORP_BATCH_PREDICATE_ENABLE * predicate +
|
||||
BLORP_BATCH_NO_UPDATE_CLEAR_COLOR * !clear_value);
|
||||
BLORP_BATCH_NO_UPDATE_CLEAR_COLOR);
|
||||
assert((batch.flags & BLORP_BATCH_USE_COMPUTE) == 0);
|
||||
|
||||
struct blorp_surf surf;
|
||||
|
|
@ -1877,7 +1877,7 @@ anv_image_ccs_op(struct anv_cmd_buffer *cmd_buffer,
|
|||
struct blorp_batch batch;
|
||||
anv_blorp_batch_init(cmd_buffer, &batch,
|
||||
BLORP_BATCH_PREDICATE_ENABLE * predicate +
|
||||
BLORP_BATCH_NO_UPDATE_CLEAR_COLOR * !clear_value);
|
||||
BLORP_BATCH_NO_UPDATE_CLEAR_COLOR);
|
||||
assert((batch.flags & BLORP_BATCH_USE_COMPUTE) == 0);
|
||||
|
||||
struct blorp_surf surf;
|
||||
|
|
|
|||
|
|
@ -5196,6 +5196,9 @@ void genX(CmdBeginRendering)(
|
|||
base_clear_layer++;
|
||||
clear_layer_count--;
|
||||
|
||||
set_image_clear_color(cmd_buffer, iview->image,
|
||||
VK_IMAGE_ASPECT_COLOR_BIT, clear_color);
|
||||
|
||||
if (isl_color_value_is_zero(clear_color,
|
||||
iview->planes[0].isl.format)) {
|
||||
/* This image has the auxiliary buffer enabled. We can mark the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue