From: Rob Clark Date: Sat, 9 May 2020 19:31:20 +0000 (-0700) Subject: freedreno: initialize max_scissor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=96b5a70f45612642265d7192e04e90206a4c260f;p=mesa.git 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: --- 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);