diff options
author | José Fonseca <[email protected]> | 2012-12-04 14:52:44 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2012-12-07 15:03:07 +0000 |
commit | 1d35f77228ad540a551a8e09e062b764a6e31f5e (patch) | |
tree | a9128d5c57a248616077b3977ef88b5e45e33b6d /src/gallium/auxiliary/draw/draw_llvm.c | |
parent | 35840ab189595b817fa8b1a1df8cc92474a7c38d (diff) |
gallivm,llvmpipe,draw: Support multiple constant buffers.
Support 16 (defined in LP_MAX_TGSI_CONST_BUFFERS) as opposed to 32 (as
defined by PIPE_MAX_CONSTANT_BUFFERS) because that would make the jit
context become unnecessarily large.
v2: Bump limit from 4 to 16 to cover ARB_uniform_buffer_object needs,
per Dave Airlie.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_llvm.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_llvm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index 6f0e1de7481..039db8fce49 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -161,8 +161,9 @@ create_jit_context_type(struct gallivm_state *gallivm, LLVMTypeRef elem_types[5]; LLVMTypeRef context_type; - elem_types[0] = LLVMPointerType(float_type, 0); /* vs_constants */ - elem_types[1] = LLVMPointerType(float_type, 0); /* gs_constants */ + elem_types[0] = LLVMArrayType(LLVMPointerType(float_type, 0), /* vs_constants */ + LP_MAX_TGSI_CONST_BUFFERS); + elem_types[1] = elem_types[0]; /* gs_constants */ elem_types[2] = LLVMPointerType(LLVMArrayType(LLVMArrayType(float_type, 4), DRAW_TOTAL_CLIP_PLANES), 0); elem_types[3] = LLVMPointerType(float_type, 0); /* viewport */ |