diff options
author | Marek Olšák <[email protected]> | 2011-02-16 00:35:44 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-04-15 05:08:00 +0200 |
commit | 0ecbb0ab7472fe5cb33be13a8307e16f875254e5 (patch) | |
tree | e35af57de56311c360bbb76f4b0243f3f64ca621 /src/mesa/main/texstore.c | |
parent | 19648fcf015e512283e93ab9de4a3e969d577e59 (diff) |
mesa: add R/RG floating-point formats
Diffstat (limited to 'src/mesa/main/texstore.c')
-rw-r--r-- | src/mesa/main/texstore.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 87cb327d2c1..9a690529a83 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -3535,13 +3535,17 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS) dstFormat == MESA_FORMAT_ALPHA_FLOAT32 || dstFormat == MESA_FORMAT_LUMINANCE_FLOAT32 || dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32 || - dstFormat == MESA_FORMAT_INTENSITY_FLOAT32); + dstFormat == MESA_FORMAT_INTENSITY_FLOAT32 || + dstFormat == MESA_FORMAT_R_FLOAT32 || + dstFormat == MESA_FORMAT_RG_FLOAT32); ASSERT(baseInternalFormat == GL_RGBA || baseInternalFormat == GL_RGB || baseInternalFormat == GL_ALPHA || baseInternalFormat == GL_LUMINANCE || baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_INTENSITY); + baseInternalFormat == GL_INTENSITY || + baseInternalFormat == GL_RED || + baseInternalFormat == GL_RG); ASSERT(texelBytes == components * sizeof(GLfloat)); if (!ctx->_ImageTransferState && @@ -3605,13 +3609,17 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS) dstFormat == MESA_FORMAT_ALPHA_FLOAT16 || dstFormat == MESA_FORMAT_LUMINANCE_FLOAT16 || dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16 || - dstFormat == MESA_FORMAT_INTENSITY_FLOAT16); + dstFormat == MESA_FORMAT_INTENSITY_FLOAT16 || + dstFormat == MESA_FORMAT_R_FLOAT16 || + dstFormat == MESA_FORMAT_RG_FLOAT16); ASSERT(baseInternalFormat == GL_RGBA || baseInternalFormat == GL_RGB || baseInternalFormat == GL_ALPHA || baseInternalFormat == GL_LUMINANCE || baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_INTENSITY); + baseInternalFormat == GL_INTENSITY || + baseInternalFormat == GL_RED || + baseInternalFormat == GL_RG); ASSERT(texelBytes == components * sizeof(GLhalfARB)); if (!ctx->_ImageTransferState && @@ -4252,6 +4260,10 @@ texstore_funcs[MESA_FORMAT_COUNT] = { MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, _mesa_texstore_rgba_float16 }, { MESA_FORMAT_INTENSITY_FLOAT32, _mesa_texstore_rgba_float32 }, { MESA_FORMAT_INTENSITY_FLOAT16, _mesa_texstore_rgba_float16 }, + { MESA_FORMAT_R_FLOAT32, _mesa_texstore_rgba_float32 }, + { MESA_FORMAT_R_FLOAT16, _mesa_texstore_rgba_float16 }, + { MESA_FORMAT_RG_FLOAT32, _mesa_texstore_rgba_float32 }, + { MESA_FORMAT_RG_FLOAT16, _mesa_texstore_rgba_float16 }, { MESA_FORMAT_RGBA_INT8, _mesa_texstore_rgba_int8 }, { MESA_FORMAT_RGBA_INT16, _mesa_texstore_rgba_int16 }, |