[Mesa-dev] [PATCH 8/8] i965/drm: Make brw_emit_reloc take a uint64_t target_offset.

Chris Wilson chris at chris-wilson.co.uk
Tue Apr 11 18:59:18 UTC 2017


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

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the mesa-dev mailing list