summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv10
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-06-23 00:14:21 +1000
committerBen Skeggs <[email protected]>2008-06-23 00:14:21 +1000
commit5a01060eb95cb2cb168cb7224ecc805020584c91 (patch)
tree8c1f4fee11b2eae2df8a32108bfee6a32910faa7 /src/gallium/drivers/nv10
parentaa3ab377e6e2e5811cdd704d87c3e24acb5eff72 (diff)
nouveau: update for interface changes + hack around gallium x86_64 bustage
Diffstat (limited to 'src/gallium/drivers/nv10')
-rw-r--r--src/gallium/drivers/nv10/nv10_context.h1
-rw-r--r--src/gallium/drivers/nv10/nv10_state.c2
-rw-r--r--src/gallium/drivers/nv10/nv10_vbo.c4
3 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv10/nv10_context.h b/src/gallium/drivers/nv10/nv10_context.h
index 5636dfc9d22..2bdba53db8a 100644
--- a/src/gallium/drivers/nv10/nv10_context.h
+++ b/src/gallium/drivers/nv10/nv10_context.h
@@ -66,6 +66,7 @@ struct nv10_context {
//struct pipe_buffer *constbuf[PIPE_SHADER_TYPES];
float *constbuf[PIPE_SHADER_TYPES][32][4];
+ unsigned constbuf_nr[PIPE_SHADER_TYPES];
struct vertex_info vertex_info;
diff --git a/src/gallium/drivers/nv10/nv10_state.c b/src/gallium/drivers/nv10/nv10_state.c
index 4dcb9a31ab1..11664fae2af 100644
--- a/src/gallium/drivers/nv10/nv10_state.c
+++ b/src/gallium/drivers/nv10/nv10_state.c
@@ -469,6 +469,8 @@ nv10_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
if (buf->size && (mapped = ws->buffer_map(ws, buf->buffer, PIPE_BUFFER_USAGE_CPU_READ)))
{
memcpy(nv10->constbuf[shader], mapped, buf->size);
+ nv10->constbuf_nr[shader] =
+ buf->size / (4 * sizeof(float));
ws->buffer_unmap(ws, buf->buffer);
}
}
diff --git a/src/gallium/drivers/nv10/nv10_vbo.c b/src/gallium/drivers/nv10/nv10_vbo.c
index 2a334e137d9..f024f534209 100644
--- a/src/gallium/drivers/nv10/nv10_vbo.c
+++ b/src/gallium/drivers/nv10/nv10_vbo.c
@@ -44,7 +44,9 @@ boolean nv10_draw_elements( struct pipe_context *pipe,
draw_set_mapped_element_buffer(draw, 0, NULL);
}
- draw_set_mapped_constant_buffer(draw, nv10->constbuf[PIPE_SHADER_VERTEX]);
+ draw_set_mapped_constant_buffer(draw,
+ nv10->constbuf[PIPE_SHADER_VERTEX],
+ nv10->constbuf_nr[PIPE_SHADER_VERTEX]);
/* draw! */
draw_arrays(nv10->draw, prim, start, count);