diff options
author | Dave Airlie <airlied@redhat.com> | 2009-09-26 19:32:46 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-09-26 19:32:46 +1000 |
commit | eb5dd947fbed35478784e777fe2e59564fee051b (patch) | |
tree | 2565ba63bf614efde1c7b22ebb764f61f17aa5ab /src/gallium/drivers/r300/r300_texture.c | |
parent | 9bf85f6b95cb684d16b6035381b1f8a9c44f473f (diff) |
r300g: add tx depth support in register.
also enable cube/3d bits in txformat reg
Diffstat (limited to 'src/gallium/drivers/r300/r300_texture.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_texture.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index 2ec07b453d..ce60ded7ca 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -29,11 +29,18 @@ static void r300_setup_texture_state(struct r300_texture* tex) state->format0 = R300_TX_WIDTH((pt->width[0] - 1) & 0x7ff) | R300_TX_HEIGHT((pt->height[0] - 1) & 0x7ff) | + R300_TX_DEPTH(util_logbase2(pt->depth[0]) & 0xf) | R300_TX_NUM_LEVELS(pt->last_level) | R300_TX_PITCH_EN; /* XXX */ state->format1 = r300_translate_texformat(pt->format); + if (pt->target == PIPE_TEXTURE_CUBE) { + state->format1 |= R300_TX_FORMAT_CUBIC_MAP; + } + if (pt->target == PIPE_TEXTURE_3D) { + state->format1 |= R300_TX_FORMAT_3D; + } state->format2 = (r300_texture_get_stride(tex, 0) / pt->block.size) - 1; |