mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-28 05:20:23 +01:00
Effectively disable _TexEnvProgram before calling _swrast_DrawPixels().
It's OK to use _TexEnvProgram regardless of the texture state, but if fog is also enabled, the fragment program is lacking the actual fog computation so fogging doesn't appear. Fixing this might involve a new _MaintainFogProgram field and related code. For now, just disable the _TexEnvProgram and let swrast handle everything.
This commit is contained in:
parent
b9080dd549
commit
a4af3e5ab3
2 changed files with 28 additions and 4 deletions
|
|
@ -440,9 +440,21 @@ intelDrawPixels( GLcontext *ctx,
|
|||
fprintf(stderr, "%s\n", __FUNCTION__);
|
||||
|
||||
if (!intelTryDrawPixels( ctx, x, y, width, height, format, type,
|
||||
unpack, pixels ))
|
||||
_swrast_DrawPixels( ctx, x, y, width, height, format, type,
|
||||
unpack, pixels );
|
||||
unpack, pixels )) {
|
||||
if (ctx->FragmentProgram._Current ==
|
||||
ctx->FragmentProgram._TexEnvProgram) {
|
||||
/* don't want the i915 texenv program to be applied to DrawPixels */
|
||||
struct gl_fragment_program *fpSave = ctx->FragmentProgram._Current;
|
||||
ctx->FragmentProgram._Current = NULL;
|
||||
_swrast_DrawPixels( ctx, x, y, width, height, format, type,
|
||||
unpack, pixels );
|
||||
ctx->FragmentProgram._Current = fpSave;
|
||||
}
|
||||
else {
|
||||
_swrast_DrawPixels( ctx, x, y, width, height, format, type,
|
||||
unpack, pixels );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -363,5 +363,17 @@ intelDrawPixels(GLcontext * ctx,
|
|||
if (INTEL_DEBUG & DEBUG_PIXEL)
|
||||
_mesa_printf("%s: fallback to swrast\n", __FUNCTION__);
|
||||
|
||||
_swrast_DrawPixels(ctx, x, y, width, height, format, type, unpack, pixels);
|
||||
if (ctx->FragmentProgram._Current ==
|
||||
ctx->FragmentProgram._TexEnvProgram) {
|
||||
/* don't want the i915 texenv program to be applied to DrawPixels */
|
||||
struct gl_fragment_program *fpSave = ctx->FragmentProgram._Current;
|
||||
ctx->FragmentProgram._Current = NULL;
|
||||
_swrast_DrawPixels( ctx, x, y, width, height, format, type,
|
||||
unpack, pixels );
|
||||
ctx->FragmentProgram._Current = fpSave;
|
||||
}
|
||||
else {
|
||||
_swrast_DrawPixels( ctx, x, y, width, height, format, type,
|
||||
unpack, pixels );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue