intel/decoders: fix end of batch limit

Pointer arithmetic...

v2: s/4/sizeof(uint32_t)/ (Eric)

v3: Give bytes to print_batch() in error_decode (Lionel)
    Make clear what values we're dealing with in error_decode (Lionel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> (v2)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Lionel Landwerlin
2018-10-23 01:39:39 +01:00
parent 55e7de7b19
commit a8594887bc
3 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -888,7 +888,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 / sizeof(uint32_t);
int length;
for (p = batch; p < end; p += length) {