[Mesa-dev] [PATCH] anv/blorp: sample input attachments with resolves on BDW

Samuel Iglesias Gonsálvez siglesias at igalia.com
Tue Mar 21 15:34:23 UTC 2017



On 21/03/17 16:14, Jason Ekstrand wrote:
> On Tue, Mar 21, 2017 at 7:23 AM, Samuel Iglesias Gonsálvez
> <siglesias at igalia.com <mailto:siglesias at igalia.com>> wrote:
> 
>     Input attachments are clear-color aware on Sky Lake, so we
>     can frequently sample from them with no resolves at all. However
>     on Broadwell we still need to do a a resolve between the subpass
>     that writes and the subpass that reads.
> 
> 
> In theory, we shouldn't always need to do a resolve.  Broadwell is
> supposed (maybe it doesn't work?) to support sampling from fast-cleared
> buffers and I thought it was hooked up correctly.  Is this only an issue
> for certain clear colors?  I have a feeling there's something more
> subtle going on here.
>  

OK, I will investigate further.

Thanks!

Sam

> 
>     Fixes 16 tests on BDW:
> 
>     dEQP-VK.renderpass.formats.*.input.clear.store.self_dep*
> 
>     Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com
>     <mailto:siglesias at igalia.com>>
>     ---
>      src/intel/vulkan/anv_blorp.c | 9 ++++++---
>      1 file changed, 6 insertions(+), 3 deletions(-)
> 
>     diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
>     index 1f4fec5f35b..2fa56f49d18 100644
>     --- a/src/intel/vulkan/anv_blorp.c
>     +++ b/src/intel/vulkan/anv_blorp.c
>     @@ -1504,10 +1504,13 @@ ccs_resolve_attachment(struct anv_cmd_buffer
>     *cmd_buffer,
>                */
>            }
>         } else if (usage & ANV_SUBPASS_USAGE_INPUT) {
>     -      /* Input attachments are clear-color aware so, at least on
>     Sky Lake, we
>     -       * can frequently sample from them with no resolves at all.
>     +      /* Input attachments are clear-color aware on Sky Lake, so we
>     +       * can frequently sample from them with no resolves at all.
>     However
>     +       * on Broadwell we still need to do resolves.
>             */
>     -      if (att_state->aux_usage != att_state->input_aux_usage) {
>     +      if (cmd_buffer->device->info.gen < 9) {
>     +         resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_FULL;
>     +      } else if (att_state->aux_usage != att_state->input_aux_usage) {
>               assert(att_state->input_aux_usage == ISL_AUX_USAGE_NONE);
>               resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_FULL;
>            } else if (!att_state->clear_color_is_zero_one) {
>     --
>     2.11.0
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 862 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170321/7a9ac2b5/attachment.sig>


More information about the mesa-dev mailing list