summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-04-06 17:01:45 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:05 -0800
commit9ac81f189050663335999a04336f14c45579dcb7 (patch)
treec1b5cf9ef82ac187ec4a58a75bb43a6534d55dfb
parent9955e8334bd98db743306438fe03dabe0fee0f6e (diff)
iris: decoder fixes
-rw-r--r--src/gallium/drivers/iris/iris_batch.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c
index 85f585cbfa1..4db52897adf 100644
--- a/src/gallium/drivers/iris/iris_batch.c
+++ b/src/gallium/drivers/iris/iris_batch.c
@@ -73,14 +73,16 @@ static struct gen_batch_decode_bo
decode_get_bo(void *v_batch, uint64_t address)
{
struct iris_batch *batch = v_batch;
- struct iris_bo *bo = NULL;
for (int i = 0; i < batch->exec_count; i++) {
- if (batch->exec_bos[i]->gtt_offset == address) {
+ struct iris_bo *bo = batch->exec_bos[i];
+ if (address >= bo->gtt_offset &&
+ address < bo->gtt_offset + bo->size) {
return (struct gen_batch_decode_bo) {
.addr = address,
- .size = batch->exec_bos[i]->size,
- .map = iris_bo_map(batch->dbg, batch->exec_bos[i], MAP_READ),
+ .size = bo->size,
+ .map = iris_bo_map(batch->dbg, bo, MAP_READ) +
+ (address - bo->gtt_offset),
};
}
}
@@ -139,7 +141,7 @@ iris_init_batch(struct iris_batch *batch,
const unsigned decode_flags =
GEN_BATCH_DECODE_FULL |
((INTEL_DEBUG & DEBUG_COLOR) ? GEN_BATCH_DECODE_IN_COLOR : 0) |
- GEN_BATCH_DECODE_OFFSETS;
+ GEN_BATCH_DECODE_OFFSETS |
GEN_BATCH_DECODE_FLOATS;
gen_batch_decode_ctx_init(&batch->decoder, &screen->devinfo,
@@ -550,6 +552,7 @@ _iris_batch_flush_fence(struct iris_batch *batch,
bytes_for_commands, 100.0f * bytes_for_commands / BATCH_SZ,
batch->exec_count,
(float) batch->aperture_space / (1024 * 1024));
+ dump_validation_list(batch);
}
if (unlikely(INTEL_DEBUG & DEBUG_BATCH))