aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2020-05-09 12:31:20 -0700
committerMarge Bot <[email protected]>2020-05-12 18:16:48 +0000
commit96b5a70f45612642265d7192e04e90206a4c260f (patch)
tree01cc3bc11aa57bde9d6ca559718abfc8121a94f1 /src
parent1387e778018527f1ea85f616130a2b0d59dcff19 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_batch_cache.c8
1 files changed, 8 insertions, 0 deletions
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);