summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw/draw_prim.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-22 12:24:51 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-22 12:26:46 -0600
commitc0bb4ba9e665e40a325d82aa2ee48d7b8abd603b (patch)
tree48338074f07042599856e95b4529e0ffbca4be63 /src/mesa/pipe/draw/draw_prim.c
parentd1fbf621dc48a488c0f860c5851332d269e6d637 (diff)
Rework of shader constant buffers.
They're now totally independent of the actual shaders. Also, implemented in terms of pipe_buffer_handles/objects.
Diffstat (limited to 'src/mesa/pipe/draw/draw_prim.c')
-rw-r--r--src/mesa/pipe/draw/draw_prim.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/pipe/draw/draw_prim.c b/src/mesa/pipe/draw/draw_prim.c
index 97484d5fb9..94cedb02a9 100644
--- a/src/mesa/pipe/draw/draw_prim.c
+++ b/src/mesa/pipe/draw/draw_prim.c
@@ -165,7 +165,7 @@ run_vertex_program(struct draw_context *draw,
NULL /*samplers*/ );
/* Consts does not require 16 byte alignment. */
- machine.Consts = draw->vertex_shader.constants->constant;
+ machine.Consts = (float (*)[4]) draw->mapped_constants;
machine.Inputs = ALIGN16_ASSIGN(inputs);
machine.Outputs = ALIGN16_ASSIGN(outputs);
@@ -742,6 +742,13 @@ void draw_set_mapped_vertex_buffer(struct draw_context *draw,
}
+void draw_set_mapped_constant_buffer(struct draw_context *draw,
+ const void *buffer)
+{
+ draw->mapped_constants = buffer;
+}
+
+
unsigned
draw_prim_info(unsigned prim, unsigned *first, unsigned *incr)
{