mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-17 04:28:28 +02:00
anv: Store fast-clear colors with the view swizzle
Prevents the next patch from failing CTS tests such as: dEQP-VK.api.image_clearing.core.clear_color_image.*.b4g4r4a4* Brings back the feature that was introduced in commit46187bb54f("anv: Swizzle fast-clear values"), but went unused in commit721d0c3e77("anv,hasvk: Always use BLORP_BATCH_NO_UPDATE_CLEAR_COLOR"). Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32187>
This commit is contained in:
parent
2a9d7a3bd0
commit
93e42f9700
5 changed files with 11 additions and 2 deletions
|
|
@ -1474,6 +1474,7 @@ void anv_CmdClearColorImage(
|
|||
if (cmd_buffer->device->info->ver < 20) {
|
||||
anv_cmd_buffer_mark_image_fast_cleared(cmd_buffer, image,
|
||||
src_format.isl_format,
|
||||
src_format.swizzle,
|
||||
clear_color);
|
||||
}
|
||||
|
||||
|
|
@ -1705,6 +1706,7 @@ clear_color_attachment(struct anv_cmd_buffer *cmd_buffer,
|
|||
if (cmd_buffer->device->info->ver < 20) {
|
||||
anv_cmd_buffer_mark_image_fast_cleared(cmd_buffer, iview->image,
|
||||
iview->planes[0].isl.format,
|
||||
iview->planes[0].isl.swizzle,
|
||||
clear_color);
|
||||
anv_cmd_buffer_load_clear_color(cmd_buffer, att->surface_state.state,
|
||||
iview);
|
||||
|
|
|
|||
|
|
@ -345,10 +345,11 @@ void
|
|||
anv_cmd_buffer_mark_image_fast_cleared(struct anv_cmd_buffer *cmd_buffer,
|
||||
const struct anv_image *image,
|
||||
const enum isl_format format,
|
||||
const struct isl_swizzle swizzle,
|
||||
union isl_color_value clear_color)
|
||||
{
|
||||
const struct intel_device_info *devinfo = cmd_buffer->device->info;
|
||||
anv_genX(devinfo, set_fast_clear_state)(cmd_buffer, image, format,
|
||||
anv_genX(devinfo, set_fast_clear_state)(cmd_buffer, image, format, swizzle,
|
||||
clear_color);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ void
|
|||
genX(set_fast_clear_state)(struct anv_cmd_buffer *cmd_buffer,
|
||||
const struct anv_image *image,
|
||||
const enum isl_format format,
|
||||
const struct isl_swizzle swizzle,
|
||||
union isl_color_value clear_color);
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -5791,6 +5791,7 @@ void
|
|||
anv_cmd_buffer_mark_image_fast_cleared(struct anv_cmd_buffer *cmd_buffer,
|
||||
const struct anv_image *image,
|
||||
const enum isl_format format,
|
||||
const struct isl_swizzle swizzle,
|
||||
union isl_color_value clear_color);
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -977,10 +977,13 @@ void
|
|||
genX(set_fast_clear_state)(struct anv_cmd_buffer *cmd_buffer,
|
||||
const struct anv_image *image,
|
||||
const enum isl_format format,
|
||||
const struct isl_swizzle swizzle,
|
||||
union isl_color_value clear_color)
|
||||
{
|
||||
uint32_t pixel[4] = {};
|
||||
isl_color_value_pack(&clear_color, format, pixel);
|
||||
union isl_color_value swiz_color =
|
||||
isl_color_value_swizzle_inv(clear_color, swizzle);
|
||||
isl_color_value_pack(&swiz_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)) {
|
||||
|
|
@ -5414,6 +5417,7 @@ void genX(CmdBeginRendering)(
|
|||
#if GFX_VER < 20
|
||||
genX(set_fast_clear_state)(cmd_buffer, iview->image,
|
||||
iview->planes[0].isl.format,
|
||||
iview->planes[0].isl.swizzle,
|
||||
clear_color);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue