From a6d9d18faecef9963be3e4b64a21b89889b4670d Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 28 May 2010 16:54:35 +0100 Subject: llvmpipe: hook up basic gs and multiple constant buffer support --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gallium/drivers/llvmpipe/lp_state_fs.c') diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 6896bedf18..2619e043fd 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -1078,18 +1078,18 @@ llvmpipe_set_constant_buffer(struct pipe_context *pipe, const void *data = constants ? llvmpipe_resource_data(constants) : NULL; assert(shader < PIPE_SHADER_TYPES); - assert(index == 0); + assert(index < PIPE_MAX_CONSTANT_BUFFERS); - if(llvmpipe->constants[shader] == constants) + if(llvmpipe->constants[shader][index] == constants) return; draw_flush(llvmpipe->draw); /* note: reference counting */ - pipe_resource_reference(&llvmpipe->constants[shader], constants); + pipe_resource_reference(&llvmpipe->constants[shader][index], constants); if(shader == PIPE_SHADER_VERTEX) { - draw_set_mapped_constant_buffer(llvmpipe->draw, PIPE_SHADER_VERTEX, 0, + draw_set_mapped_constant_buffer(llvmpipe->draw, PIPE_SHADER_VERTEX, index, data, size); } -- cgit v1.2.3