From b8504534978ba7647838c29549d6698acb09a94f Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Fri, 13 Jun 2008 14:49:04 +0200 Subject: [PATCH] mesa: Remove duplicate code. --- src/mesa/state_tracker/st_format.c | 19 +------------------ 1 file changed, 1 insertion(+), 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 -- 2.30.2