diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 9c2b4d2..660ab16 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -512,6 +512,9 @@ st_context_teximage(struct st_context_iface *stctxi, if (util_format_has_alpha(tex->format)) internalFormat = GL_RGBA; + else if (util_format_get_component_bits(pipe_format, + UTIL_FORMAT_COLORSPACE_RGB, 0) == 5) + internalFormat = GL_RGB5; else internalFormat = GL_RGB;