summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index e90dfc5aec..d3084fd428 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -34,11 +34,8 @@
#include "util/u_memory.h"
#include "util/u_math.h"
#include "draw_context.h"
-#include "draw_vbuf.h"
#include "draw_vs.h"
#include "draw_gs.h"
-#include "draw_pt.h"
-#include "draw_pipe.h"
struct draw_context *draw_create( void )
@@ -237,17 +234,20 @@ draw_set_mapped_vertex_buffer(struct draw_context *draw,
void
draw_set_mapped_constant_buffer(struct draw_context *draw,
unsigned shader_type,
+ unsigned slot,
const void *buffer,
unsigned size )
{
debug_assert(shader_type == PIPE_SHADER_VERTEX ||
shader_type == PIPE_SHADER_GEOMETRY);
+ debug_assert(slot < PIPE_MAX_CONSTANT_BUFFERS);
+
if (shader_type == PIPE_SHADER_VERTEX) {
- draw->pt.user.vs_constants = buffer;
- draw_vs_set_constants( draw, (const float (*)[4])buffer, size );
+ draw->pt.user.vs_constants[slot] = buffer;
+ draw_vs_set_constants(draw, slot, buffer, size);
} else if (shader_type == PIPE_SHADER_GEOMETRY) {
- draw->pt.user.gs_constants = buffer;
- draw_gs_set_constants( draw, (const float (*)[4])buffer, size );
+ draw->pt.user.gs_constants[slot] = buffer;
+ draw_gs_set_constants(draw, slot, buffer, size);
}
}