diff options
author | Marek Olšák <[email protected]> | 2012-07-12 14:07:41 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-07-13 01:36:07 +0200 |
commit | 1a06e8454ec714e950bc88882cd985534a18bf1f (patch) | |
tree | 7e1e08477f19f38fd2fd6f6e2951cba4b100dcad /src/mesa/main/teximage.c | |
parent | fe911c1d433c6fddc8f1e1226286b26d635d6ad4 (diff) |
mesa,st/mesa: implement GL_RGB565 from ARB_ES2_compatibility
This was not implemented, because the spec was changed just recently.
Everything has been in place already.
Gallium has PIPE_FORMAT_B5G6R5_UNORM, while Mesa has MESA_FORMAT_RGB565.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index b16baaf914c..126386ebed6 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -138,6 +138,15 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) } } + if (ctx->Extensions.ARB_ES2_compatibility) { + switch (internalFormat) { + case GL_RGB565: + return GL_RGB; + default: + ; /* fallthrough */ + } + } + if (ctx->Extensions.ARB_depth_texture) { switch (internalFormat) { case GL_DEPTH_COMPONENT: |