summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-11-06 13:53:32 -0700
committerBrian <brian.paul@tungstengraphics.com>2007-11-06 13:53:32 -0700
commitda3994988b95d145a98cd9130d719b36c0940406 (patch)
tree9248ffa02281c8a4372ca23c9a95796bf35b42f0 /src/mesa/state_tracker
parentfa44b74f4ec1a51fcbe656c5da94b0635defa992 (diff)
init luminance/intensity_bits to zero in st_get_format_info()
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_format.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index e9839e2936..ddba650941 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -153,6 +153,8 @@ st_get_format_info(
pinfo->alpha_bits = format_bits( info, PIPE_FORMAT_COMP_A );
pinfo->depth_bits = format_bits( info, PIPE_FORMAT_COMP_Z );
pinfo->stencil_bits = format_bits( info, PIPE_FORMAT_COMP_S );
+ pinfo->luminance_bits = 0;
+ pinfo->intensity_bits = 0;
/* Format size */
pinfo->size = format_size( info ) / 8;
@@ -162,12 +164,10 @@ st_get_format_info(
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 ) {
- pinfo->luminance_bits = 0;
pinfo->intensity_bits = pinfo->red_bits;
}
else {
pinfo->luminance_bits = pinfo->red_bits;
- pinfo->intensity_bits = 0;
}
pinfo->red_bits = 0;
}