Mesa (master): meta: Don' t ask for floating point textures if not ARB_texture_float.

Eric Anholt anholt at kemper.freedesktop.org
Fri Apr 29 12:31:35 PDT 2011


Module: Mesa
Branch: master
Commit: 8c1637a4c233fd02a57dee1e38ac87012a04c4c5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8c1637a4c233fd02a57dee1e38ac87012a04c4c5

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Apr 26 12:56:37 2011 -0700

meta: Don't ask for floating point textures if not ARB_texture_float.

I was promoting to float for ARB_color_buffer_float unclamped, which
failed when ARB_texture_float wasn't present.  Since the metaops don't
need results outside of [0,1] when not drawing to a floating point
destination, they can just use a fixed point texture when floating
point destinations are impossible.

Fixes regression in fdo23670-depth_test when --enable-texture-float is
not present.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36473

---

 src/mesa/drivers/common/meta.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index a396479..08b6024 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -1871,7 +1871,8 @@ _mesa_meta_DrawPixels(struct gl_context *ctx,
        * just going for the matching set of channels, in floating
        * point.
        */
-      if (ctx->Color.ClampFragmentColor != GL_TRUE)
+      if (ctx->Color.ClampFragmentColor != GL_TRUE &&
+	  ctx->Extensions.ARB_texture_float)
 	 texIntFormat = GL_RGBA32F;
    }
    else if (_mesa_is_stencil_format(format)) {



More information about the mesa-commit mailing list