diff options
author | Kenneth Graunke <[email protected]> | 2018-04-07 06:59:22 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:05 -0800 |
commit | 0148bd68397d66ead0acdb1a4bd4aa590488b50e (patch) | |
tree | 6c4c45d7a04d0063aa87e0f9a450af67a58ee479 /src/gallium | |
parent | 5d2673ba7e3d1fecdc959ce5a2eb8c89b9592ab8 (diff) |
iris: decoder fixes
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/iris/iris_batch.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_binder.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c index c54f23f662e..0c62f1a8abb 100644 --- a/src/gallium/drivers/iris/iris_batch.c +++ b/src/gallium/drivers/iris/iris_batch.c @@ -81,13 +81,15 @@ decode_get_bo(void *v_batch, uint64_t address) for (int i = 0; i < batch->exec_count; i++) { struct iris_bo *bo = batch->exec_bos[i]; - if (address >= bo->gtt_offset && - address < bo->gtt_offset + bo->size) { + /* The decoder zeroes out the top 16 bits, so we need to as well */ + uint64_t bo_address = bo->gtt_offset & (~0ull >> 16); + + if (address >= bo_address && address < bo_address + bo->size) { return (struct gen_batch_decode_bo) { .addr = address, .size = bo->size, .map = iris_bo_map(batch->dbg, bo, MAP_READ) + - (address - bo->gtt_offset), + (address - bo_address), }; } } diff --git a/src/gallium/drivers/iris/iris_binder.h b/src/gallium/drivers/iris/iris_binder.h index 5830288b5c5..7a26602bf48 100644 --- a/src/gallium/drivers/iris/iris_binder.h +++ b/src/gallium/drivers/iris/iris_binder.h @@ -30,6 +30,8 @@ struct iris_bo; struct iris_bufmgr; +#define IRIS_BINDER_ADDRESS (1ull << 32) + struct iris_binder { struct iris_bo *bo; diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 38310cfd6c8..0b0cdc1960a 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2113,8 +2113,8 @@ iris_upload_render_state(struct iris_context *ice, struct iris_resource *res = (void *) view->pipe.texture; *bt_map++ = use_sampler_view(batch, view); } -#if 0 +#if 0 // XXX: not implemented yet assert(prog_data->binding_table.pull_constants_start == 0xd0d0d0d0); assert(prog_data->binding_table.ubo_start == 0xd0d0d0d0); |