summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915/i915_context.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-11-25 15:41:37 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-02-21 13:04:46 +0000
commit2c6793fb6bc89df16c23f727bcb072a157ab8d10 (patch)
treeef6ab3dfa931a84b8ab84259d45346c2a1dee622 /src/mesa/drivers/dri/i915/i915_context.h
parent298ebb78de8a6b6edf0aa0fe8d784d00bbc2930e (diff)
i915: Emit a single relocation per vbo
Reducing the number of relocations has lots of nice knock-on effects, not least including reducing batch buffer size, auxilliary array sizes (vmalloced and copied into the kernel), processing of uncached relocations etc. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/mesa/drivers/dri/i915/i915_context.h')
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h
index e38281ee03..601620275f 100644
--- a/src/mesa/drivers/dri/i915/i915_context.h
+++ b/src/mesa/drivers/dri/i915/i915_context.h
@@ -29,7 +29,6 @@
#define I915CONTEXT_INC
#include "intel_context.h"
-#include "i915_reg.h"
#define I915_FALLBACK_TEXTURE 0x1000
#define I915_FALLBACK_COLORMASK 0x2000
@@ -126,6 +125,12 @@ enum {
#define I915_MAX_CONSTANT 32
#define I915_CONSTANT_SIZE (2+(4*I915_MAX_CONSTANT))
+#define I915_MAX_TEX_INDIRECT 4
+#define I915_MAX_TEX_INSN 32
+#define I915_MAX_ALU_INSN 64
+#define I915_MAX_DECL_INSN 27
+#define I915_MAX_TEMPORARY 16
+
#define I915_MAX_INSN (I915_MAX_DECL_INSN + \
I915_MAX_TEX_INSN + \
I915_MAX_ALU_INSN)
@@ -264,6 +269,9 @@ struct i915_context
struct i915_fragment_program *current_program;
+ drm_intel_bo *current_vb_bo;
+ unsigned int current_vertex_size;
+
struct i915_hw_state state;
uint32_t last_draw_offset;
GLuint last_sampler;