From 15e283669aa8832347b4733f9556efdb5692640e Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Tue, 26 Jan 2010 20:11:39 -0800 Subject: [PATCH] r300g: Add A8_UNORM texture format. Keeps teeworld happy. --- src/gallium/drivers/r300/r300_screen.c | 1 + src/gallium/drivers/r300/r300_texture.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 67325c6b80a..a4a0e528159 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -219,6 +219,7 @@ static boolean r300_is_format_supported(struct pipe_screen* screen, case PIPE_FORMAT_DXT5_RGBA: case PIPE_FORMAT_YCBCR: case PIPE_FORMAT_L8_UNORM: + case PIPE_FORMAT_A8_UNORM: case PIPE_FORMAT_A8L8_UNORM: retval = usage & PIPE_TEXTURE_USAGE_SAMPLER; break; diff --git a/src/gallium/drivers/r300/r300_texture.h b/src/gallium/drivers/r300/r300_texture.h index 1be1e6843c2..453fb1accc2 100644 --- a/src/gallium/drivers/r300/r300_texture.h +++ b/src/gallium/drivers/r300/r300_texture.h @@ -42,6 +42,7 @@ static INLINE uint32_t r300_translate_texformat(enum pipe_format format) { switch (format) { /* X8 */ + case PIPE_FORMAT_A8_UNORM: case PIPE_FORMAT_I8_UNORM: return R300_EASY_TX_FORMAT(X, X, X, X, X8); case PIPE_FORMAT_L8_UNORM: -- 2.30.2