diff options
author | Kenneth Graunke <[email protected]> | 2019-07-03 15:14:49 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-07-03 22:24:50 -0700 |
commit | 9ea67f0a79578aa0162f472936d04b1c03d4a880 (patch) | |
tree | 8eb1efb77efb0cdce678b535af7b4546f854bc76 | |
parent | 10560f8506ebecf8a10ff46b8e02af5bd21db36d (diff) |
iris: Fix MOCS for grid surface
Hardcoding 4 is bad; we have a function for this now.
-rw-r--r-- | src/gallium/drivers/iris/iris_draw.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/iris/iris_draw.c b/src/gallium/drivers/iris/iris_draw.c index 63693b8bd34..50c18774c70 100644 --- a/src/gallium/drivers/iris/iris_draw.c +++ b/src/gallium/drivers/iris/iris_draw.c @@ -281,6 +281,8 @@ iris_update_grid_size_resource(struct iris_context *ice, if (!grid_needs_surface || state_ref->res) return; + struct iris_bo *grid_bo = iris_resource_bo(grid_ref->res); + void *surf_map = NULL; u_upload_alloc(ice->state.surface_uploader, 0, isl_dev->ss.size, isl_dev->ss.align, &state_ref->offset, &state_ref->res, @@ -288,12 +290,11 @@ iris_update_grid_size_resource(struct iris_context *ice, state_ref->offset += iris_bo_offset_from_base_address(iris_resource_bo(state_ref->res)); isl_buffer_fill_state(&screen->isl_dev, surf_map, - .address = grid_ref->offset + - iris_resource_bo(grid_ref->res)->gtt_offset, + .address = grid_ref->offset + grid_bo->gtt_offset, .size_B = sizeof(grid->grid), .format = ISL_FORMAT_RAW, .stride_B = 1, - .mocs = 4); // XXX: MOCS + .mocs = ice->vtbl.mocs(grid_bo)); ice->state.dirty |= IRIS_DIRTY_BINDINGS_CS; } |