iris: Fix issue with conditional dispatching
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35946>
This commit is contained in:
@@ -1106,7 +1106,7 @@ struct iris_context {
|
||||
* 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;
|
||||
struct iris_address compute_predicate;
|
||||
|
||||
/** Is a PIPE_QUERY_PRIMITIVES_GENERATED query active? */
|
||||
bool prims_generated_query_active;
|
||||
|
||||
@@ -452,10 +452,11 @@ iris_launch_grid(struct pipe_context *ctx, const struct pipe_grid_info *grid)
|
||||
iris_binder_reserve_compute(ice);
|
||||
batch->screen->vtbl.update_binder_address(batch, &ice->state.binder);
|
||||
|
||||
if (ice->state.compute_predicate) {
|
||||
if (ice->state.compute_predicate.bo) {
|
||||
batch->screen->vtbl.load_register_mem32(batch, MI_PREDICATE_RESULT,
|
||||
ice->state.compute_predicate, 0);
|
||||
ice->state.compute_predicate = NULL;
|
||||
ice->state.compute_predicate.bo,
|
||||
(uint32_t) ice->state.compute_predicate.offset);
|
||||
ice->state.compute_predicate.bo = NULL;
|
||||
}
|
||||
|
||||
iris_handle_always_flush_cache(batch);
|
||||
|
||||
@@ -837,7 +837,13 @@ set_predicate_for_result(struct iris_context *ice,
|
||||
mi_store(&b, mi_reg32(MI_PREDICATE_RESULT), result);
|
||||
mi_store(&b, query_mem64(q, offsetof(struct iris_query_snapshots,
|
||||
predicate_result)), result);
|
||||
ice->state.compute_predicate = bo;
|
||||
|
||||
ice->state.compute_predicate = (struct iris_address) {
|
||||
.bo = bo,
|
||||
.offset = q->query_state_ref.offset +
|
||||
offsetof(struct iris_query_snapshots, predicate_result),
|
||||
.access = IRIS_DOMAIN_OTHER_WRITE
|
||||
};
|
||||
|
||||
iris_batch_sync_region_end(batch);
|
||||
}
|
||||
@@ -852,7 +858,7 @@ iris_render_condition(struct pipe_context *ctx,
|
||||
struct iris_query *q = (void *) query;
|
||||
|
||||
/* The old condition isn't relevant; we'll update it if necessary */
|
||||
ice->state.compute_predicate = NULL;
|
||||
ice->state.compute_predicate.bo = NULL;
|
||||
|
||||
if (!q) {
|
||||
ice->state.predicate = IRIS_PREDICATE_STATE_RENDER;
|
||||
|
||||
Reference in New Issue
Block a user