dri/nouveau: Use the hardware I8 format for intensity textures.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 23 Feb 2010 15:39:26 +0000 (16:39 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Thu, 25 Feb 2010 17:37:39 +0000 (18:37 +0100)
src/mesa/drivers/dri/nouveau/nouveau_texture.c
src/mesa/drivers/dri/nouveau/nv04_state_tex.c
src/mesa/drivers/dri/nouveau/nv10_state_tex.c
src/mesa/drivers/dri/nouveau/nv20_state_tex.c

index c1b0ddae7b3e04bdedc6f5264e9bf2e7025ded9e..0947a2a95b853e7b904111bb4171cd777fed5aa4 100644 (file)
@@ -157,7 +157,7 @@ nouveau_choose_tex_format(GLcontext *ctx, GLint internalFormat,
        case GL_INTENSITY12:
        case GL_INTENSITY16:
        case GL_INTENSITY8:
-               return MESA_FORMAT_ARGB8888;
+               return MESA_FORMAT_I8;
 
        case GL_COLOR_INDEX:
        case GL_COLOR_INDEX1_EXT:
index 684a19e703f580b672301cb2ad60265b2abd9cde..facd41cff638c58a22c813f8cd0ecd3567161623 100644 (file)
@@ -38,6 +38,7 @@ get_tex_format(struct gl_texture_image *ti)
        switch (ti->TexFormat) {
        case MESA_FORMAT_A8:
        case MESA_FORMAT_L8:
+       case MESA_FORMAT_I8:
                return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_Y8;
        case MESA_FORMAT_ARGB1555:
                return NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A1R5G5B5;
index f45f6c949ee384bb6a13f4340a476f6f7091663c..7fe27317b232222e58fa812ef292ea058134c127 100644 (file)
@@ -54,6 +54,7 @@ get_tex_format_pot(struct gl_texture_image *ti)
                return NV10TCL_TX_FORMAT_FORMAT_R5G6B5;
 
        case MESA_FORMAT_A8:
+       case MESA_FORMAT_I8:
                return NV10TCL_TX_FORMAT_FORMAT_A8;
 
        case MESA_FORMAT_L8:
index 4627799809b2bc698ce4ae3196fc49161e37e37c..7a5914d9b7fe5eda207ccc42222dbfa2c86337f8 100644 (file)
@@ -49,6 +49,7 @@ get_tex_format_pot(struct gl_texture_image *ti)
                return NV20TCL_TX_FORMAT_FORMAT_R5G6B5;
 
        case MESA_FORMAT_A8:
+       case MESA_FORMAT_I8:
                return NV20TCL_TX_FORMAT_FORMAT_A8;
 
        case MESA_FORMAT_L8: