summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i915simple/i915_state_sampler.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_sampler.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_sampler.c')
-rw-r--r--src/gallium/drivers/i915simple/i915_state_sampler.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915simple/i915_state_sampler.c b/src/gallium/drivers/i915simple/i915_state_sampler.c
index 24440843f3..379aff3846 100644
--- a/src/gallium/drivers/i915simple/i915_state_sampler.c
+++ b/src/gallium/drivers/i915simple/i915_state_sampler.c
@@ -234,6 +234,7 @@ i915_update_texture(struct i915_context *i915,
const uint width = pt->width[0], height = pt->height[0], depth = pt->depth[0];
const uint num_levels = pt->last_level;
unsigned max_lod = num_levels * 4;
+ unsigned tiled = MS3_USE_FENCE_REGS;
assert(tex);
assert(width);
@@ -246,12 +247,17 @@ i915_update_texture(struct i915_context *i915,
assert(format);
assert(pitch);
+ if (tex->tiled) {
+ assert(!((pitch - 1) & pitch));
+ tiled = MS3_TILED_SURFACE;
+ }
+
/* MS3 state */
state[0] =
(((height - 1) << MS3_HEIGHT_SHIFT)
| ((width - 1) << MS3_WIDTH_SHIFT)
| format
- | MS3_USE_FENCE_REGS);
+ | tiled);
/*
* XXX When min_filter != mag_filter and there's just one mipmap level,