i965 passed piglit, but swrast and gallium both segfaulted without this.
i965 happened to work because it never ran _mesa_load_state_parameters()
on the new program before the test called glProgramLocalParameter(), which
was allocating a LocalParams array for the fallback path.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71734
---
 src/mesa/program/arbprogparse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c
index 5b96650..5d92176 100644
--- a/src/mesa/program/arbprogparse.c
+++ b/src/mesa/program/arbprogparse.c
@@ -127,6 +127,7 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, 
GLenum target,
    if (program->Base.Parameters)
       _mesa_free_parameter_list(program->Base.Parameters);
    program->Base.Parameters    = prog.Parameters;
+   program->Base.LocalParams = prog.LocalParams;
 
    /* Append fog instructions now if the program has "OPTION ARB_fog_exp"
     * or similar.  We used to leave this up to drivers, but it appears
-- 
1.8.4.rc3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to