diff options
author | Michal Krol <michal@vmware.com> | 2009-12-03 12:25:49 +0100 |
---|---|---|
committer | Michal Krol <michal@vmware.com> | 2009-12-03 12:25:49 +0100 |
commit | 72befaaae5fd9555e1f6ccbd6a74c0d640fc2929 (patch) | |
tree | 7644f87ee46ff0adf58c81e3d8082d544579cce1 /src/mesa/state_tracker | |
parent | 018f33a328a05bd7a2094103eb7bbafc8595e6b1 (diff) |
Remove pf_swizzle_* internal macros.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index c492d77530..c9f020c40f 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -81,8 +81,11 @@ GLboolean st_get_format_info(enum pipe_format format, struct pipe_format_info *pinfo) { if (pf_layout(format) == PIPE_FORMAT_LAYOUT_RGBAZS) { + const struct util_format_description *desc = util_format_description(format); pipe_format_rgbazs_t info; + assert(desc); + info = format; #if 0 @@ -133,10 +136,10 @@ st_get_format_info(enum pipe_format format, struct pipe_format_info *pinfo) pinfo->size = format_size( info ) / 8; /* Luminance & Intensity bits */ - if( pf_swizzle_x(info) == PIPE_FORMAT_COMP_R && - pf_swizzle_y(info) == PIPE_FORMAT_COMP_R && - pf_swizzle_z(info) == PIPE_FORMAT_COMP_R ) { - if( pf_swizzle_w(info) == PIPE_FORMAT_COMP_R ) { + if (desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_X && + desc->swizzle[1] == UTIL_FORMAT_SWIZZLE_X && + desc->swizzle[2] == UTIL_FORMAT_SWIZZLE_X) { + if (desc->swizzle[3] == UTIL_FORMAT_SWIZZLE_X) { pinfo->intensity_bits = pinfo->red_bits; } else { |