Mesa (master): r300g: fix potentially uninitialized variables in create_rs_state
Marek Olšák
mareko at kemper.freedesktop.org
Wed Aug 25 18:10:30 UTC 2010
Module: Mesa
Branch: master
Commit: dc27515780d5e1b3a7b3f9ab7119d3e35b22294c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dc27515780d5e1b3a7b3f9ab7119d3e35b22294c
Author: Marek Olšák <maraeo at gmail.com>
Date: Wed Aug 25 20:02:24 2010 +0200
r300g: fix potentially uninitialized variables in create_rs_state
It had no impact on correctness, though.
Reported by Vinson Lee.
---
src/gallium/drivers/r300/r300_state.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 5c225e2..2240011 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -940,9 +940,9 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
uint32_t stuffing_enable; /* R300_GB_ENABLE: 0x4008 */
/* Point sprites texture coordinates, 0: lower left, 1: upper right */
- float point_texcoord_left; /* R300_GA_POINT_S0: 0x4200 */
+ float point_texcoord_left = 0; /* R300_GA_POINT_S0: 0x4200 */
float point_texcoord_bottom = 0;/* R300_GA_POINT_T0: 0x4204 */
- float point_texcoord_right; /* R300_GA_POINT_S1: 0x4208 */
+ float point_texcoord_right = 1; /* R300_GA_POINT_S1: 0x4208 */
float point_texcoord_top = 0; /* R300_GA_POINT_T1: 0x420c */
CB_LOCALS;
@@ -1064,9 +1064,6 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
R300_GB_TEX_ST << (R300_GB_TEX0_SOURCE_SHIFT + (i*2));
}
- point_texcoord_left = 0.0f;
- point_texcoord_right = 1.0f;
-
switch (state->sprite_coord_mode) {
case PIPE_SPRITE_COORD_UPPER_LEFT:
point_texcoord_top = 0.0f;
More information about the mesa-commit
mailing list