mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48: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>
This commit is contained in:
parent
87764963f2
commit
f4461b66b6
1 changed files with 1 additions and 4 deletions
|
|
@ -364,7 +364,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]) {
|
||||
|
|
@ -670,9 +670,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