[Mesa-dev] [PATCH v2] intel/blorp: Emit VF cache invalidates for 48-bit bugs with softpin.

Kenneth Graunke kenneth at whitecape.org
Thu Jun 7 03:02:08 UTC 2018


On Wednesday, June 6, 2018 6:39:19 PM PDT Kenneth Graunke wrote:
> +/**
> + * See vf_invalidate_for_vb_48b_transitions in genX_state_upload.c.
> + */
> +static void
> +blorp_vf_invalidate_for_vb_48b_transitions(struct blorp_batch *batch,
> +                                           const struct blorp_address *addrs,
> +                                           unsigned num_vbs)
> +{
> +#if GEN_GEN >= 8
> +   struct brw_context *brw = batch->driver_batch;
> +   bool need_invalidate = false;
> +
> +   for (unsigned i = 0; i < num_vbs; i++) {
> +      struct brw_bo *bo = addrs[i].buffer;
> +      uint16_t high_bits =
> +         bo && (bo->kflags & EXEC_OBJECT_PINNED) ? bo->gtt_offset >> 32u : 0;
> +
> +      if (high_bits != brw->vb.last_bo_high_bits[i]) {

Jason noticed that I botched this again...I added need_invalidate = true
here so it actually does something.

I've gone ahead and pushed this a bit early, since it enabled me to push
the rest of my softpin series and Jordan was blocked on that happening.

> +         brw->vb.last_bo_high_bits[i] = high_bits;
> +      }
> +   }
> +
> +   if (need_invalidate) {
> +      brw_emit_pipe_control_flush(brw, PIPE_CONTROL_VF_CACHE_INVALIDATE);
> +   }
> +#endif
> +}
> +
>  #if GEN_GEN >= 8
>  static struct blorp_address
>  blorp_get_workaround_page(struct blorp_batch *batch)
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180606/6abeee3a/attachment-0001.sig>


More information about the mesa-dev mailing list