2013-07-15 15:37:01 +02:00
|
|
|
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))
|
2012-05-30 22:23:12 +02:00
|
|
|
internalFormat = GL_RGBA;
|
2013-07-15 15:37:01 +02:00
|
|
|
+ else if (util_format_get_component_bits(pipe_format,
|
2012-05-30 22:23:12 +02:00
|
|
|
+ UTIL_FORMAT_COLORSPACE_RGB, 0) == 5)
|
|
|
|
+ internalFormat = GL_RGB5;
|
|
|
|
else
|
|
|
|
internalFormat = GL_RGB;
|