On Tuesday, April 11, 2017 11:59:18 AM PDT Chris Wilson wrote: > On Tue, Apr 11, 2017 at 09:02:51AM -0700, Kenneth Graunke wrote: > > If we have buffers larger than 4GB, then target_offset will need to > > become a 64-bit value. Delta is only a __u32 though, so we downcast. > > > > Suggested by Chris Wilson. > > --- > > src/mesa/drivers/dri/i965/intel_batchbuffer.c | 4 ++-- > > src/mesa/drivers/dri/i965/intel_batchbuffer.h | 2 +- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c > > b/src/mesa/drivers/dri/i965/intel_batchbuffer.c > > index 6e4b55cf9ec..abaeb6bcbfe 100644 > > --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c > > +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c > > @@ -734,7 +734,7 @@ brw_batch_references(struct intel_batchbuffer *batch, > > struct brw_bo *bo) > > */ > > uint64_t > > brw_emit_reloc(struct intel_batchbuffer *batch, uint32_t batch_offset, > > It's batch_offset that's u64 (to match the u64 size). Just delta > (target_offset) is the oddity being s32 into a potential u64 object. :| > -Chris
Ah. There's no point in expanding batch_offset, though, since the batchbuffer is only 32K, and would certainly never be >= 4G :) --Ken
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
