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 <kenneth@whitecape.org>
case GL_RGB10_A2UI:
return ctx->Extensions.ARB_texture_rgb10_a2ui ? GL_RGBA : 0;
+
+ case GL_RGB565:
+ return ctx->Extensions.ARB_ES2_compatibility ? GL_RGB : 0;
default:
return 0;
}
case GL_R3_G3_B2:
case GL_RGB4:
case GL_RGB5:
+ case GL_RGB565:
case GL_RGB8:
case GL_RGB10:
case GL_RGB12:
; /* fallthrough */
}
+ if (ctx->Extensions.ARB_ES2_compatibility) {
+ switch (internalFormat) {
+ case GL_RGB565:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ break;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
if (ctx->Extensions.MESA_ycbcr_texture) {
if (internalFormat == GL_YCBCR_MESA) {
if (type == GL_UNSIGNED_SHORT_8_8_MESA)
}
}
+ 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:
case GL_UNSIGNED_SHORT_5_6_5:
case GL_UNSIGNED_SHORT_5_6_5_REV:
+ return GL_RGB565;
+
case GL_UNSIGNED_SHORT_5_5_5_1:
case GL_UNSIGNED_SHORT_1_5_5_5_REV:
return GL_RGB5_A1;
{ PIPE_FORMAT_B5G6R5_UNORM, PIPE_FORMAT_B5G5R5A1_UNORM,
DEFAULT_RGBA_FORMATS }
},
+ {
+ { GL_RGB565 },
+ { PIPE_FORMAT_B5G6R5_UNORM, DEFAULT_RGBA_FORMATS }
+ },
/* basic Alpha formats */
{