diff options
author | Keith Whitwell <[email protected]> | 2010-11-03 14:23:45 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2010-11-09 20:12:46 +0000 |
commit | c2c55547dc36f404e29dbc9253166f90df6783af (patch) | |
tree | 53177b73eb4cdc019daf20f77fcf7aabdae1d269 /src/gallium/drivers/r600/r600_texture.c | |
parent | e3ea4aec033643a629e2fa48eb538fdb856adf4e (diff) |
r600g: attempt to turn on DXTn formats
Seems to sort-of work for non-mipmapped textures. Better than just
black anyway.
Diffstat (limited to 'src/gallium/drivers/r600/r600_texture.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 06d17f7709a..02160fd3bb6 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -806,7 +806,7 @@ uint32_t r600_translate_texformat(enum pipe_format format, result = FMT_24_8; goto out_word4; case PIPE_FORMAT_S8_USCALED: - result = V_0280A0_COLOR_8; + result = FMT_8; word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_INT); goto out_word4; default: @@ -835,7 +835,20 @@ uint32_t r600_translate_texformat(enum pipe_format format, /* S3TC formats. TODO */ if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) { - goto out_unknown; + switch (format) { + case PIPE_FORMAT_DXT1_RGB: + case PIPE_FORMAT_DXT1_RGBA: + result = FMT_BC1; + goto out_word4; + case PIPE_FORMAT_DXT3_RGBA: + result = FMT_BC2; + goto out_word4; + case PIPE_FORMAT_DXT5_RGBA: + result = FMT_BC3; + goto out_word4; + default: + goto out_unknown; + } } |