Merge branch 'gallium-0.2' into gallium-winsys-private
[mesa.git] / src / gallium / drivers / nv50 / nv50_vbo.c
index 584336682e443a76550d42df0687e6303a064fb3..86471c00e03da2616d3f54498563ff48cae9aad1 100644 (file)
@@ -60,6 +60,10 @@ nv50_draw_arrays(struct pipe_context *pipe, unsigned mode, unsigned start,
        OUT_RING  (0);
        BEGIN_RING(tesla, 0x142c, 1);
        OUT_RING  (0);
+       BEGIN_RING(tesla, 0x1440, 1);
+       OUT_RING  (0);
+       BEGIN_RING(tesla, 0x1334, 1);
+       OUT_RING  (0);
 
        BEGIN_RING(tesla, NV50TCL_VERTEX_BEGIN, 1);
        OUT_RING  (nv50_prim(mode));
@@ -149,7 +153,7 @@ nv50_draw_elements(struct pipe_context *pipe,
 {
        struct nv50_context *nv50 = nv50_context(pipe);
        struct pipe_winsys *ws = pipe->winsys;
-       void *map = ws->buffer_map(ws, indexBuffer, PIPE_BUFFER_USAGE_CPU_READ);
+       void *map = ws->_buffer_map(ws, indexBuffer, PIPE_BUFFER_USAGE_CPU_READ);
 
        nv50_state_validate(nv50);
 
@@ -222,7 +226,7 @@ nv50_vbo_validate(struct nv50_context *nv50)
                }
 
                so_method(vtxbuf, tesla, 0x900 + (i * 16), 3);
-               so_data  (vtxbuf, 0x20000000 | vb->pitch);
+               so_data  (vtxbuf, 0x20000000 | vb->stride);
                so_reloc (vtxbuf, vb->buffer, vb->buffer_offset +
                          ve->src_offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_GART |
                          NOUVEAU_BO_RD | NOUVEAU_BO_HIGH, 0, 0);