mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 04:00:10 +01:00
panfrost: update nr_uniform_buffers before dispatching XFB
Currently nr_uniform_buffers will be whatever the previous draw set
for its vertex shader, which is not what the XFB shader usually
expects.
Fixes: c246af0d ("panfrost: Only upload UBOs when needed")
Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
This commit is contained in:
parent
6948ab727f
commit
2c75b6bb01
1 changed files with 5 additions and 1 deletions
|
|
@ -2953,6 +2953,8 @@ panfrost_launch_xfb(struct panfrost_batch *batch,
|
|||
uint64_t saved_push = batch->push_uniforms[PIPE_SHADER_VERTEX];
|
||||
unsigned saved_nr_push_uniforms =
|
||||
batch->nr_push_uniforms[PIPE_SHADER_VERTEX];
|
||||
unsigned saved_nr_ubos =
|
||||
batch->nr_uniform_buffers[PIPE_SHADER_VERTEX];
|
||||
|
||||
ctx->uncompiled[PIPE_SHADER_VERTEX] = NULL; /* should not be read */
|
||||
ctx->prog[PIPE_SHADER_VERTEX] = vs_uncompiled->xfb;
|
||||
|
|
@ -2960,7 +2962,8 @@ panfrost_launch_xfb(struct panfrost_batch *batch,
|
|||
panfrost_emit_compute_shader_meta(batch, PIPE_SHADER_VERTEX);
|
||||
|
||||
batch->uniform_buffers[PIPE_SHADER_VERTEX] =
|
||||
panfrost_emit_const_buf(batch, PIPE_SHADER_VERTEX, NULL,
|
||||
panfrost_emit_const_buf(batch, PIPE_SHADER_VERTEX,
|
||||
&batch->nr_uniform_buffers[PIPE_SHADER_VERTEX],
|
||||
&batch->push_uniforms[PIPE_SHADER_VERTEX],
|
||||
&batch->nr_push_uniforms[PIPE_SHADER_VERTEX]);
|
||||
|
||||
|
|
@ -2973,6 +2976,7 @@ panfrost_launch_xfb(struct panfrost_batch *batch,
|
|||
batch->uniform_buffers[PIPE_SHADER_VERTEX] = saved_ubo;
|
||||
batch->push_uniforms[PIPE_SHADER_VERTEX] = saved_push;
|
||||
batch->nr_push_uniforms[PIPE_SHADER_VERTEX] = saved_nr_push_uniforms;
|
||||
batch->nr_uniform_buffers[PIPE_SHADER_VERTEX] = saved_nr_ubos;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue