aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_winsys.h
diff options
context:
space:
mode:
authorDaniel Vetter <[email protected]>2010-11-21 20:34:44 +0100
committerJakob Bornecrantz <[email protected]>2010-12-02 01:34:12 +0100
commit4a666488c4e3067eed984e272149411cc2198c77 (patch)
treef1c82966a868f032dce2db59ed4b3b891a83d771 /src/gallium/drivers/i915/i915_winsys.h
parentc62f5c7e7bc3ed84677805b3800fbcfa93c419ea (diff)
i915g: add winsys function to create tiled buffers
Different kernels have different restrictions for tiled buffers. Hence use the libdrm abstraction to calculate the necessary stride and height alignment requirements. Not yet used. v2: Incorporate review comments from Jakob Bornecrantz Signed-off-by: Daniel Vetter <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
Diffstat (limited to 'src/gallium/drivers/i915/i915_winsys.h')
-rw-r--r--src/gallium/drivers/i915/i915_winsys.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/i915/i915_winsys.h b/src/gallium/drivers/i915/i915_winsys.h
index 3d5627045bc..59b7220e592 100644
--- a/src/gallium/drivers/i915/i915_winsys.h
+++ b/src/gallium/drivers/i915/i915_winsys.h
@@ -134,6 +134,20 @@ struct i915_winsys {
enum i915_winsys_buffer_type type);
/**
+ * Create a tiled buffer.
+ *
+ * *stride, height are in bytes. The winsys tries to allocate the buffer with
+ * the tiling mode provide in *tiling. If tiling is no possible, *tiling will
+ * be set to I915_TILE_NONE. The calculated stride (incorporateing hw/kernel
+ * requirements) is always returned in *stride.
+ */
+ struct i915_winsys_buffer *
+ (*buffer_create_tiled)(struct i915_winsys *iws,
+ unsigned *stride, unsigned height,
+ enum i915_winsys_buffer_tile *tiling,
+ enum i915_winsys_buffer_type type);
+
+ /**
* Creates a buffer from a handle.
* Used to implement pipe_screen::resource_from_handle.
* Also provides the stride information needed for the