Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1205)

Side by Side Diff: src/mesa/swrast/s_span.c

Issue 27740005: Fix a bug with Multiple Render Targets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/mesa/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Mesa 3-D graphics library 2 * Mesa 3-D graphics library
3 * Version: 7.5 3 * Version: 7.5
4 * 4 *
5 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. 5 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
6 * Copyright (C) 2009 VMware, Inc. All Rights Reserved. 6 * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
7 * 7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a 8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"), 9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation 10 * to deal in the Software without restriction, including without limitation
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 if (rb) { 1323 if (rb) {
1324 /* re-use one of the attribute array buffers for rgbaSave */ 1324 /* re-use one of the attribute array buffers for rgbaSave */
1325 GLchan (*rgbaSave)[4] = (GLchan (*)[4]) span->array->attribs[0]; 1325 GLchan (*rgbaSave)[4] = (GLchan (*)[4]) span->array->attribs[0];
1326 struct swrast_renderbuffer *srb = swrast_renderbuffer(rb); 1326 struct swrast_renderbuffer *srb = swrast_renderbuffer(rb);
1327 GLenum colorType = srb->ColorType; 1327 GLenum colorType = srb->ColorType;
1328 1328
1329 assert(colorType == GL_UNSIGNED_BYTE || 1329 assert(colorType == GL_UNSIGNED_BYTE ||
1330 colorType == GL_FLOAT); 1330 colorType == GL_FLOAT);
1331 1331
1332 /* set span->array->rgba to colors for renderbuffer's datatype */ 1332 /* set span->array->rgba to colors for renderbuffer's datatype */
1333 if (span->array->ChanType != colorType) { 1333 if (span->array->ChanType != colorType || multiFragOutputs) {
1334 convert_color_type(span, colorType, 0); 1334 convert_color_type(span, colorType, buf);
1335 } 1335 }
1336 else { 1336 else {
1337 if (span->array->ChanType == GL_UNSIGNED_BYTE) { 1337 if (span->array->ChanType == GL_UNSIGNED_BYTE) {
1338 span->array->rgba = span->array->rgba8; 1338 span->array->rgba = span->array->rgba8;
1339 } 1339 }
1340 else { 1340 else {
1341 span->array->rgba = (void *) 1341 span->array->rgba = (void *)
1342 span->array->attribs[FRAG_ATTRIB_COL0]; 1342 span->array->attribs[FRAG_ATTRIB_COL0];
1343 } 1343 }
1344 } 1344 }
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1581 get_values(ctx, rb, span->end, span->array->x, span->array->y, 1581 get_values(ctx, rb, span->end, span->array->x, span->array->y,
1582 rbPixels, span->array->ChanType); 1582 rbPixels, span->array->ChanType);
1583 } 1583 }
1584 else { 1584 else {
1585 get_row(ctx, rb, span->end, span->x, span->y, 1585 get_row(ctx, rb, span->end, span->x, span->y,
1586 rbPixels, span->array->ChanType); 1586 rbPixels, span->array->ChanType);
1587 } 1587 }
1588 1588
1589 return rbPixels; 1589 return rbPixels;
1590 } 1590 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698