Mesa (9.2): osmesa: fix broken triangle/ line drawing when using float color buffer
Carl Worth
cworth at kemper.freedesktop.org
Wed Nov 13 01:01:17 UTC 2013
Module: Mesa
Branch: 9.2
Commit: 69d5778b369f13e3ec714eec6e5d37e516dc0796
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=69d5778b369f13e3ec714eec6e5d37e516dc0796
Author: Brian Paul <brianp at vmware.com>
Date: Thu Nov 7 19:01:39 2013 -0700
osmesa: fix broken triangle/line drawing when using float color buffer
Doesn't seem to help with bug 71363 but it fixed a failure I found in
my testing.
Cc: "9.2" <mesa-stable at lists.freedesktop.org>
Cc: "10.0" <mesa-stable at lists.freedesktop.org>
(cherry picked from commit a66a008b17872f3eab91b7d04dd70e4537bdb627)
---
src/mesa/drivers/osmesa/osmesa.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 102001e..6f6f824 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -197,6 +197,14 @@ osmesa_choose_line_function( struct gl_context *ctx )
const OSMesaContext osmesa = OSMESA_CONTEXT(ctx);
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ if (ctx->DrawBuffer &&
+ ctx->DrawBuffer->Visual.redBits == 32) {
+ /* the special-case line functions in this file don't work
+ * for float color channels.
+ */
+ return NULL;
+ }
+
if (ctx->RenderMode != GL_RENDER) return NULL;
if (ctx->Line.SmoothFlag) return NULL;
if (ctx->Texture._EnabledUnits) return NULL;
@@ -298,6 +306,14 @@ osmesa_choose_triangle_function( struct gl_context *ctx )
const OSMesaContext osmesa = OSMESA_CONTEXT(ctx);
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ if (ctx->DrawBuffer &&
+ ctx->DrawBuffer->Visual.redBits == 32) {
+ /* the special-case triangle functions in this file don't work
+ * for float color channels.
+ */
+ return (swrast_tri_func) NULL;
+ }
+
if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL;
if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) NULL;
if (ctx->Polygon.StippleFlag) return (swrast_tri_func) NULL;
More information about the mesa-commit
mailing list