nv30/draw: fix indexed draws with swtnl path and a resource index buffer
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 26 May 2015 00:15:09 +0000 (20:15 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 26 May 2015 00:16:51 +0000 (20:16 -0400)
The map = assignment was missing.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/nv30/nv30_draw.c

index 6a0d06f2ccfb82232ee7cb4729fd6977a3bcc83b..340474a0247ad974a424cfb43aae64fb2693de66 100644 (file)
@@ -419,9 +419,9 @@ nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
    if (info->indexed) {
       const void *map = nv30->idxbuf.user_buffer;
       if (!map)
-         pipe_buffer_map(pipe, nv30->idxbuf.buffer,
-                                  PIPE_TRANSFER_UNSYNCHRONIZED |
-                                  PIPE_TRANSFER_READ, &transferi);
+         map = pipe_buffer_map(pipe, nv30->idxbuf.buffer,
+                               PIPE_TRANSFER_UNSYNCHRONIZED |
+                               PIPE_TRANSFER_READ, &transferi);
       draw_set_indexes(draw,
                        (ubyte *) map + nv30->idxbuf.offset,
                        nv30->idxbuf.index_size, ~0);