From 6358e6371b31671acbfa7c00336673f62ee928c5 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Thu, 10 Mar 2011 23:04:10 +0100 Subject: i915g: implement hw clear Benefits: - spares us a relocation. - needed for zone rendering (if that ever happens). - just awesome. v2: Rename the debug option. Completely disabling the blitter is required for Y tiling to work, so this option will cover other code paths in the future. v3: Implement suggestions by Jakob Bornecrantz. Signed-off-by: Daniel Vetter --- src/gallium/drivers/i915/i915_batchbuffer.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gallium/drivers/i915/i915_batchbuffer.h') diff --git a/src/gallium/drivers/i915/i915_batchbuffer.h b/src/gallium/drivers/i915/i915_batchbuffer.h index 9df82272604..78554034781 100644 --- a/src/gallium/drivers/i915/i915_batchbuffer.h +++ b/src/gallium/drivers/i915/i915_batchbuffer.h @@ -54,6 +54,16 @@ i915_winsys_batchbuffer_dword_unchecked(struct i915_winsys_batchbuffer *batch, batch->ptr += 4; } +static INLINE void +i915_winsys_batchbuffer_float(struct i915_winsys_batchbuffer *batch, + float f) +{ + union { float f; unsigned int ui; } uif; + uif.f = f; + assert (i915_winsys_batchbuffer_space(batch) >= 4); + i915_winsys_batchbuffer_dword_unchecked(batch, uif.ui); +} + static INLINE void i915_winsys_batchbuffer_dword(struct i915_winsys_batchbuffer *batch, unsigned dword) -- cgit v1.2.3