Mesa (staging/21.0): nvc0: index_bias is now only set for indexed draws
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jan 20 17:22:35 UTC 2021
Module: Mesa
Branch: staging/21.0
Commit: 4dee39f04d025d6ae1ad631caef35b0254516bd7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4dee39f04d025d6ae1ad631caef35b0254516bd7
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sat Jan 16 18:08:44 2021 -0500
nvc0: index_bias is now only set for indexed draws
Fixes: cbdc00ac3a6 ("nouveau: fix handling draw info")
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8539>
(cherry picked from commit 087ef91c85c82546af879b6ce0ba371b393e1e13)
---
.pick_status.json | 2 +-
src/gallium/drivers/nouveau/nvc0/nvc0_vbo_translate.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index f6446b83af0..a32c116e7d7 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -400,7 +400,7 @@
"description": "nvc0: index_bias is now only set for indexed draws",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "cbdc00ac3a6170e61d36233560e5b3ce83098906"
},
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo_translate.c b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo_translate.c
index 5b9e003b267..ec52da32a0e 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo_translate.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo_translate.c
@@ -561,13 +561,14 @@ nvc0_push_vbo(struct nvc0_context *nvc0, const struct pipe_draw_info *info,
{
struct push_context ctx;
unsigned i, index_size;
+ unsigned index_bias = info->index_size ? info->index_bias : 0;
unsigned inst_count = info->instance_count;
unsigned vert_count = draw->count;
unsigned prim;
nvc0_push_context_init(nvc0, &ctx);
- nvc0_vertex_configure_translate(nvc0, info->index_bias);
+ nvc0_vertex_configure_translate(nvc0, index_bias);
if (nvc0->state.index_bias) {
/* this is already taken care of by translate */
@@ -576,7 +577,7 @@ nvc0_push_vbo(struct nvc0_context *nvc0, const struct pipe_draw_info *info,
}
if (unlikely(ctx.edgeflag.enabled))
- nvc0_push_map_edgeflag(&ctx, nvc0, info->index_bias);
+ nvc0_push_map_edgeflag(&ctx, nvc0, index_bias);
ctx.prim_restart = info->primitive_restart;
ctx.restart_index = info->restart_index;
More information about the mesa-commit
mailing list