Module: Mesa
Branch: master
Commit: 59ddf8ca635465dea1d455c384f5905b65dc6979
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=59ddf8ca635465dea1d455c384f5905b65dc6979

Author: Francisco Jerez <curroje...@riseup.net>
Date:   Tue Feb 23 16:39:26 2010 +0100

dri/nouveau: Use the hardware I8 format for intensity textures.

---

 src/mesa/drivers/dri/nouveau/nouveau_texture.c |    2 +-
 src/mesa/drivers/dri/nouveau/nv04_state_tex.c  |    1 +
 src/mesa/drivers/dri/nouveau/nv10_state_tex.c  |    1 +
 src/mesa/drivers/dri/nouveau/nv20_state_tex.c  |    1 +
 4 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c 
b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index c1b0dda..0947a2a 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -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:
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c 
b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
index 684a19e..facd41c 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
@@ -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;
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c 
b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
index f45f6c9..7fe2731 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
@@ -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:
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c 
b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
index 4627799..7a5914d 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
@@ -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:

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to