diff options
author | Michal Krol <michal@vmware.com> | 2009-12-08 20:48:47 +0100 |
---|---|---|
committer | Michal Krol <michal@vmware.com> | 2009-12-08 20:48:47 +0100 |
commit | eb926ddf9eee1095c7fc12013f0b8375bbaeca6f (patch) | |
tree | 304702202339b784ac2fa721538b26979c4ea912 /src/mesa | |
parent | 876a785a182d7987786377ff0a44ee40628254f3 (diff) |
Simplify the redundant meaning of format layout.
We really just need to know whether the format is compressed or not.
For more detailed information format colorspace should suffice.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 329ae03db2..2056dce7fb 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -83,8 +83,7 @@ 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_ARITH || - desc->layout == UTIL_FORMAT_LAYOUT_ARRAY) { + if (desc->layout == UTIL_FORMAT_LAYOUT_PLAIN) { #if 0 printf("%s\n", pf_name( format ) ); #endif @@ -147,7 +146,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->layout == UTIL_FORMAT_LAYOUT_YUV) { + else if (desc->colorspace == UTIL_FORMAT_COLORSPACE_YUV) { pinfo->mesa_format = MESA_FORMAT_YCBCR; pinfo->datatype = GL_UNSIGNED_SHORT; pinfo->size = 2; /* two bytes per "texel" */ |