iris: invalidate sysvals if grid dimension changes
Cc: mesa-stable Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18581>
This commit is contained in:
@@ -83,6 +83,7 @@ iris_lost_context_state(struct iris_batch *batch)
|
||||
memset(&ice->shaders.urb, 0, sizeof(ice->shaders.urb));
|
||||
memset(ice->state.last_block, 0, sizeof(ice->state.last_block));
|
||||
memset(ice->state.last_grid, 0, sizeof(ice->state.last_grid));
|
||||
ice->state.last_grid_dim = 0;
|
||||
batch->last_binder_address = ~0ull;
|
||||
batch->last_aux_map_state = 0;
|
||||
batch->screen->vtbl.lost_genx_state(ice, batch);
|
||||
|
@@ -756,6 +756,8 @@ struct iris_context {
|
||||
|
||||
/** The last compute grid size */
|
||||
uint32_t last_grid[3];
|
||||
/** The last compute grid dimensions */
|
||||
uint32_t last_grid_dim;
|
||||
/** Reference to the BO containing the compute grid size */
|
||||
struct iris_state_ref grid_size;
|
||||
/** Reference to the SURFACE_STATE for the compute grid resource */
|
||||
|
@@ -408,6 +408,12 @@ iris_launch_grid(struct pipe_context *ctx, const struct pipe_grid_info *grid)
|
||||
ice->state.shaders[MESA_SHADER_COMPUTE].sysvals_need_upload = true;
|
||||
}
|
||||
|
||||
if (ice->state.last_grid_dim != grid->work_dim) {
|
||||
ice->state.last_grid_dim = grid->work_dim;
|
||||
ice->state.stage_dirty |= IRIS_STAGE_DIRTY_CONSTANTS_CS;
|
||||
ice->state.shaders[MESA_SHADER_COMPUTE].sysvals_need_upload = true;
|
||||
}
|
||||
|
||||
iris_update_grid_size_resource(ice, grid);
|
||||
|
||||
iris_binder_reserve_compute(ice);
|
||||
|
Reference in New Issue
Block a user