diff options
author | Roland Scheidegger <rscheidegger@gmx.ch> | 2006-10-15 21:47:56 +0000 |
---|---|---|
committer | Roland Scheidegger <rscheidegger@gmx.ch> | 2006-10-15 21:47:56 +0000 |
commit | 97f47f771a405377b94b4b139450a7bd2db0c827 (patch) | |
tree | 8480e8ec408b92d9ebc637de36fb769cdcae147f /src/mesa/drivers/dri/r200 | |
parent | 4d4add0972d1c4eca3b62edb581fe65697b061ff (diff) |
fix handling of textures with a base internal format that does not have all four rgba values set for radeon and r200 (discovered with a modified glean pixelFormats test, noone ever noticed in over 2 years). For radeon, use hw format I8 as previously, and change tex env to make the correct default values appear for both GL_ALPHA and GL_LUMINANCE textures. For r200, which supports GL_LUMINANCE just fine, use the AL88 hw format for GL_ALPHA textures, since it seems like it's probably not worth the effort to fix up the texture environment (certainly complicated in case of ATI_fragment_shader programs).
Diffstat (limited to 'src/mesa/drivers/dri/r200')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_tex.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c index 2cfbf3510b..6c6450c681 100644 --- a/src/mesa/drivers/dri/r200/r200_tex.c +++ b/src/mesa/drivers/dri/r200/r200_tex.c @@ -405,7 +405,9 @@ r200ChooseTextureFormat( GLcontext *ctx, GLint internalFormat, case GL_ALPHA12: case GL_ALPHA16: case GL_COMPRESSED_ALPHA: - return _dri_texformat_a8; + /* can't use a8 format since interpreting hw I8 as a8 would result + in wrong rgb values (same as alpha value instead of 0). */ + return _dri_texformat_al88; case 1: case GL_LUMINANCE: |