diff options
author | Roland Scheidegger <[email protected]> | 2007-07-16 18:09:30 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2007-07-16 18:23:46 +0200 |
commit | fb3b9060d48934ca4faa72e966c00aee627ce96d (patch) | |
tree | 0d0cf79a0a7f552dfddfba49811e8100286be1cf /src/mesa/drivers/dri/i915 | |
parent | d895c5a08f18c8b550631f7c735c2dafaf8ec785 (diff) |
fix segfault with i915 drivers in swrast drawpixels path when resizing windows
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_pixel.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_pixel.c b/src/mesa/drivers/dri/i915/intel_pixel.c index d175870a0c5..c3030d42b04 100644 --- a/src/mesa/drivers/dri/i915/intel_pixel.c +++ b/src/mesa/drivers/dri/i915/intel_pixel.c @@ -450,10 +450,16 @@ intelDrawPixels( GLcontext *ctx, * wise happily run the fragment program on each pixel in the image). */ struct gl_fragment_program *fpSave = ctx->FragmentProgram._Current; + /* can't just set current frag prog to 0 here as on buffer resize + we'll get new state checks which will segfault. Remains a hack. */ ctx->FragmentProgram._Current = NULL; + ctx->FragmentProgram._UseTexEnvProgram = GL_FALSE; + ctx->FragmentProgram._Active = GL_FALSE; _swrast_DrawPixels( ctx, x, y, width, height, format, type, unpack, pixels ); ctx->FragmentProgram._Current = fpSave; + ctx->FragmentProgram._UseTexEnvProgram = GL_TRUE; + ctx->FragmentProgram._Active = GL_TRUE; } else { _swrast_DrawPixels( ctx, x, y, width, height, format, type, |