summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrii Simiklit <[email protected]>2019-01-24 12:28:29 +0200
committerAndrii Simiklit <[email protected]>2019-01-25 15:12:07 +0200
commitdb39a44f105213e5e648a17ba94fca965cb19654 (patch)
tree750e399746cd2e4e3324d8b668d448628541fa3e
parent69e944036720d826d0548a019f8fe18b9ed57e6e (diff)
intel/batch-decoder: fix vertex buffer size calculation for gen<8
It should be incremented by one according to how it is calculated by 'emit_vertex_buffer_state': "\#if GEN_GEN < 8 .BufferAccessType = step_rate ? INSTANCEDATA : VERTEXDATA, .InstanceDataStepRate = step_rate, \#if GEN_GEN >= 5 .EndAddress = ro_bo(bo, end_offset - 1), \#endif \#endif" 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.c2
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 ff29074c6d1..2a9c8579a7c 100644
--- a/src/intel/common/gen_batch_decoder.c
+++ b/src/intel/common/gen_batch_decoder.c
@@ -409,7 +409,7 @@ handle_3dstate_vertex_buffers(struct gen_batch_decode_ctx *ctx,
ready = true;
} else if (strcmp(vbs_iter.name, "End Address") == 0) {
if (vb.map && vbs_iter.raw_value >= vb.addr)
- vb_size = vbs_iter.raw_value - vb.addr;
+ vb_size = (vbs_iter.raw_value + 1) - vb.addr;
else
vb_size = 0;
ready = true;