diff options
author | Michal Krol <[email protected]> | 2008-06-13 14:49:04 +0200 |
---|---|---|
committer | Michal Krol <[email protected]> | 2008-06-13 14:49:04 +0200 |
commit | b8504534978ba7647838c29549d6698acb09a94f (patch) | |
tree | 9ad957e819ae0b82f59dc32c7448a48f89677169 | |
parent | de35bf5bdca83f05dc919bf175588ce749009dfc (diff) |
mesa: Remove duplicate code.
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 5759f393af0..03ec558a367 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -49,24 +49,7 @@ format_bits( pipe_format_rgbazs_t info, GLuint comp ) { - GLuint size; - - if (pf_swizzle_x(info) == comp) { - size = pf_size_x(info); - } - else if (pf_swizzle_y(info) == comp) { - size = pf_size_y(info); - } - else if (pf_swizzle_z(info) == comp) { - size = pf_size_z(info); - } - else if (pf_swizzle_w(info) == comp) { - size = pf_size_w(info); - } - else { - size = 0; - } - return size << (pf_exp8(info) * 3); + return pf_get_component_bits( (enum pipe_format) info, comp ); } static GLuint |