iris: decoder fixes

This commit is contained in:
Kenneth Graunke
2018-04-07 06:59:22 -07:00
parent 5d2673ba7e
commit 0148bd6839
3 changed files with 8 additions and 4 deletions

View File

@@ -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),
};
}
}

View File

@@ -30,6 +30,8 @@
struct iris_bo;
struct iris_bufmgr;
#define IRIS_BINDER_ADDRESS (1ull << 32)
struct iris_binder
{
struct iris_bo *bo;

View File

@@ -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);