r300_blit: initialise whole fp structure to 0
authorDave Airlie <airlied@redhat.com>
Thu, 4 Mar 2010 05:08:26 +0000 (15:08 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 4 Mar 2010 05:11:42 +0000 (15:11 +1000)
at least on the r500 we get a lockup unless I do this, the compiler
seems to fail to compile and we just get a null fp.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/drivers/dri/r300/r300_blit.c

index 9637a9b7ad9244466f84ad78d0df67c502aa6d70..f3e4346e02fac9374cb57103847e417f4da61f1c 100644 (file)
@@ -97,6 +97,7 @@ static void create_fragment_program(struct r300_context *r300)
     struct r300_fragment_program_compiler compiler;
     struct rc_instruction *inst;
 
+    memset(&compiler, 0, sizeof(struct r300_fragment_program_compiler));
     rc_init(&compiler.Base);
 
     inst = rc_insert_new_instruction(&compiler.Base, compiler.Base.Program.Instructions.Prev);