Mesa (master): nv30/draw: draw expects constbuf size in bytes, not vec4 units

Ilia Mirkin imirkin at kemper.freedesktop.org
Mon May 25 18:13:10 UTC 2015


Module: Mesa
Branch: master
Commit: 147816375d22a653176ab28ed650fa811ceea83f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=147816375d22a653176ab28ed650fa811ceea83f

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Mon May 25 14:06:01 2015 -0400

nv30/draw: draw expects constbuf size in bytes, not vec4 units

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 at alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable at lists.freedesktop.org>

---

 src/gallium/drivers/nouveau/nv30/nv30_draw.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nv30/nv30_draw.c b/src/gallium/drivers/nouveau/nv30/nv30_draw.c
index 8db15c6..6a0d06f 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_draw.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_draw.c
@@ -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);
       }




More information about the mesa-commit mailing list