summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i915simple/i915_state_emit.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@tungstengraphics.com>2008-06-23 17:57:45 +0200
committerJakob Bornecrantz <jakob@tungstengraphics.com>2008-06-23 18:36:36 +0200
commitf52ab4cc22bfb6708724f3c3966ce734d605cddd (patch)
tree64f70ffa514ac8f66af034243747333698c6548d /src/gallium/drivers/i915simple/i915_state_emit.c
parenta479bf62353b6517841e620122112e7565d2391c (diff)
i915: Add render and texture support for tiled texture and buffers
This is step towards tiled textures and buffer support for i915. But the tiled attribute is never set.
Diffstat (limited to 'src/gallium/drivers/i915simple/i915_state_emit.c')
-rw-r--r--src/gallium/drivers/i915simple/i915_state_emit.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/i915simple/i915_state_emit.c b/src/gallium/drivers/i915simple/i915_state_emit.c
index bc801a82f0..19d968fd8b 100644
--- a/src/gallium/drivers/i915simple/i915_state_emit.c
+++ b/src/gallium/drivers/i915simple/i915_state_emit.c
@@ -213,10 +213,10 @@ i915_emit_hardware_state(struct i915_context *i915 )
if (cbuf_surface) {
unsigned cpitch = (cbuf_surface->pitch * cbuf_surface->cpp);
unsigned ctile = BUF_3D_USE_FENCE;
-#if 0
- if (!((cpitch - 1) & cpitch) && cpitch >= 512)
+ if (cbuf_surface->texture &&
+ ((struct i915_texture*)(cbuf_surface->texture))->tiled) {
ctile = BUF_3D_TILED_SURFACE;
-#endif
+ }
OUT_BATCH(_3DSTATE_BUF_INFO_CMD);
@@ -234,10 +234,10 @@ i915_emit_hardware_state(struct i915_context *i915 )
if (depth_surface) {
unsigned zpitch = (depth_surface->pitch * depth_surface->cpp);
unsigned ztile = BUF_3D_USE_FENCE;
-#if 0
- if (!((zpitch - 1) & zpitch) && zpitch >= 512)
+ if (depth_surface->texture &&
+ ((struct i915_texture*)(depth_surface->texture))->tiled) {
ztile = BUF_3D_TILED_SURFACE;
-#endif
+ }
OUT_BATCH(_3DSTATE_BUF_INFO_CMD);