aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_blorp.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2020-03-17 13:12:35 -0500
committerMarge Bot <[email protected]>2020-03-18 21:05:07 +0000
commit46187bb54fe7a0ccfbafa09c5a168fb45da172d4 (patch)
treed138b41e8ff7c4d5a6e9107cbba87a96769c490d /src/intel/vulkan/anv_blorp.c
parent3fb8f1948167c77f05f89b3a0933cbe2a1280b8d (diff)
anv: Swizzle fast-clear values
Starting with Gen12, we can fast-clear a lot more surface formats and we are suddenly in the position of having to fast-clear surfaces with formats with an implicit swizzle such as VK_FORMAT_R4G4B4A4_UNORM_PACK16 which is represented as ISL_FORMAT_A4B4G4R4 with a BGRA swizzle. In order for blorp to do the fast-clear color conversion for us, it needs a properly swizzled color. This fixes the following Vulkan CTS groups on TGL: - dEQP-VK.pipeline.blend.format.b4g4r4a4_unorm_pack16.* - dEQP-VK.api.image_clearing.core.clear_color_image.*.b4g4r4a4* Cc: [email protected] Reviewed-by: Lionel Landwerlin <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4218> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4218>
Diffstat (limited to 'src/intel/vulkan/anv_blorp.c')
-rw-r--r--src/intel/vulkan/anv_blorp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index 0409ef099ea..97ef5f98051 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -1732,7 +1732,7 @@ anv_image_hiz_clear(struct anv_cmd_buffer *cmd_buffer,
void
anv_image_mcs_op(struct anv_cmd_buffer *cmd_buffer,
const struct anv_image *image,
- enum isl_format format,
+ enum isl_format format, struct isl_swizzle swizzle,
VkImageAspectFlagBits aspect,
uint32_t base_layer, uint32_t layer_count,
enum isl_aux_op mcs_op, union isl_color_value *clear_value,
@@ -1782,7 +1782,7 @@ anv_image_mcs_op(struct anv_cmd_buffer *cmd_buffer,
switch (mcs_op) {
case ISL_AUX_OP_FAST_CLEAR:
- blorp_fast_clear(&batch, &surf, format, ISL_SWIZZLE_IDENTITY,
+ blorp_fast_clear(&batch, &surf, format, swizzle,
0, base_layer, layer_count,
0, 0, image->extent.width, image->extent.height);
break;
@@ -1805,7 +1805,7 @@ anv_image_mcs_op(struct anv_cmd_buffer *cmd_buffer,
void
anv_image_ccs_op(struct anv_cmd_buffer *cmd_buffer,
const struct anv_image *image,
- enum isl_format format,
+ enum isl_format format, struct isl_swizzle swizzle,
VkImageAspectFlagBits aspect, uint32_t level,
uint32_t base_layer, uint32_t layer_count,
enum isl_aux_op ccs_op, union isl_color_value *clear_value,
@@ -1863,7 +1863,7 @@ anv_image_ccs_op(struct anv_cmd_buffer *cmd_buffer,
switch (ccs_op) {
case ISL_AUX_OP_FAST_CLEAR:
- blorp_fast_clear(&batch, &surf, format, ISL_SWIZZLE_IDENTITY,
+ blorp_fast_clear(&batch, &surf, format, swizzle,
level, base_layer, layer_count,
0, 0, level_width, level_height);
break;