r600g: just change tile type when buffer is set to depth.
authorDave Airlie <airlied@redhat.com>
Tue, 1 Feb 2011 04:38:45 +0000 (14:38 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 1 Feb 2011 04:38:45 +0000 (14:38 +1000)
Not 100% sure on this one, but this is how it should work,
the question is whether it will uncover other bugs elsewhere.

src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c

index 426b3a9d6d80d980e05466297b2ffeb7f7cef69d..c64b93bd4fcfdf5c0b1bcfd836c85b6ed44ed49e 100644 (file)
@@ -721,10 +721,7 @@ static void evergreen_db(struct r600_pipe_context *rctx, struct r600_pipe_state
 
        surf = (struct r600_surface *)state->zsbuf;
        rtex = (struct r600_resource_texture*)state->zsbuf->texture;
-       rtex->tiled = 1;
-       rtex->array_mode[level] = 2;
        rtex->tile_type = 1;
-       rtex->depth = 1;
        rbuffer = &rtex->resource;
 
        /* XXX quite sure for dx10+ hw don't need any offset hacks */
index acaa5c05ae897dd67ec9a432fcdeb39445d92f7f..6adbbd9eabe24195efba2a846d2731465487eeca 100644 (file)
@@ -759,10 +759,9 @@ static void r600_db(struct r600_pipe_context *rctx, struct r600_pipe_state *rsta
 
        surf = (struct r600_surface *)state->zsbuf;
        rtex = (struct r600_resource_texture*)state->zsbuf->texture;
-       rtex->tiled = 1;
-       rtex->array_mode[level] = 2;
+
        rtex->tile_type = 1;
-       rtex->depth = 1;
+
        rbuffer = &rtex->resource;
 
        /* XXX quite sure for dx10+ hw don't need any offset hacks */