diff options
author | Dave Airlie <[email protected]> | 2011-02-22 10:35:15 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-02-28 13:35:34 +1000 |
commit | 8d47c919859e9cd90cfc04eb220ac8a5aa87048e (patch) | |
tree | 4f7a1e4148d8268f32f2d0ca63becf50da56181a /src/mesa/main/texcompress_rgtc.h | |
parent | e792e79f5ae6be008d9521eccf1c647492cd682a (diff) |
mesa: Add RGTC texture store/fetch support.
This adds support for the RGTC unsigned and signed
texture storage and fetch methods.
the code is a port of the DXT5 alpha compression code.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main/texcompress_rgtc.h')
-rw-r--r-- | src/mesa/main/texcompress_rgtc.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/mesa/main/texcompress_rgtc.h b/src/mesa/main/texcompress_rgtc.h new file mode 100644 index 00000000000..424edc4581c --- /dev/null +++ b/src/mesa/main/texcompress_rgtc.h @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2011 Red Hat Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifndef TEXCOMPRESS_RGTC_H +#define TEXCOMPRESS_RGTC_H + +#include "glheader.h" +#include "mfeatures.h" +#include "texstore.h" + +struct gl_texture_image; + +extern GLboolean +_mesa_texstore_red_rgtc1(TEXSTORE_PARAMS); + +extern GLboolean +_mesa_texstore_signed_red_rgtc1(TEXSTORE_PARAMS); + +extern GLboolean +_mesa_texstore_rg_rgtc2(TEXSTORE_PARAMS); + +extern GLboolean +_mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS); + +extern void +_mesa_fetch_texel_2d_f_red_rgtc1(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel); + +extern void +_mesa_fetch_texel_2d_f_signed_red_rgtc1(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel); + +extern void +_mesa_fetch_texel_2d_f_rg_rgtc2(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel); + +extern void +_mesa_fetch_texel_2d_f_signed_rg_rgtc2(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel); +#endif |