diff options
author | Jerome Glisse <jglisse@redhat.com> | 2010-08-21 22:49:22 -0400 |
---|---|---|
committer | Jerome Glisse <jglisse@redhat.com> | 2010-08-21 22:52:38 -0400 |
commit | 36efb86c0570d86d8dfce87fd2416125e0e91b40 (patch) | |
tree | 127f6694d20d068d819682e82f96d9ec59685cf3 /src/gallium/drivers/r600/r600_state.c | |
parent | ae34a6393e6519dc32e53fa8407155e8679fc257 (diff) |
r600g: partialy fix texturing from depth buffer + initial support for untiling
Partialy fix texturing from depth buffer, depth buffer is tiled
following different tile organisation that color buffer. This
properly set the tile type & array mode field of texture sampler
when sampling from db resource.
Add initial support to untiling buffer when transfering them,
it's kind of broken by corruption the vertex buffer of previous
draw.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'src/gallium/drivers/r600/r600_state.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 93fc68e42e..e9b03f571a 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -773,6 +773,9 @@ static struct radeon_state *r600_db(struct r600_context *rctx) return NULL; rtex = (struct r600_resource_texture*)state->zsbuf->texture; + rtex->tilled = 1; + rtex->array_mode = 2; + rtex->tile_type = 1; rbuffer = &rtex->resource; rstate->bo[0] = radeon_bo_incref(rscreen->rw, rbuffer->bo); rstate->nbo = 1; @@ -1258,7 +1261,9 @@ static struct radeon_state *r600_resource(struct r600_context *rctx, /* FIXME properly handle first level != 0 */ rstate->states[R600_PS_RESOURCE__RESOURCE0_WORD0] = S_038000_DIM(r600_tex_dim(view->texture->target)) | - S_038000_PITCH((pitch / 8) - 1) | + S_038000_TILE_MODE(tmp->array_mode) | + S_038000_TILE_TYPE(tmp->tile_type) | + S_038000_PITCH((pitch / 8) - 1) | S_038000_TEX_WIDTH(view->texture->width0 - 1); rstate->states[R600_PS_RESOURCE__RESOURCE0_WORD1] = S_038004_TEX_HEIGHT(view->texture->height0 - 1) | |