From 96b5a70f45612642265d7192e04e90206a4c260f Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 9 May 2020 12:31:20 -0700 Subject: [PATCH] freedreno: initialize max_scissor Somehow the initialization of this got lost somewhere along the way, resulting in assuming minx/miny are always zero. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/freedreno_batch_cache.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/freedreno/freedreno_batch_cache.c b/src/gallium/drivers/freedreno/freedreno_batch_cache.c index 9edca679449..253b16e93d8 100644 --- a/src/gallium/drivers/freedreno/freedreno_batch_cache.c +++ b/src/gallium/drivers/freedreno/freedreno_batch_cache.c @@ -377,6 +377,14 @@ batch_from_key(struct fd_batch_cache *cache, struct key *key, if (!batch) return NULL; + /* reset max_scissor, which will be adjusted on draws + * according to the actual scissor. + */ + batch->max_scissor.minx = ~0; + batch->max_scissor.miny = ~0; + batch->max_scissor.maxx = 0; + batch->max_scissor.maxy = 0; + fd_screen_lock(ctx->screen); _mesa_hash_table_insert_pre_hashed(cache->ht, hash, key, batch); -- 2.30.2