[Mesa-dev] [PATCH 02/13] i965: Allow passing target_bo=NULL to brw_emit_reloc()

Chris Wilson chris at chris-wilson.co.uk
Thu Jul 20 14:15:02 UTC 2017


Quoting Kenneth Graunke (2017-07-19 21:08:23)
> On Wednesday, July 19, 2017 3:09:10 AM PDT Chris Wilson wrote:
> > Sometimes we want to emit a relocation to a NULL surface when the
> > constructing the batch. If we push the NULL handling into the common
> > brw_emit_reloc() we can make the batch construction itself more
> > readable.
> 
> I don't like this...
> 
> There is no such thing as a "relocation to a NULL surface".  No relocation
> is emittted in this case.  It either means the field is relative to a base
> address, and is simply an offset, or the address is unused and we're setting
> a NULL pointer combined with other bits packed into the same DWord.

There's actually no such thing as a relocation ;) I only put it out
because there were so many duplicated checks.
-Chris


More information about the mesa-dev mailing list