diff options
author | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2010-08-18 14:37:47 +0200 |
---|---|---|
committer | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2010-08-18 14:37:47 +0200 |
commit | 3e54d63429fe7ca5db3c75c181abbaf7a7f55724 (patch) | |
tree | e129c36aaef712525f0a04fc5b06c445e3cf84df /src/mesa/swrast | |
parent | eaab76457818fad0926b84c663440e8987e1f19f (diff) | |
parent | 85d9bc236d6a8ff8f12cbc2150f8c3740354f573 (diff) |
Merge remote branch 'origin/master' into nv50-compiler
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_aaline.h | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_aatriangle.h | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_alpha.h | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_atifragshader.c | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_atifragshader.h | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_blend.h | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_context.c | 1 | ||||
-rw-r--r-- | src/mesa/swrast/s_context.h | 1 | ||||
-rw-r--r-- | src/mesa/swrast/s_depth.c | 1 | ||||
-rw-r--r-- | src/mesa/swrast/s_depth.h | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_feedback.c | 1 | ||||
-rw-r--r-- | src/mesa/swrast/s_fog.c | 1 | ||||
-rw-r--r-- | src/mesa/swrast/s_fog.h | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_fragprog.c | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_fragprog.h | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_logic.h | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_masking.h | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_points.c | 1 | ||||
-rw-r--r-- | src/mesa/swrast/s_readpix.c | 1 | ||||
-rw-r--r-- | src/mesa/swrast/s_span.c | 18 | ||||
-rw-r--r-- | src/mesa/swrast/s_stencil.h | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_texcombine.h | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_texfilter.h | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_zoom.h | 3 |
24 files changed, 46 insertions, 23 deletions
diff --git a/src/mesa/swrast/s_aaline.h b/src/mesa/swrast/s_aaline.h index f1d708ec80..922eb230e5 100644 --- a/src/mesa/swrast/s_aaline.h +++ b/src/mesa/swrast/s_aaline.h @@ -28,7 +28,7 @@ #define S_AALINE_H -#include "swrast.h" +#include "main/mtypes.h" extern void diff --git a/src/mesa/swrast/s_aatriangle.h b/src/mesa/swrast/s_aatriangle.h index 4b57fa73a2..9aed41a191 100644 --- a/src/mesa/swrast/s_aatriangle.h +++ b/src/mesa/swrast/s_aatriangle.h @@ -28,7 +28,7 @@ #define S_AATRIANGLE_H -#include "swrast.h" +#include "main/mtypes.h" extern void diff --git a/src/mesa/swrast/s_alpha.h b/src/mesa/swrast/s_alpha.h index 7a5b72e650..239484a974 100644 --- a/src/mesa/swrast/s_alpha.h +++ b/src/mesa/swrast/s_alpha.h @@ -28,7 +28,8 @@ #define S_ALPHA_H -#include "s_context.h" +#include "main/mtypes.h" +#include "s_span.h" extern GLint diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c index fa280e72e4..1338b6802d 100644 --- a/src/mesa/swrast/s_atifragshader.c +++ b/src/mesa/swrast/s_atifragshader.c @@ -21,10 +21,10 @@ #include "main/glheader.h" #include "main/colormac.h" -#include "main/context.h" #include "main/macros.h" #include "main/atifragshader.h" #include "swrast/s_atifragshader.h" +#include "swrast/s_context.h" /** diff --git a/src/mesa/swrast/s_atifragshader.h b/src/mesa/swrast/s_atifragshader.h index 871a0c0455..cce455a046 100644 --- a/src/mesa/swrast/s_atifragshader.h +++ b/src/mesa/swrast/s_atifragshader.h @@ -27,7 +27,8 @@ #define S_ATIFRAGSHADER_H -#include "s_context.h" +#include "main/mtypes.h" +#include "s_span.h" extern void diff --git a/src/mesa/swrast/s_blend.h b/src/mesa/swrast/s_blend.h index 8d5a81635d..9cedde3bf2 100644 --- a/src/mesa/swrast/s_blend.h +++ b/src/mesa/swrast/s_blend.h @@ -27,7 +27,8 @@ #define S_BLEND_H -#include "s_context.h" +#include "main/mtypes.h" +#include "s_span.h" extern void diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 6d2d17c61d..d8d8a80b7d 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -28,7 +28,6 @@ #include "main/imports.h" #include "main/bufferobj.h" -#include "main/context.h" #include "main/colormac.h" #include "main/mtypes.h" #include "main/teximage.h" diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index c9755e6da1..6d81f74768 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -43,6 +43,7 @@ #ifndef S_CONTEXT_H #define S_CONTEXT_H +#include "main/compiler.h" #include "main/mtypes.h" #include "program/prog_execute.h" #include "swrast.h" diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index ed637cac12..f952fd6baa 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -30,7 +30,6 @@ #include "main/imports.h" #include "s_depth.h" -#include "s_context.h" #include "s_span.h" diff --git a/src/mesa/swrast/s_depth.h b/src/mesa/swrast/s_depth.h index 7eae366742..878d242f5e 100644 --- a/src/mesa/swrast/s_depth.h +++ b/src/mesa/swrast/s_depth.h @@ -27,7 +27,8 @@ #define S_DEPTH_H -#include "s_context.h" +#include "main/mtypes.h" +#include "s_span.h" extern GLuint diff --git a/src/mesa/swrast/s_feedback.c b/src/mesa/swrast/s_feedback.c index 373b1416e2..6ac8ac73b0 100644 --- a/src/mesa/swrast/s_feedback.c +++ b/src/mesa/swrast/s_feedback.c @@ -24,7 +24,6 @@ #include "main/glheader.h" #include "main/colormac.h" -#include "main/context.h" #include "main/feedback.h" #include "main/macros.h" diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c index 3fc8439213..689500a613 100644 --- a/src/mesa/swrast/s_fog.c +++ b/src/mesa/swrast/s_fog.c @@ -25,7 +25,6 @@ #include "main/glheader.h" #include "main/colormac.h" -#include "main/context.h" #include "main/macros.h" #include "s_context.h" diff --git a/src/mesa/swrast/s_fog.h b/src/mesa/swrast/s_fog.h index 06107de3f9..a496746d10 100644 --- a/src/mesa/swrast/s_fog.h +++ b/src/mesa/swrast/s_fog.h @@ -28,7 +28,8 @@ #define S_FOG_H -#include "swrast.h" +#include "main/mtypes.h" +#include "s_span.h" extern GLfloat diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 413f136cd5..9facb44d9b 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -24,9 +24,9 @@ #include "main/glheader.h" #include "main/colormac.h" -#include "main/context.h" #include "program/prog_instruction.h" +#include "s_context.h" #include "s_fragprog.h" #include "s_span.h" diff --git a/src/mesa/swrast/s_fragprog.h b/src/mesa/swrast/s_fragprog.h index e1b7e67918..92b9d01e17 100644 --- a/src/mesa/swrast/s_fragprog.h +++ b/src/mesa/swrast/s_fragprog.h @@ -27,7 +27,8 @@ #define S_FRAGPROG_H -#include "s_context.h" +#include "main/mtypes.h" +#include "s_span.h" extern void diff --git a/src/mesa/swrast/s_logic.h b/src/mesa/swrast/s_logic.h index e8cfae33f2..d609513348 100644 --- a/src/mesa/swrast/s_logic.h +++ b/src/mesa/swrast/s_logic.h @@ -27,7 +27,8 @@ #define S_LOGIC_H -#include "swrast.h" +#include "main/mtypes.h" +#include "s_span.h" extern void _swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, diff --git a/src/mesa/swrast/s_masking.h b/src/mesa/swrast/s_masking.h index 3ba4f8356c..cb000da0fd 100644 --- a/src/mesa/swrast/s_masking.h +++ b/src/mesa/swrast/s_masking.h @@ -27,7 +27,8 @@ #define S_MASKING_H -#include "swrast.h" +#include "main/mtypes.h" +#include "s_span.h" extern void diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c index 1663ece829..12431662c4 100644 --- a/src/mesa/swrast/s_points.c +++ b/src/mesa/swrast/s_points.c @@ -25,7 +25,6 @@ #include "main/glheader.h" #include "main/colormac.h" -#include "main/context.h" #include "main/macros.h" #include "s_context.h" #include "s_feedback.h" diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 6ad9aceec7..553fd9a76d 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -27,7 +27,6 @@ #include "main/bufferobj.h" #include "main/colormac.h" #include "main/convolve.h" -#include "main/context.h" #include "main/feedback.h" #include "main/formats.h" #include "main/image.h" diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 687c8eb0bf..8931cdec1b 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -33,7 +33,6 @@ #include "main/glheader.h" #include "main/colormac.h" -#include "main/context.h" #include "main/macros.h" #include "main/imports.h" #include "main/image.h" @@ -971,6 +970,10 @@ shade_texture_span(GLcontext *ctx, SWspan *span) if (span->primitive == GL_BITMAP && span->array->ChanType != GL_FLOAT) { convert_color_type(span, GL_FLOAT, 0); } + else { + span->array->rgba = (void *) span->array->attribs[FRAG_ATTRIB_COL0]; + } + if (span->primitive != GL_POINT || (span->interpMask & SPAN_RGBA) || ctx->Point.PointSprite) { @@ -1222,9 +1225,22 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) GLchan rgbaSave[MAX_WIDTH][4]; const GLuint fragOutput = multiFragOutputs ? buf : 0; + /* set span->array->rgba to colors for render buffer's datatype */ if (rb->DataType != span->array->ChanType || fragOutput > 0) { convert_color_type(span, rb->DataType, fragOutput); } + else { + if (rb->DataType == GL_UNSIGNED_BYTE) { + span->array->rgba = span->array->rgba8; + } + else if (rb->DataType == GL_UNSIGNED_SHORT) { + span->array->rgba = (void *) span->array->rgba16; + } + else { + span->array->rgba = (void *) + span->array->attribs[FRAG_ATTRIB_COL0]; + } + } if (!multiFragOutputs && numBuffers > 1) { /* save colors for second, third renderbuffer writes */ diff --git a/src/mesa/swrast/s_stencil.h b/src/mesa/swrast/s_stencil.h index cd6cbc57b0..c076ebbe2a 100644 --- a/src/mesa/swrast/s_stencil.h +++ b/src/mesa/swrast/s_stencil.h @@ -27,7 +27,8 @@ #define S_STENCIL_H -#include "swrast.h" +#include "main/mtypes.h" +#include "s_span.h" diff --git a/src/mesa/swrast/s_texcombine.h b/src/mesa/swrast/s_texcombine.h index 9ed96efb87..4f5dfbe1af 100644 --- a/src/mesa/swrast/s_texcombine.h +++ b/src/mesa/swrast/s_texcombine.h @@ -27,7 +27,8 @@ #define S_TEXCOMBINE_H -#include "swrast.h" +#include "main/mtypes.h" +#include "s_span.h" extern void _swrast_texture_span( GLcontext *ctx, SWspan *span ); diff --git a/src/mesa/swrast/s_texfilter.h b/src/mesa/swrast/s_texfilter.h index 2e265d685c..eceab59658 100644 --- a/src/mesa/swrast/s_texfilter.h +++ b/src/mesa/swrast/s_texfilter.h @@ -27,7 +27,8 @@ #define S_TEXFILTER_H -#include "swrast.h" +#include "main/mtypes.h" +#include "s_context.h" extern texture_sample_func diff --git a/src/mesa/swrast/s_zoom.h b/src/mesa/swrast/s_zoom.h index 43917be65f..09f624efad 100644 --- a/src/mesa/swrast/s_zoom.h +++ b/src/mesa/swrast/s_zoom.h @@ -25,7 +25,8 @@ #ifndef S_ZOOM_H #define S_ZOOM_H -#include "swrast.h" +#include "main/mtypes.h" +#include "s_span.h" extern void |