diff options
author | Eric Anholt <eric@anholt.net> | 2008-01-15 15:08:34 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-04-01 16:27:48 -0700 |
commit | 7f2c4f96f502e5969fd251ad50a113c3a566686d (patch) | |
tree | 1080a798d2de4d1c8cd8d00d0200aa24d85ed651 | |
parent | 667f0f60fc4f3f043449bbf98769d478d90f7b4e (diff) |
Bug #13492: Only call ProgramStringNotify if program parsing succeeded.
Wine intentionally tries some out-of-spec programs to test strictness, and
calling ProgramStringNotify on the results of a failed program parse resulted
in crashes in the 965 driver.
(cherry picked from commit 185320ae13163995ea61e38104ab5aeaeb28d8e5)
-rw-r--r-- | src/mesa/shader/arbprogram.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index 4b5f63ef92..ee75be315e 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -229,7 +229,7 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len, struct gl_vertex_program *prog = ctx->VertexProgram.Current; _mesa_parse_arb_vertex_program(ctx, target, string, len, prog); - if (ctx->Driver.ProgramStringNotify) + if (ctx->Program.ErrorPos == -1 && ctx->Driver.ProgramStringNotify) ctx->Driver.ProgramStringNotify( ctx, target, &prog->Base ); } else if (target == GL_FRAGMENT_PROGRAM_ARB @@ -237,7 +237,7 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len, struct gl_fragment_program *prog = ctx->FragmentProgram.Current; _mesa_parse_arb_fragment_program(ctx, target, string, len, prog); - if (ctx->Driver.ProgramStringNotify) + if (ctx->Program.ErrorPos == -1 && ctx->Driver.ProgramStringNotify) ctx->Driver.ProgramStringNotify( ctx, target, &prog->Base ); } else { |