mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-21 07:50:35 +01:00
panfrost: Fix clears with conditional rendering
batch can be invalidated by the render condition check.
Fixes nv_conditional_render-clear.
Fixes: 638b22354e ("panfrost: Clear with a quad to avoid flushing")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20689>
This commit is contained in:
parent
7c7c38b126
commit
02f9cddb61
1 changed files with 6 additions and 3 deletions
|
|
@ -60,12 +60,15 @@ panfrost_clear(struct pipe_context *pipe, unsigned buffers,
|
|||
const union pipe_color_union *color, double depth,
|
||||
unsigned stencil)
|
||||
{
|
||||
if (!panfrost_render_condition_check(pan_context(pipe)))
|
||||
return;
|
||||
|
||||
/* Only get batch after checking the render condition, since the check can
|
||||
* cause the batch to be flushed.
|
||||
*/
|
||||
struct panfrost_context *ctx = pan_context(pipe);
|
||||
struct panfrost_batch *batch = panfrost_get_batch_for_fbo(ctx);
|
||||
|
||||
if (!panfrost_render_condition_check(ctx))
|
||||
return;
|
||||
|
||||
/* At the start of the batch, we can clear for free */
|
||||
if (!batch->scoreboard.first_job) {
|
||||
panfrost_batch_clear(batch, buffers, color, depth, stencil);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue