[Mesa-dev] [PATCH] mesa: Fix setup of LocalParams array.
Eric Anholt
eric at anholt.net
Mon Nov 18 10:07:58 PST 2013
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
More information about the mesa-dev
mailing list