diff options
author | Kenneth Graunke <[email protected]> | 2019-04-01 23:28:06 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-04-04 11:41:10 -0700 |
commit | 8d9e169bdd46c028fd14af90bfb1be40e744c31a (patch) | |
tree | fa2f9a8fcfc14e4acfe56644de7e819eabb2bf96 /src/gallium/drivers | |
parent | d1dd3cbcc766a70ec3b193201299792566c6b69a (diff) |
iris: Save/restore MI_PREDICATE_RESULT, not MI_PREDICATE_DATA.
MI_PREDICATE_DATA is an intermediate storage for the MI_PREDICATE
command's calculations - it holds the result of the subtraction when
the compare operation is SRCS_EQUAL or DELTAS_EQUAL. But the actual
result of the predication is MI_PREDICATE_RESULT, which is what we
want to copy from the render context to the compute context.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/iris/iris_context.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_draw.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_query.c | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index 494c931d0f0..51b40f30cb8 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -598,7 +598,7 @@ struct iris_context { enum iris_predicate_state predicate; /** - * Query BO with a MI_PREDICATE_DATA snapshot calculated on the + * Query BO with a MI_PREDICATE_RESULT snapshot calculated on the * render context that needs to be uploaded to the compute context. */ struct iris_bo *compute_predicate; diff --git a/src/gallium/drivers/iris/iris_draw.c b/src/gallium/drivers/iris/iris_draw.c index ab162583ca9..e94346f33f0 100644 --- a/src/gallium/drivers/iris/iris_draw.c +++ b/src/gallium/drivers/iris/iris_draw.c @@ -232,7 +232,7 @@ iris_launch_grid(struct pipe_context *ctx, const struct pipe_grid_info *grid) ice->vtbl.update_surface_base_address(batch, &ice->state.binder); if (ice->state.compute_predicate) { - ice->vtbl.load_register_mem64(batch, MI_PREDICATE_DATA, + ice->vtbl.load_register_mem64(batch, MI_PREDICATE_RESULT, ice->state.compute_predicate, 0); ice->state.compute_predicate = NULL; } diff --git a/src/gallium/drivers/iris/iris_query.c b/src/gallium/drivers/iris/iris_query.c index 76816a7c0fd..904feba39cc 100644 --- a/src/gallium/drivers/iris/iris_query.c +++ b/src/gallium/drivers/iris/iris_query.c @@ -117,8 +117,8 @@ struct iris_query { }; struct iris_query_snapshots { - /** iris_render_condition's saved MI_PREDICATE_DATA value. */ - uint64_t predicate_data; + /** iris_render_condition's saved MI_PREDICATE_RESULT value. */ + uint64_t predicate_result; /** Have the start/end snapshots landed? */ uint64_t snapshots_landed; @@ -129,7 +129,7 @@ struct iris_query_snapshots { }; struct iris_query_so_overflow { - uint64_t predicate_data; + uint64_t predicate_result; uint64_t snapshots_landed; struct { @@ -1048,12 +1048,12 @@ set_predicate_for_result(struct iris_context *ice, /* We immediately set the predicate on the render batch, as all the * counters come from 3D operations. However, we may need to predicate * a compute dispatch, which executes in a different GEM context and has - * a different MI_PREDICATE_DATA register. So, we save the result to + * a different MI_PREDICATE_RESULT register. So, we save the result to * memory and reload it in iris_launch_grid. */ unsigned offset = q->query_state_ref.offset + - offsetof(struct iris_query_snapshots, predicate_data); - ice->vtbl.store_register_mem64(batch, MI_PREDICATE_DATA, + offsetof(struct iris_query_snapshots, predicate_result); + ice->vtbl.store_register_mem64(batch, MI_PREDICATE_RESULT, bo, offset, false); ice->state.compute_predicate = bo; } |