r300g: silence some warnings about uninitialized variables
authorBrian Paul <brianp@vmware.com>
Tue, 9 Aug 2011 15:00:29 +0000 (09:00 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 9 Aug 2011 15:04:10 +0000 (09:04 -0600)
src/gallium/drivers/r300/compiler/radeon_program_alu.c
src/gallium/drivers/r300/compiler/radeon_program_tex.c
src/gallium/drivers/r300/r300_blit.c

index 9fc991166a3aa712bb1f063729c52613174ed37e..e273bc40c264c3eda7de2b32da9d344363f1ba5d 100644 (file)
@@ -87,7 +87,7 @@ static struct rc_instruction *emit3(
 
 static struct rc_dst_register dstregtmpmask(int index, int mask)
 {
-       struct rc_dst_register dst = {0};
+       struct rc_dst_register dst = {0, 0, 0};
        dst.File = RC_FILE_TEMPORARY;
        dst.Index = index;
        dst.WriteMask = mask;
index 8d16b2cf9ecc92d5c69aaf7d10601db30a6446d8..9d69ebd18fbe1b79b1e93dc3465b9a3dadb03d6f 100644 (file)
@@ -35,7 +35,7 @@
 static struct rc_src_register shadow_fail_value(struct r300_fragment_program_compiler *compiler,
                                                int tmu)
 {
-       struct rc_src_register reg = { 0, };
+       struct rc_src_register reg = { 0, 0, 0, 0, 0, 0 };
 
        if (compiler->enable_shadow_ambient) {
                reg.File = RC_FILE_CONSTANT;
@@ -55,7 +55,7 @@ static struct rc_src_register shadow_fail_value(struct r300_fragment_program_com
 static struct rc_src_register shadow_pass_value(struct r300_fragment_program_compiler *compiler,
                                                int tmu)
 {
-       struct rc_src_register reg = { 0, };
+       struct rc_src_register reg = { 0, 0, 0, 0, 0, 0 };
 
        reg.File = RC_FILE_NONE;
        reg.Swizzle = combine_swizzles(RC_SWIZZLE_1111,
index db97e496e1928b30e118a3cf776bd3974aeb240a..e7a926829d137688769bd60c69730f9f0b965787 100644 (file)
@@ -409,10 +409,11 @@ void r300_decompress_zmask(struct r300_context *r300)
 
 void r300_decompress_zmask_locked_unsafe(struct r300_context *r300)
 {
-    struct pipe_framebuffer_state fb = {0};
+    struct pipe_framebuffer_state fb;
+
+    memset(&fb, 0, sizeof(fb));
     fb.width = r300->locked_zbuffer->width;
     fb.height = r300->locked_zbuffer->height;
-    fb.nr_cbufs = 0;
     fb.zsbuf = r300->locked_zbuffer;
 
     r300->context.set_framebuffer_state(&r300->context, &fb);
@@ -421,8 +422,9 @@ void r300_decompress_zmask_locked_unsafe(struct r300_context *r300)
 
 void r300_decompress_zmask_locked(struct r300_context *r300)
 {
-    struct pipe_framebuffer_state saved_fb = {0};
+    struct pipe_framebuffer_state saved_fb;
 
+    memset(&saved_fb, 0, sizeof(saved_fb));
     util_copy_framebuffer_state(&saved_fb, r300->fb_state.state);
     r300_decompress_zmask_locked_unsafe(r300);
     r300->context.set_framebuffer_state(&r300->context, &saved_fb);