Mesa (staging/21.0): vbo: Don't set node->min_index = max_index = indices_offset when merging
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jan 20 19:19:49 UTC 2021
Module: Mesa
Branch: staging/21.0
Commit: 8d07282a200bdd28c46b642c51ef00f065293826
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8d07282a200bdd28c46b642c51ef00f065293826
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Thu Jan 14 15:42:01 2021 -0800
vbo: Don't set node->min_index = max_index = indices_offset when merging
I'm can't see why this is necessary. There are already new fields
(node->merged.{min,max}_index) for the new values in the merged case.
But in vbo_save_draw.c, in the !draw_using_merged_prim case, we would
try and use the original node...with the now destroyed min/max index.
Fixes some assert failures when running with swtnl and forcing the
non-merged path (though it takes the merged path by default).
Fixes: 4c751ad67aa ("vbo/dlist: use a shared index buffer")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8522>
(cherry picked from commit 44bdd5225c48d266e42d93defbb7ca9ae74aa21b)
---
.pick_status.json | 2 +-
src/mesa/vbo/vbo_save_api.c | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index d804ac70a79..ecf35651fc4 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -283,7 +283,7 @@
"description": "vbo: Don't set node->min_index = max_index = indices_offset when merging",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "4c751ad67aa2bbde5897030495f86e31c9e1fda7"
},
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index b8edee7cf5b..b258e6ac117 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -670,7 +670,6 @@ compile_vertex_list(struct gl_context *ctx)
int available = save->previous_ib ? (save->previous_ib->Size / 4 - save->ib_first_free_index) : 0;
if (available >= max_indices_count) {
indices_offset = save->ib_first_free_index;
- node->min_index = node->max_index = indices_offset;
}
int size = max_indices_count * sizeof(uint32_t);
uint32_t* indices = (uint32_t*) malloc(size);
More information about the mesa-commit
mailing list