[Mesa-dev] [PATCH 3/3] i965: Use brw_bo_map[_gtt]() in intel_miptree_map_raw().

Kenneth Graunke kenneth at whitecape.org
Fri Jan 31 14:56:26 PST 2014


On 01/31/2014 01:45 PM, Carl Worth wrote:
> Kenneth Graunke <kenneth at whitecape.org> writes:
>> This code is strange anyway; the typical paradigm is to check whether
>> the batch references the buffer, flush it if so, and then check whether
>> it's busy.
> 
> I really like the series. So, thanks!
> 
> As far as your comment here, am I understanding that the (minor,
> not-directly-intended) behavioral change you make in the code moves
> things closer to the standard paradigm?

Yes.  To complete it, we would change the intel_batchbuffer_flush() to:

if (drm_intel_bo_references(brw->batch.bo, bo))
   intel_batchbuffer_flush(brw);

> But is there still more that would move this even closer? Would that be
> worth doing here (in a separate commit) now that you've seen it and
> noticed?

Originally, I believed we always flushed to avoid the cost of the
drm_intel_bo_references call...but...I'm less convinced it was
intentional, now.  This isn't really a common draw-time path, and
flushing the batch isn't free either...

> I'll leave that for you to decide. In the meantime, for the series:
> 
> Reviewed-by: Carl Worth <cworth at cworth.org>
> 
> -Carl

Thanks, Carl!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140131/a7b3f89c/attachment.pgp>


More information about the mesa-dev mailing list