panfrost: Fix batch state changes on Valhall

If we need to change batch state (currently just point coord origins), not only
do we need to flush the old batch, but also set the desired state on the new
batch. That second step was missing. Fix that so this mechanism works as
intended.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Fixes: 3641dfe436 ("panfrost: Flip point coords in hardware")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17068>
This commit is contained in:
Alyssa Rosenzweig 2022-06-15 15:54:08 -04:00 committed by Marge Bot
parent e9190c45d5
commit 950d27f9bf
1 changed files with 5 additions and 1 deletions

View File

@ -4009,9 +4009,13 @@ panfrost_draw_vbo(struct pipe_context *pipe,
if (unlikely(batch->scoreboard.job_index > 10000))
batch = panfrost_get_fresh_batch_for_fbo(ctx, "Too many draws");
if (unlikely(!panfrost_compatible_batch_state(batch)))
if (unlikely(!panfrost_compatible_batch_state(batch))) {
batch = panfrost_get_fresh_batch_for_fbo(ctx, "State change");
ASSERTED bool succ = panfrost_compatible_batch_state(batch);
assert(succ && "must be able to set state for a fresh batch");
}
/* panfrost_batch_skip_rasterization reads
* batch->scissor_culls_everything, which is set by
* panfrost_emit_viewport, so call that first.