mesa: fix typos, comment in signed 16-bit tex fetch code
authorBrian Paul <brianp@vmware.com>
Mon, 10 May 2010 00:31:05 +0000 (18:31 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 10 May 2010 03:19:42 +0000 (21:19 -0600)
src/mesa/main/texfetch_tmp.h

index 280c8d9400d504179c91586170a473f7fcdc3b6e..e51fe3a577306e4eba173c0a1fc4a5ad06ea6a09 100644 (file)
@@ -1383,7 +1383,7 @@ FETCH(signed_rgb_16)(const struct gl_texture_image *texImage,
    const GLshort *s = TEXEL_ADDR(GLshort, texImage, i, j, k, 3);
    texel[RCOMP] = SHORT_TO_FLOAT_TEX( s[0] );
    texel[GCOMP] = SHORT_TO_FLOAT_TEX( s[1] );
-   texel[BCOMP] = SHORT_TO_FLOAT_TEX( s[3] );
+   texel[BCOMP] = SHORT_TO_FLOAT_TEX( s[2] );
    texel[ACOMP] = 1.0F;
 }
 
@@ -1401,7 +1401,7 @@ store_texel_signed_rgb_16(struct gl_texture_image *texImage,
 #endif
 
 
-/* MESA_FORMAT_SIGNED_RGB_16 ***********************************************/
+/* MESA_FORMAT_SIGNED_RGBA_16 ***********************************************/
 
 static void
 FETCH(signed_rgba_16)(const struct gl_texture_image *texImage,
@@ -1410,8 +1410,8 @@ FETCH(signed_rgba_16)(const struct gl_texture_image *texImage,
    const GLshort *s = TEXEL_ADDR(GLshort, texImage, i, j, k, 4);
    texel[RCOMP] = SHORT_TO_FLOAT_TEX( s[0] );
    texel[GCOMP] = SHORT_TO_FLOAT_TEX( s[1] );
-   texel[BCOMP] = SHORT_TO_FLOAT_TEX( s[3] );
-   texel[ACOMP] = SHORT_TO_FLOAT_TEX( s[4] );
+   texel[BCOMP] = SHORT_TO_FLOAT_TEX( s[2] );
+   texel[ACOMP] = SHORT_TO_FLOAT_TEX( s[3] );
 }
 
 #if DIM == 3