diff options
author | Marek Olšák <[email protected]> | 2011-06-20 03:07:16 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-07-10 21:41:16 +0200 |
commit | 4843c7b24af7408329d33ab16bb946b17244a5f8 (patch) | |
tree | 76677de4a399d0c3a74e03a6644774570fc63a6f /src/mesa/main/texfetch_tmp.h | |
parent | 1165280cbd37dee1e499358633478ab869de21df (diff) |
mesa: implement texfetch functions for depth_buffer_float
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/texfetch_tmp.h')
-rw-r--r-- | src/mesa/main/texfetch_tmp.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mesa/main/texfetch_tmp.h b/src/mesa/main/texfetch_tmp.h index e6fd81d4d57..3b1eedf39bf 100644 --- a/src/mesa/main/texfetch_tmp.h +++ b/src/mesa/main/texfetch_tmp.h @@ -2374,6 +2374,29 @@ static void store_texel_r11_g11_b10f(struct gl_texture_image *texImage, #endif +/* MESA_FORMAT_Z32_FLOAT_X24S8 ***********************************************/ + +static void FETCH(z32f_x24s8)(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel) +{ + const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 2); + texel[RCOMP] = src[0]; + texel[GCOMP] = 0.0F; + texel[BCOMP] = 0.0F; + texel[ACOMP] = 1.0F; +} + +#if DIM == 3 +static void store_texel_z32f_x24s8(struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, const void *texel) +{ + const GLfloat *src = (const GLfloat *) texel; + GLfloat *dst = TEXEL_ADDR(GLfloat, texImage, i, j, k, 2); + dst[0] = src[0]; +} +#endif + + #undef TEXEL_ADDR #undef DIM #undef FETCH |