aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_span.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-02-13 08:50:32 +0100
committermarha <marha@users.sourceforge.net>2012-02-13 08:50:32 +0100
commit179ebdfaf7fe0a0017054c052b76210eeff084a9 (patch)
tree5daa6e5583ced6a6b12b03e12c16ef2acedb5b5c /mesalib/src/mesa/swrast/s_span.c
parent535951cba015f2a2b63292e0ca983d0d6e736b71 (diff)
parenteaa70945cb3f1a432b8c505ecede9ebc7769f36d (diff)
downloadvcxsrv-179ebdfaf7fe0a0017054c052b76210eeff084a9.tar.gz
vcxsrv-179ebdfaf7fe0a0017054c052b76210eeff084a9.tar.bz2
vcxsrv-179ebdfaf7fe0a0017054c052b76210eeff084a9.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/swrast/s_span.c')
-rw-r--r--mesalib/src/mesa/swrast/s_span.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mesalib/src/mesa/swrast/s_span.c b/mesalib/src/mesa/swrast/s_span.c
index 422d86c00..025e7b207 100644
--- a/mesalib/src/mesa/swrast/s_span.c
+++ b/mesalib/src/mesa/swrast/s_span.c
@@ -1320,15 +1320,15 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
if (rb) {
GLchan rgbaSave[MAX_WIDTH][4];
+ struct swrast_renderbuffer *srb = swrast_renderbuffer(rb);
+ GLenum colorType = srb->ColorType;
- GLenum datatype;
- GLuint comps;
+ assert(colorType == GL_UNSIGNED_BYTE ||
+ colorType == GL_FLOAT);
- _mesa_format_to_type_and_comps(rb->Format, &datatype, &comps);
-
- /* set span->array->rgba to colors for render buffer's datatype */
- if (datatype != span->array->ChanType) {
- convert_color_type(span, datatype, 0);
+ /* set span->array->rgba to colors for renderbuffer's datatype */
+ if (span->array->ChanType != colorType) {
+ convert_color_type(span, colorType, 0);
}
else {
if (span->array->ChanType == GL_UNSIGNED_BYTE) {