mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-23 07:19:50 +00:00
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> (cherry picked from commit 9ccdd86b9040b265893712f4125d30552e0fe1cd)
This commit is contained in:
parent
9a92cd91c2
commit
842759cf77
@ -1966,7 +1966,7 @@
|
||||
"description": "iris: invalidate sysvals if grid dimension changes",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
@ -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);
|
||||
|
@ -749,6 +749,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);
|
||||
|
Loading…
Reference in New Issue
Block a user