mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02: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> (cherry picked from commit02f9cddb61)
This commit is contained in:
parent
bc198e8005
commit
ff6a911fd4
2 changed files with 7 additions and 4 deletions
|
|
@ -4711,7 +4711,7 @@
|
|||
"description": "panfrost: Fix clears with conditional rendering",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "638b22354e75fa31551f776a2cd2bbf752db1ad5"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -61,12 +61,15 @@ panfrost_clear(
|
|||
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