summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-06-20 11:01:09 -0600
committerBrian <[email protected]>2007-06-20 11:01:09 -0600
commitf9c17ec58a492a7657ea120fa394056a680b9ec5 (patch)
tree69d9bb83477d3bd3e939611564c87c2439e46598 /src/mesa
parentbd8eeb7ed09be698896d26c75aa60659efaa25a6 (diff)
parenta4af3e5ab3fa0f45c25673c93d802cdff087145c (diff)
Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i915/intel_pixel.c18
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_pixel_draw.c14
-rw-r--r--src/mesa/swrast/s_span.c11
-rw-r--r--src/mesa/swrast/s_zoom.c6
4 files changed, 41 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_pixel.c b/src/mesa/drivers/dri/i915/intel_pixel.c
index 535cbfcb26e..a52a81bf131 100644
--- a/src/mesa/drivers/dri/i915/intel_pixel.c
+++ b/src/mesa/drivers/dri/i915/intel_pixel.c
@@ -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 );
+ }
+ }
}
diff --git a/src/mesa/drivers/dri/i915tex/intel_pixel_draw.c b/src/mesa/drivers/dri/i915tex/intel_pixel_draw.c
index 10a079896ae..46480da1b12 100644
--- a/src/mesa/drivers/dri/i915tex/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/i915tex/intel_pixel_draw.c
@@ -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 );
+ }
}
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 90a3d5545f8..3aaa3395e4c 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -1169,10 +1169,17 @@ shade_texture_span(GLcontext *ctx, SWspan *span)
if (ctx->FragmentProgram._Current ||
ctx->ATIFragmentShader._Enabled) {
/* programmable shading */
+ if (span->primitive == GL_BITMAP) {
+ if (span->array->ChanType != GL_FLOAT)
+ convert_color_type(span, GL_FLOAT, 0);
+ interpolate_active_attribs(ctx, span, ~FRAG_ATTRIB_COL0);
+ }
+ else {
+ /* point, line, triangle */
+ interpolate_active_attribs(ctx, span, ~0);
+ }
span->array->ChanType = GL_FLOAT;
- interpolate_active_attribs(ctx, span, ~0);
-
if (!(span->arrayMask & SPAN_Z))
_swrast_span_interpolate_z (ctx, span);
diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c
index 78fa137d3fd..1ab5911f2f1 100644
--- a/src/mesa/swrast/s_zoom.c
+++ b/src/mesa/swrast/s_zoom.c
@@ -162,12 +162,14 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
zoomed_arrays.rgba = zoomed_arrays.attribs[FRAG_ATTRIB_COL0];
#endif
+ /* copy attribute info (XXX copy all attribs?) */
+ COPY_4V(zoomed.attrStart[FRAG_ATTRIB_WPOS], span->attrStart[FRAG_ATTRIB_WPOS]);
+ COPY_4V(zoomed.attrStepX[FRAG_ATTRIB_WPOS], span->attrStepX[FRAG_ATTRIB_WPOS]);
+ COPY_4V(zoomed.attrStepY[FRAG_ATTRIB_WPOS], span->attrStepY[FRAG_ATTRIB_WPOS]);
- /* copy fog interp info */
zoomed.attrStart[FRAG_ATTRIB_FOGC][0] = span->attrStart[FRAG_ATTRIB_FOGC][0];
zoomed.attrStepX[FRAG_ATTRIB_FOGC][0] = span->attrStepX[FRAG_ATTRIB_FOGC][0];
zoomed.attrStepY[FRAG_ATTRIB_FOGC][0] = span->attrStepY[FRAG_ATTRIB_FOGC][0];
- /* XXX copy texcoord info? */
if (format == GL_RGBA || format == GL_RGB) {
/* copy Z info */