On Thursday, 2018-09-06 11:34:44 +0100, Lionel Landwerlin wrote:
> Pointer arithmetic...
> 
> Signed-off-by: Lionel Landwerlin <[email protected]>
> ---
>  src/intel/common/gen_batch_decoder.c         | 2 +-
>  src/intel/tools/aubinator_viewer_decoder.cpp | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/intel/common/gen_batch_decoder.c 
> b/src/intel/common/gen_batch_decoder.c
> index 1a5c8c37968..13daffeeedd 100644
> --- a/src/intel/common/gen_batch_decoder.c
> +++ b/src/intel/common/gen_batch_decoder.c
> @@ -800,7 +800,7 @@ gen_print_batch(struct gen_batch_decode_ctx *ctx,
>                  const uint32_t *batch, uint32_t batch_size,
>                  uint64_t batch_addr)
>  {
> -   const uint32_t *p, *end = batch + batch_size;
> +   const uint32_t *p, *end = batch + batch_size / 4;

sizeof(uint32_t) ?

>     int length;
>     struct gen_group *inst;
>  
> diff --git a/src/intel/tools/aubinator_viewer_decoder.cpp 
> b/src/intel/tools/aubinator_viewer_decoder.cpp
> index 273bc2da376..c3a1de30a18 100644
> --- a/src/intel/tools/aubinator_viewer_decoder.cpp
> +++ b/src/intel/tools/aubinator_viewer_decoder.cpp
> @@ -870,7 +870,7 @@ aub_viewer_render_batch(struct aub_viewer_decode_ctx *ctx,
>                          uint64_t batch_addr)
>  {
>     struct gen_group *inst;
> -   const uint32_t *p, *batch = (const uint32_t *) _batch, *end = batch + 
> batch_size;
> +   const uint32_t *p, *batch = (const uint32_t *) _batch, *end = batch + 
> batch_size / 4;
>     int length;
>  
>     for (p = batch; p < end; p += length) {
> -- 
> 2.19.0.rc1
> 
> _______________________________________________
> mesa-dev mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to