unsigned depth_pitch; /* per-image on i945? */
unsigned total_height;
+ unsigned tiled;
+
unsigned nr_images[PIPE_MAX_TEXTURE_LEVELS];
/* Explicitly store the offset of each image for each cube face or
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);
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);
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);
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,
if (tex->base.width[0] >= 128) {
tex->pitch = power_of_two(tex->base.width[0] * pt->cpp) / pt->cpp;
tex->total_height = round_up(tex->base.height[0], 8);
+ tex->tiled = 1;
} else {
tex->pitch = round_up(tex->base.width[0], 64 / pt->cpp);
tex->total_height = tex->base.height[0];