summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2017-10-10 23:50:06 -0400
committerIlia Mirkin <[email protected]>2017-10-11 08:18:16 -0400
commitb20bccbcacc6170cfc4f18332491131df5bac811 (patch)
tree377ead2916f27ac1fb673ef1534e1163de3c5089 /src/gallium/drivers/nouveau/nv50
parent735711ab86078732a6ce63cc1292e9814c01fb25 (diff)
nv50,nvc0: fix push hint logic in presence of a start offset
Previously buffer offsets were passed in explicitly as an offset, which had to be added to the resource address. Now they are passed in via an increased 'start' parameter. As a result, we were double-adding the start offset in this kind of situation. This condition was triggered by piglit's draw-elements test which has a requisite glMultiDrawElements in combination with a small enough number of vertices to go through the immediate push path. Fixes: 330d0607ed6 ("gallium: remove pipe_index_buffer and set_index_buffer") Reported-by: Karol Herbst <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Cc: [email protected]
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_push.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_push.c b/src/gallium/drivers/nouveau/nv50/nv50_push.c
index 9ee9a8eed19..bec2d42e037 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_push.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_push.c
@@ -279,8 +279,7 @@ nv50_push_vbo(struct nv50_context *nv50, const struct pipe_draw_info *info)
if (info->index_size) {
if (!info->has_user_indices) {
ctx.idxbuf = nouveau_resource_map_offset(&nv50->base,
- nv04_resource(info->index.resource), info->start * info->index_size,
- NOUVEAU_BO_RD);
+ nv04_resource(info->index.resource), 0, NOUVEAU_BO_RD);
} else {
ctx.idxbuf = info->index.user;
}