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/texformat.c | |
parent | 19648fcf015e512283e93ab9de4a3e969d577e59 (diff) |
mesa: add R/RG floating-point formats
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r-- | src/mesa/main/texformat.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c index da907455b86..97b905fd36c 100644 --- a/src/mesa/main/texformat.c +++ b/src/mesa/main/texformat.c @@ -628,6 +628,22 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat, } } + if (ctx->Extensions.ARB_texture_rg && ctx->Extensions.ARB_texture_float) { + switch (internalFormat) { + case GL_R16F: + return MESA_FORMAT_R_FLOAT16; + case GL_R32F: + return MESA_FORMAT_R_FLOAT32; + case GL_RG16F: + return MESA_FORMAT_RG_FLOAT16; + case GL_RG32F: + return MESA_FORMAT_RG_FLOAT32; + + default: + ; /* fallthrough */ + } + } + if (ctx->Extensions.EXT_texture_format_BGRA8888) { switch (internalFormat) { case GL_BGRA: |