mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
lavapipe: fix pushconst data updating
in a sequence like:
* CmdPushConstants
* CmdBindPipeline (doesn't use push constants)
* CmdDispatch
* CmdBindPipeline (uses push constants)
* CmdDispatch
the previous code would never update pushconsts and the second dispatch
would have no valid data
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41312>
(cherry picked from commit f4461b66b6)
This commit is contained in:
parent
b98ec1880e
commit
9351aaeedb
2 changed files with 2 additions and 5 deletions
|
|
@ -1664,7 +1664,7 @@
|
|||
"description": "lavapipe: fix pushconst data updating",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ update_pcbuf(struct rendering_state *state, mesa_shader_stage pstage,
|
|||
|
||||
static void emit_compute_state(struct rendering_state *state)
|
||||
{
|
||||
if (state->pcbuf_dirty[MESA_SHADER_COMPUTE])
|
||||
if (state->pcbuf_dirty[MESA_SHADER_COMPUTE] && state->has_pcbuf[MESA_SHADER_COMPUTE])
|
||||
update_pcbuf(state, MESA_SHADER_COMPUTE, MESA_SHADER_COMPUTE);
|
||||
|
||||
if (state->constbuf_dirty[MESA_SHADER_COMPUTE]) {
|
||||
|
|
@ -638,9 +638,6 @@ handle_compute_shader(struct rendering_state *state, struct lvp_shader *shader)
|
|||
|
||||
state->has_pcbuf[MESA_SHADER_COMPUTE] = shader->push_constant_size > 0;
|
||||
|
||||
if (!state->has_pcbuf[MESA_SHADER_COMPUTE])
|
||||
state->pcbuf_dirty[MESA_SHADER_COMPUTE] = false;
|
||||
|
||||
state->dispatch_info.block[0] = shader->pipeline_nir->nir->info.workgroup_size[0];
|
||||
state->dispatch_info.block[1] = shader->pipeline_nir->nir->info.workgroup_size[1];
|
||||
state->dispatch_info.block[2] = shader->pipeline_nir->nir->info.workgroup_size[2];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue