summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_jit.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2012-12-04 14:52:44 +0000
committerJosé Fonseca <jfonseca@vmware.com>2012-12-07 15:03:07 +0000
commit1d35f77228ad540a551a8e09e062b764a6e31f5e (patch)
treea9128d5c57a248616077b3977ef88b5e45e33b6d /src/gallium/drivers/llvmpipe/lp_jit.h
parent35840ab189595b817fa8b1a1df8cc92474a7c38d (diff)
downloadexternal_mesa3d-1d35f77228ad540a551a8e09e062b764a6e31f5e.zip
external_mesa3d-1d35f77228ad540a551a8e09e062b764a6e31f5e.tar.gz
external_mesa3d-1d35f77228ad540a551a8e09e062b764a6e31f5e.tar.bz2
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 <brianp@vmware.com>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_jit.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.h b/src/gallium/drivers/llvmpipe/lp_jit.h
index b469907..5dc5bc4 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.h
+++ b/src/gallium/drivers/llvmpipe/lp_jit.h
@@ -37,6 +37,7 @@
#include "gallivm/lp_bld_struct.h"
+#include "gallivm/lp_bld_limits.h"
#include "pipe/p_state.h"
#include "lp_texture.h"
@@ -97,7 +98,7 @@ enum {
*/
struct lp_jit_context
{
- const float *constants;
+ const float *constants[LP_MAX_TGSI_CONST_BUFFERS];
float alpha_ref_value;
@@ -127,7 +128,7 @@ enum {
#define lp_jit_context_constants(_gallivm, _ptr) \
- lp_build_struct_get(_gallivm, _ptr, LP_JIT_CTX_CONSTANTS, "constants")
+ lp_build_struct_get_ptr(_gallivm, _ptr, LP_JIT_CTX_CONSTANTS, "constants")
#define lp_jit_context_alpha_ref_value(_gallivm, _ptr) \
lp_build_struct_get(_gallivm, _ptr, LP_JIT_CTX_ALPHA_REF, "alpha_ref_value")