From 114152e068ec919feb0a57a1259c2ada970b9f02 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Thu, 12 Mar 2009 15:01:16 +0100 Subject: mesa: add support for ATI_envmap_bumpmap add new entrypoints, new texture format, etc translate in texenvprogram.c for drivers using the mesa-generated tex env fragment program also handled in swrast, but not tested (cannot work due to negative texel results not handled correctly) --- src/mesa/main/texformat_tmp.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/texformat_tmp.h') diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texformat_tmp.h index 275340cabd..f9f9d5b1f8 100644 --- a/src/mesa/main/texformat_tmp.h +++ b/src/mesa/main/texformat_tmp.h @@ -1269,7 +1269,7 @@ static void FETCH(sl8)(const struct gl_texture_image *texImage, texel[RCOMP] = texel[GCOMP] = texel[BCOMP] = nonlinear_to_linear(src[0]); - texel[ACOMP] = CHAN_MAX; + texel[ACOMP] = 1.0F; } #if DIM == 3 @@ -1308,7 +1308,22 @@ static void store_texel_sla8(struct gl_texture_image *texImage, #endif /* FEATURE_EXT_texture_sRGB */ +#if DIM == 2 +/* MESA_FORMAT_DUDV8 ********************************************************/ + +/* this format by definition produces 0,0,0,1 as rgba values, + however we'll return the dudv values as rg and fix up elsewhere */ +static void FETCH(dudv8)(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel ) +{ + const GLbyte *src = TEXEL_ADDR(GLbyte, texImage, i, j, k, 2); + texel[RCOMP] = BYTE_TO_FLOAT(src[0]); + texel[GCOMP] = BYTE_TO_FLOAT(src[1]); + texel[BCOMP] = 0; + texel[ACOMP] = 0; +} +#endif /* MESA_FORMAT_YCBCR *********************************************************/ -- cgit v1.2.3