OSDN Git Service

i915: reset swrast state after calling swrast DrawPixels.
authorXiang, Haihao <haihao.xiang@intel.com>
Thu, 27 Dec 2007 02:43:43 +0000 (10:43 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Thu, 27 Dec 2007 02:43:43 +0000 (10:43 +0800)
In order to optimize DrawPixels, the i915 texenv program isn't
applied to swrast DrawPixels in the i915 driver. This causes this
program isn't applied to any following swrast functions. Resetting
the swrast state fixes this issue.  Fix #13614

src/mesa/drivers/dri/intel/intel_pixel_draw.c

index 566f884..d7561e7 100644 (file)
@@ -378,6 +378,7 @@ intelDrawPixels(GLcontext * ctx,
       ctx->FragmentProgram._Current = fpSave;
       ctx->FragmentProgram._UseTexEnvProgram = GL_TRUE;
       ctx->FragmentProgram._Active = GL_TRUE;
+      _swrast_InvalidateState(ctx, _NEW_PROGRAM);
    }
    else {
       _swrast_DrawPixels( ctx, x, y, width, height, format, type,