From: Jason Ekstrand Date: Sat, 11 Nov 2017 22:32:21 +0000 (-0800) Subject: anv/blorp: Add partial clear support to anv_image_mcs_op X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d85f05bd6f5bd56b336d5b09337d0832c91c44d2;p=mesa.git anv/blorp: Add partial clear support to anv_image_mcs_op Reviewed-by: Samuel Iglesias Gonsálvez --- diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index efa2ced7f2b..e71d90ac5e5 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -1606,6 +1606,16 @@ anv_image_mcs_op(struct anv_cmd_buffer *cmd_buffer, ANV_IMAGE_LAYOUT_EXPLICIT_AUX, ISL_AUX_USAGE_MCS, &surf); + if (mcs_op == ISL_AUX_OP_PARTIAL_RESOLVE) { + /* If we're doing a partial resolve, then we need the indirect clear + * color. The clear operation just stomps the CCS to a particular value + * and don't care about format or clear value. + */ + const struct anv_address clear_color_addr = + anv_image_get_clear_color_addr(cmd_buffer->device, image, aspect); + surf.clear_color_addr = anv_to_blorp_address(clear_color_addr); + } + /* From the Sky Lake PRM Vol. 7, "Render Target Fast Clear": * * "After Render target fast clear, pipe-control with color cache @@ -1630,8 +1640,11 @@ anv_image_mcs_op(struct anv_cmd_buffer *cmd_buffer, 0, base_layer, layer_count, 0, 0, image->extent.width, image->extent.height); break; - case ISL_AUX_OP_FULL_RESOLVE: case ISL_AUX_OP_PARTIAL_RESOLVE: + blorp_mcs_partial_resolve(&batch, &surf, surf.surf->format, + base_layer, layer_count); + break; + case ISL_AUX_OP_FULL_RESOLVE: case ISL_AUX_OP_AMBIGUATE: default: unreachable("Unsupported MCS operation");