diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2021-01-16 18:08:44 -0500 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2021-01-20 09:22:16 -0800 |
commit | 4dee39f04d025d6ae1ad631caef35b0254516bd7 (patch) | |
tree | de37d8a71129ef068002044630a14dd5081b867a | |
parent | 9fc330f27ba9a3c906f1e1342ed2ca03ef08ba23 (diff) |
nvc0: index_bias is now only set for indexed draws
Fixes: cbdc00ac3a6 ("nouveau: fix handling draw info")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8539>
(cherry picked from commit 087ef91c85c82546af879b6ce0ba371b393e1e13)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | 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; |