From 9fc330f27ba9a3c906f1e1342ed2ca03ef08ba23 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 17 Jan 2021 12:46:03 -0500 Subject: [PATCH] cso: set index_bounds_valid = true for arrays draws MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The min/max indices are valid. Set the bit to true to indicate that. Fixes glClear (+ clear_with_quads) on nouveau. Fixes: 72ff53098c64 (gallium: add pipe_draw_info::index_bounds_valid) Signed-off-by: Ilia Mirkin Reported-by: Simon Ser Tested-by: Simon Ser Reviewed-by: Marek Olšák Part-of: (cherry picked from commit 111c0733eaef2b3bfe9abaea2bb7880b5976dde6) --- .pick_status.json | 2 +- src/gallium/auxiliary/cso_cache/cso_context.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 77959cb1aee..f6446b83af0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -409,7 +409,7 @@ "description": "cso: set index_bounds_valid = true for arrays draws", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "72ff53098c648ea5513fc2b150349b5b9ae58667" }, diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 69077fcf2be..38ab603ade5 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -1718,6 +1718,7 @@ cso_draw_arrays(struct cso_context *cso, uint mode, uint start, uint count) util_draw_init_info(&info); info.mode = mode; + info.index_bounds_valid = true; info.min_index = start; info.max_index = start + count - 1; @@ -1738,6 +1739,7 @@ cso_draw_arrays_instanced(struct cso_context *cso, uint mode, util_draw_init_info(&info); info.mode = mode; + info.index_bounds_valid = true; info.min_index = start; info.max_index = start + count - 1; info.start_instance = start_instance;