nv30/draw: draw expects constbuf size in bytes, not vec4 units
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 25 May 2015 18:06:01 +0000 (14:06 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 25 May 2015 18:11:16 +0000 (14:11 -0400)
This fixes glxgears with NV30_SWTNL=1 forced on. Probably fixes a bunch
of other situations where we fall back to the swtnl path.

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 8db15c6c05979a6e763a06855c7f9e6079fa7508..6a0d06f2ccfb82232ee7cb4729fd6977a3bcc83b 100644 (file)
@@ -399,7 +399,7 @@ nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
       if (nv30->vertprog.constbuf) {
          void *map = nv04_resource(nv30->vertprog.constbuf)->data;
          draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0,
-                                         map, nv30->vertprog.constbuf_nr);
+                                         map, nv30->vertprog.constbuf_nr * 16);
       } else {
          draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, NULL, 0);
       }