diff options
author | Andrii Simiklit <[email protected]> | 2019-01-24 12:53:53 +0200 |
---|---|---|
committer | Andrii Simiklit <[email protected]> | 2019-01-25 15:12:30 +0200 |
commit | 4759bb2fcf47388c9c277e514b789dde3c5e3d16 (patch) | |
tree | b5ab67071b4e31f2967771d231897ab2dafc5ff5 | |
parent | db39a44f105213e5e648a17ba94fca965cb19654 (diff) |
intel/batch-decoder: fix a vb end address calculation
According to the loop implementation (in 'ctx_print_buffer' function),
which advances dword by dword over vertex buffer(vb),
the vb size should be aligned by 4 bytes too.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109449
Signed-off-by: Andrii Simiklit <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
-rw-r--r-- | src/intel/common/gen_batch_decoder.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel/common/gen_batch_decoder.c b/src/intel/common/gen_batch_decoder.c index 2a9c8579a7c..916aa3c0897 100644 --- a/src/intel/common/gen_batch_decoder.c +++ b/src/intel/common/gen_batch_decoder.c @@ -24,6 +24,7 @@ #include "common/gen_decoder.h" #include "gen_disasm.h" #include "util/macros.h" +#include "main/macros.h" /* Needed for ROUND_DOWN_TO */ #include <string.h> @@ -169,7 +170,8 @@ ctx_print_buffer(struct gen_batch_decode_ctx *ctx, uint32_t pitch, int max_lines) { - const uint32_t *dw_end = bo.map + MIN2(bo.size, read_length); + const uint32_t *dw_end = + bo.map + ROUND_DOWN_TO(MIN2(bo.size, read_length), 4); int column_count = 0, line_count = -1; for (const uint32_t *dw = bo.map; dw < dw_end; dw++) { |