diff options
author | Lionel Landwerlin <[email protected]> | 2018-10-23 01:39:39 +0100 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2018-10-23 14:49:33 +0100 |
commit | a8594887bcb848bf5b426664c000f15332e4d372 (patch) | |
tree | 60a5bdbcfecf94674a11975d4743eafd229b44ba /src/intel/common | |
parent | 55e7de7b193535133d4324e9f601ae44a0cdd9a7 (diff) |
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 <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]> (v2)
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/common')
-rw-r--r-- | src/intel/common/gen_batch_decoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/common/gen_batch_decoder.c b/src/intel/common/gen_batch_decoder.c index 827f3dbdd2f..0a36b1678b5 100644 --- a/src/intel/common/gen_batch_decoder.c +++ b/src/intel/common/gen_batch_decoder.c @@ -818,7 +818,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 / sizeof(uint32_t); int length; struct gen_group *inst; |