Module: Mesa
Branch: master
Commit: 96b5a70f45612642265d7192e04e90206a4c260f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=96b5a70f45612642265d7192e04e90206a4c260f

Author: Rob Clark <[email protected]>
Date:   Sat May  9 12:31:20 2020 -0700

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4976>

---

 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);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to