diff options
author | Corbin Simpson <[email protected]> | 2009-10-06 15:30:39 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2009-10-12 21:48:07 -0700 |
commit | 05fc9cdfdfceaf7ca1db64bf1feccf649fe4c907 (patch) | |
tree | 7ecdcaac368b5014a79cc5ec58bf814f81a1d022 /src | |
parent | 3f928b355275c0e76ead6febe471a552ece8b0a8 (diff) |
r300g: Clean up texture formats.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state_inlines.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_texture.h | 13 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 81d01b1320c..e8d991586fb 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -215,10 +215,8 @@ static boolean check_tex_2d_format(enum pipe_format format, uint32_t usage, PIPE_TEXTURE_USAGE_PRIMARY | PIPE_TEXTURE_USAGE_SAMPLER); - /* Z buffer */ + /* Z buffer or texture */ case PIPE_FORMAT_Z16_UNORM: - return usage & PIPE_TEXTURE_USAGE_DEPTH_STENCIL; - /* Z buffer with stencil or texture */ case PIPE_FORMAT_Z24S8_UNORM: return usage & diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h index 88eb66b79e7..d7b57e1b227 100644 --- a/src/gallium/drivers/r300/r300_state_inlines.h +++ b/src/gallium/drivers/r300/r300_state_inlines.h @@ -295,7 +295,6 @@ static INLINE uint32_t r300_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_X8R8G8B8_UNORM: case PIPE_FORMAT_R8G8B8A8_UNORM: case PIPE_FORMAT_R8G8B8X8_UNORM: - case PIPE_FORMAT_Z24S8_UNORM: return R300_COLOR_FORMAT_ARGB8888; /* XXX Not in pipe_format case PIPE_FORMAT_A32R32G32B32: diff --git a/src/gallium/drivers/r300/r300_texture.h b/src/gallium/drivers/r300/r300_texture.h index e5182d31b42..992dad77ab4 100644 --- a/src/gallium/drivers/r300/r300_texture.h +++ b/src/gallium/drivers/r300/r300_texture.h @@ -43,6 +43,14 @@ static INLINE uint32_t r300_translate_texformat(enum pipe_format format) /* X8 */ case PIPE_FORMAT_I8_UNORM: return R300_EASY_TX_FORMAT(X, X, X, X, X8); + /* X16 */ + case PIPE_FORMAT_R16_UNORM: + return R300_EASY_TX_FORMAT(X, X, X, X, X16); + case PIPE_FORMAT_R16_SNORM: + return R300_EASY_TX_FORMAT(X, X, X, X, X16) | + R300_TX_FORMAT_SIGNED; + case PIPE_FORMAT_Z16_UNORM: + return R300_EASY_TX_FORMAT(X, X, X, X, X16); /* W8Z8Y8X8 */ case PIPE_FORMAT_A8R8G8B8_UNORM: return R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8); @@ -76,11 +84,6 @@ static INLINE uint32_t r300_translate_texformat(enum pipe_format format) /* W24_FP */ case PIPE_FORMAT_Z24S8_UNORM: return R300_EASY_TX_FORMAT(X, X, X, X, W24_FP); - /* Z5_Y6_X5 */ - case PIPE_FORMAT_R16_SNORM: - return R300_EASY_TX_FORMAT(X, X, X, X, Z5Y6X5); - case PIPE_FORMAT_Z16_UNORM: - return R300_EASY_TX_FORMAT(X, X, X, X, X16); default: debug_printf("r300: Implementation error: " "Got unsupported texture format %s in %s\n", |