diff options
author | Marek Olšák <[email protected]> | 2011-10-25 01:28:39 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-10-25 01:47:03 +0200 |
commit | faa16dc456f1f910eef24eaa23889be806b513b7 (patch) | |
tree | a4bb0aef8679715f7d3b137c622b4e3d5fac7d5a /src/gallium/drivers/r600/r600_state.c | |
parent | 5c44c1348ea13f51a1616968daa7034bb48e42b1 (diff) |
r600g: set correct tiling flags in depth info
The kernel currently overwrites the flags, but if we stopped doing that,
this would break badly.
Diffstat (limited to 'src/gallium/drivers/r600/r600_state.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 1aa4105ddfe..bf3da791c81 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -1550,9 +1550,7 @@ static void r600_db(struct r600_pipe_context *rctx, struct r600_pipe_state *rsta { struct r600_resource_texture *rtex; struct r600_surface *surf; - unsigned level; - unsigned pitch, slice, format; - unsigned offset; + unsigned level, pitch, slice, format, offset, array_mode; if (state->zsbuf == NULL) return; @@ -1562,6 +1560,10 @@ 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; + /* XXX remove this once tiling is properly supported */ + array_mode = rtex->array_mode[level] ? rtex->array_mode[level] : + V_0280A0_ARRAY_1D_TILED_THIN1; + /* XXX quite sure for dx10+ hw don't need any offset hacks */ offset = r600_texture_get_offset((struct r600_resource_texture *)state->zsbuf->texture, level, state->zsbuf->u.tex.first_layer); @@ -1576,7 +1578,7 @@ static void r600_db(struct r600_pipe_context *rctx, struct r600_pipe_state *rsta 0xFFFFFFFF, NULL, 0); r600_pipe_state_add_reg(rstate, R_028004_DB_DEPTH_VIEW, 0x00000000, 0xFFFFFFFF, NULL, 0); r600_pipe_state_add_reg(rstate, R_028010_DB_DEPTH_INFO, - S_028010_ARRAY_MODE(rtex->array_mode[level]) | S_028010_FORMAT(format), + S_028010_ARRAY_MODE(array_mode) | S_028010_FORMAT(format), 0xFFFFFFFF, &rtex->resource, RADEON_USAGE_READWRITE); r600_pipe_state_add_reg(rstate, R_028D34_DB_PREFETCH_LIMIT, (surf->aligned_height / 8) - 1, 0xFFFFFFFF, NULL, 0); |