diff options
author | Jason Ekstrand <[email protected]> | 2017-11-11 14:32:21 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-03-01 14:07:58 -0800 |
commit | d85f05bd6f5bd56b336d5b09337d0832c91c44d2 (patch) | |
tree | 065f84b4f17a12a36336424f2ff498ea40024beb /src | |
parent | c34feaea527b66057c7b94302ad1aa932bfb8fd4 (diff) |
anv/blorp: Add partial clear support to anv_image_mcs_op
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_blorp.c | 15 |
1 files changed, 14 insertions, 1 deletions
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"); |