aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_batchbuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/i915/i915_batchbuffer.h')
-rw-r--r--src/gallium/drivers/i915/i915_batchbuffer.h10
1 files changed, 10 insertions, 0 deletions
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
@@ -55,6 +55,16 @@ i915_winsys_batchbuffer_dword_unchecked(struct i915_winsys_batchbuffer *batch,
}
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)
{