summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/draw')
-rw-r--r--src/mesa/pipe/draw/draw_context.h2
-rw-r--r--src/mesa/pipe/draw/draw_prim.c9
-rw-r--r--src/mesa/pipe/draw/draw_private.h2
3 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/pipe/draw/draw_context.h b/src/mesa/pipe/draw/draw_context.h
index 2fce1322c5..893db1e0c6 100644
--- a/src/mesa/pipe/draw/draw_context.h
+++ b/src/mesa/pipe/draw/draw_context.h
@@ -103,6 +103,8 @@ void draw_set_mapped_element_buffer( struct draw_context *draw,
void draw_set_mapped_vertex_buffer(struct draw_context *draw,
unsigned attr, const void *buffer);
+void draw_set_mapped_constant_buffer(struct draw_context *draw,
+ const void *buffer);
void
draw_set_vertex_buffer(struct draw_context *draw,
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)
{
diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h
index 85feb14688..75f7c5d84e 100644
--- a/src/mesa/pipe/draw/draw_private.h
+++ b/src/mesa/pipe/draw/draw_private.h
@@ -167,6 +167,8 @@ struct draw_context
unsigned eltSize; /**< bytes per index (0, 1, 2 or 4) */
/** The mapped vertex arrays */
const void *mapped_vbuffer[PIPE_ATTRIB_MAX];
+ /** The mapped constant buffers (for vertex shader) */
+ const void *mapped_constants;
/* Clip derived state:
*/