projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mesa,st/mesa: implement GL_RGB565 from ARB_ES2_compatibility
[mesa.git]
/
src
/
mesa
/
main
/
teximage.c
diff --git
a/src/mesa/main/teximage.c
b/src/mesa/main/teximage.c
index b16baaf914cb3aeaeb4c0e8e33a1f33c3b08dd18..126386ebed612b1ff5d3f5fa3dc9a9dacf7a92f3 100644
(file)
--- 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: