summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_context.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-02-03 08:17:24 -0700
committerBrian Paul <[email protected]>2012-02-12 11:22:31 -0700
commitbd1ae51b13535bc4438c663ffe91ded49db4890a (patch)
treebe0bb5f3d6060b44823e009fdf829827dea923d3 /src/mesa/swrast/s_context.h
parentb72d5767e3092016e0c2cfacaf38bb09d570955d (diff)
swrast: fix span color type selection
Fixes a regression from commit 660ed923ded3552e023ef8c3dd9f92e6792f1bd2. The basic idea is to look at the format of the dest renderbuffer and choose either GLubyte or GLfloat for colors. The previous code used _mesa_format_to_type_and_comps() which could return a bunch types other than ubyte/float. Determine the datatype at renderbuffer mapping time to avoid frequent calls to the format query functions. NOTE: This is a candidate for the 8.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45578 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45577
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r--src/mesa/swrast/s_context.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 363bdf03ad5..9388c356928 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -176,6 +176,9 @@ struct swrast_renderbuffer
/** These fields are only valid while buffer is mapped for rendering */
GLubyte *Map;
GLint RowStride; /**< in bytes */
+
+ /** For span rendering */
+ GLenum ColorType;
};