summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_format.c
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-12-09 14:22:30 +0100
committerMichal Krol <michal@vmware.com>2009-12-09 14:22:30 +0100
commitdfdf83d714c0d32d9182eb3001cf642aa6cb5c87 (patch)
treea657acb85a10fec64333c7850935de21b3fc696c /src/mesa/state_tracker/st_format.c
parenteb926ddf9eee1095c7fc12013f0b8375bbaeca6f (diff)
Revert "Simplify the redundant meaning of format layout."
This reverts commit eb926ddf9eee1095c7fc12013f0b8375bbaeca6f.
Diffstat (limited to 'src/mesa/state_tracker/st_format.c')
-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 2056dce7fb..329ae03db2 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" */