i915g: rip out ->sw_tiled
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 19 Nov 2010 22:38:18 +0000 (23:38 +0100)
committerJakob Bornecrantz <wallbraker@gmail.com>
Sun, 21 Nov 2010 15:41:18 +0000 (16:41 +0100)
It looks like this was meant to facilitate unfenced access to textures/
color/renderbuffers. It's totally incomplete and fundamentally broken
on a few levels:
- broken: The kernel needs to about every tiled bo to fix up bit17
  swizzling on swap-in.
- unflexible: fenced/unfenced relocs from execbuffer2 do the same, much
  simpler.
- unneeded: with relaxed fencing tiled gem bos are as memory-efficient
  as this trick.

Hence kill it.

Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jakob Bornecrantz <wallbraker@gmail.com>
src/gallium/drivers/i915/i915_resource.h
src/gallium/drivers/i915/i915_resource_texture.c
src/gallium/drivers/i915/i915_state_emit.c
src/gallium/drivers/i915/i915_state_sampler.c

index 1093e8f41f90319170829a38803a6a7b78ecb45c..1f87f56efaa1f204eb904447d04e63c24efde4bf 100644 (file)
@@ -56,7 +56,6 @@ struct i915_texture {
    unsigned depth_stride;          /* per-image on i945? */
    unsigned total_nblocksy;
 
-   unsigned sw_tiled; /**< tiled with software flags */
    unsigned hw_tiled; /**< tiled with hardware fences */
 
    unsigned nr_images[I915_MAX_TEXTURE_2D_LEVELS];
index c5c6179b169e5bd3138b94bd62f1ef26e545c5f3..eb040fea66050f3a6478904a40caca4745567764 100644 (file)
@@ -791,7 +791,6 @@ i915_texture_create(struct pipe_screen *screen,
 
    /* setup any hw fences */
    if (tex->hw_tiled) {
-      assert(tex->sw_tiled == I915_TILE_NONE);
       iws->buffer_set_fence_reg(iws, tex->buffer, tex->stride, tex->hw_tiled);
    }
 
index bd059d5716c2f5ef97cc7d24fa99fbd3fcc6c30c..49dff1f775c040ea0c9e6ddf18159be16d879d79 100644 (file)
@@ -224,10 +224,6 @@ i915_emit_hardware_state(struct i915_context *i915 )
          struct i915_texture *tex = i915_texture(cbuf_surface->texture);
          assert(tex);
 
-         if (tex && tex->sw_tiled) {
-            ctile = BUF_3D_TILED_SURFACE;
-         }
-
          OUT_BATCH(_3DSTATE_BUF_INFO_CMD);
 
          OUT_BATCH(BUF_3D_ID_COLOR_BACK |
@@ -246,10 +242,6 @@ i915_emit_hardware_state(struct i915_context *i915 )
          struct i915_texture *tex = i915_texture(depth_surface->texture);
          assert(tex);
 
-         if (tex && tex->sw_tiled) {
-            ztile = BUF_3D_TILED_SURFACE;
-         }
-
          OUT_BATCH(_3DSTATE_BUF_INFO_CMD);
 
          assert(tex);
index 4667e0b78d4f362a3b86fc70c78e88afb3ea19ff..9771274ca1126ef34893df1f8e07008ae3843a5a 100644 (file)
@@ -267,11 +267,6 @@ static void update_map(struct i915_context *i915,
    assert(format);
    assert(pitch);
 
-   if (tex->sw_tiled) {
-      assert(!((pitch - 1) & pitch));
-      tiled = MS3_TILED_SURFACE;
-   }
-
    /* MS3 state */
    state[0] =
       (((height - 1) << MS3_HEIGHT_SHIFT)