diff options
author | Eric Anholt <eric@anholt.net> | 2009-01-15 19:05:52 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-01-16 17:56:03 -0800 |
commit | db43b7870a37ea273941302096a6f00120dfae71 (patch) | |
tree | 69e274699e4b3c1b7151312808810eae8209fb05 /src/i830_batchbuffer.h | |
parent | cab5b7a7b0e17414f98b2363b0961c87f32f9c05 (diff) |
Re-emit i915 composite setup when the batchbuffer wraps.
This also introduces tests to make sure that we asked for enough reserved space
and that we don't allow wrapping at the wrong time.
This fixes a hang during text rendering with DRI2 and a GL client running,
but could potentially affect text rendering with GEM in general with an
exceptional batchbuffer setup.
Diffstat (limited to 'src/i830_batchbuffer.h')
-rw-r--r-- | src/i830_batchbuffer.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/i830_batchbuffer.h b/src/i830_batchbuffer.h index 05114936..a72786e5 100644 --- a/src/i830_batchbuffer.h +++ b/src/i830_batchbuffer.h @@ -51,6 +51,28 @@ intel_batch_require_space(ScrnInfoPtr pScrn, I830Ptr pI830, GLuint sz) } static inline void +intel_batch_start_atomic(ScrnInfoPtr pScrn, unsigned int sz) +{ + I830Ptr pI830 = I830PTR(pScrn); + + assert(!pI830->in_batch_atomic); + intel_batch_require_space(pScrn, pI830, sz); + + pI830->in_batch_atomic = TRUE; + pI830->batch_atomic_limit = pI830->batch_used + sz * 4; +} + +static inline void +intel_batch_end_atomic(ScrnInfoPtr pScrn) +{ + I830Ptr pI830 = I830PTR(pScrn); + + assert(pI830->in_batch_atomic); + assert(pI830->batch_used <= pI830->batch_atomic_limit); + pI830->in_batch_atomic = FALSE; +} + +static inline void intel_batch_emit_dword(I830Ptr pI830, uint32_t dword) { assert(pI830->batch_ptr != NULL); |