summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_format.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 2056dce7fb1..329ae03db20 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -83,7 +83,8 @@ st_get_format_info(enum pipe_format format, struct pipe_format_info *pinfo)
desc = util_format_description(format);
assert(desc);
- if (desc->layout == UTIL_FORMAT_LAYOUT_PLAIN) {
+ if (desc->layout == UTIL_FORMAT_LAYOUT_ARITH ||
+ desc->layout == UTIL_FORMAT_LAYOUT_ARRAY) {
#if 0
printf("%s\n", pf_name( format ) );
#endif
@@ -146,7 +147,7 @@ st_get_format_info(enum pipe_format format, struct pipe_format_info *pinfo)
pinfo->mesa_format = st_pipe_format_to_mesa_format(format);
}
- else if (desc->colorspace == UTIL_FORMAT_COLORSPACE_YUV) {
+ else if (desc->layout == UTIL_FORMAT_LAYOUT_YUV) {
pinfo->mesa_format = MESA_FORMAT_YCBCR;
pinfo->datatype = GL_UNSIGNED_SHORT;
pinfo->size = 2; /* two bytes per "texel" */