diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2007-03-19 09:39:11 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2007-03-19 09:39:11 +0000 |
commit | c8068c6d785d0975de782d15333e665122697f19 (patch) | |
tree | fc580894753b08e549420ed7d7c206920f0c9d28 | |
parent | 5cda1f01a1a63da6b14edc23142f074fd41e65ff (diff) |
add DEBUG_ALWAYS_SYNC option
-rw-r--r-- | src/mesa/drivers/dri/i915tex/i915_state_program.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_batchbuffer.c | 17 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_context.h | 1 |
3 files changed, 16 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i915tex/i915_state_program.c b/src/mesa/drivers/dri/i915tex/i915_state_program.c index 44d578dd8c..6d070b4d84 100644 --- a/src/mesa/drivers/dri/i915tex/i915_state_program.c +++ b/src/mesa/drivers/dri/i915tex/i915_state_program.c @@ -55,6 +55,9 @@ static void upload_program( struct intel_context *intel ) /* As the compiled program depends only on the original program * text, just store the compiled version in the fragment program * struct. + * + * Could do the same with the indirect offset & avoid the need for + * hashing & caching the generated program. */ if (!fp->translated) { i915_compile_fragment_program(i915, fp); diff --git a/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c b/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c index 662aa14048..0dbb0d3e60 100644 --- a/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i915tex/intel_batchbuffer.c @@ -84,11 +84,8 @@ static void dump(struct intel_context *intel, assert(0); return; } - - for (j = 0; j < len; j++, i++) - _mesa_printf("\t\t0x%08x\n", ptr[i]); - - _mesa_printf("\n"); + + i += len; } } @@ -365,6 +362,16 @@ intel_batchbuffer_flush(struct intel_batchbuffer *batch) /* Reset the buffer: */ intel_batchbuffer_reset(batch); + + + if (INTEL_DEBUG & DEBUG_ALWAYS_SYNC) + { + struct _DriFenceObject *fence = batch->last_fence; + driFenceReference(fence); + driFenceFinish(fence, 3, GL_FALSE); + driFenceUnReference(fence); + } + return batch->last_fence; } diff --git a/src/mesa/drivers/dri/i915tex/intel_context.h b/src/mesa/drivers/dri/i915tex/intel_context.h index a3afffe1d0..ac6dcf3465 100644 --- a/src/mesa/drivers/dri/i915tex/intel_context.h +++ b/src/mesa/drivers/dri/i915tex/intel_context.h @@ -394,6 +394,7 @@ extern int INTEL_DEBUG; #define DEBUG_LOCK 0x1000 #define DEBUG_IDX 0x2000 #define DEBUG_TRI 0x4000 +#define DEBUG_ALWAYS_SYNC 0x8000 #define DBG(...) do { if (INTEL_DEBUG & FILE_DEBUG_FLAG) _mesa_printf(__VA_ARGS__); } while(0) |