From e5c6a92a12b5cd7db205d72039f58d302b0be9d5 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 15 Feb 2011 23:30:23 +0100 Subject: mesa: implement clamping controls (ARB_color_buffer_float) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Squashed commit of the following: Author: Marek Olšák mesa: fix getteximage so that it doesn't clamp values mesa: update the compute_version function mesa: add display list support for ARB_color_buffer_float mesa: fix glGet query with GL_ALPHA_TEST_REF and ARB_color_buffer_float commit b2f6ddf907935b2594d2831ddab38cf57a1729ce Author: Luca Barbieri Date: Tue Aug 31 16:50:57 2010 +0200 mesa: document known possible deviations from ARB_color_buffer_float commit 5458935be800c1b19d1c9d1569dc4fa30a97e8b8 Author: Luca Barbieri Date: Tue Aug 24 21:54:56 2010 +0200 mesa: expose GL_ARB_color_buffer_float commit aef5c3c6be6edd076e955e37c80905bc447f8a82 Author: Luca Barbieri Date: Thu Aug 26 18:12:34 2010 +0200 mesa, mesa/st: handle read color clamping properly (I'll squash the st/mesa part to a separate commit. -Marek) We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where the operation mandates it. TODO: did I get the set of operations mandating it right? commit 3a9cb5e59b676b6148c50907ce6eef5441677e36 Author: Luca Barbieri Date: Thu Aug 26 18:09:41 2010 +0200 mesa: respect color clamping in texenv programs (v2) Changes in v2: - Fix attributes other than vertex color sometimes getting clamped commit de26f9e47e886e176aab6e5a2c3d4481efb64362 Author: Luca Barbieri Date: Thu Aug 26 18:05:53 2010 +0200 mesa: restore color clamps on glPopAttrib commit a55ac3c300c189616627c05d924c40a8b55bfafa Author: Luca Barbieri Date: Thu Aug 26 18:04:26 2010 +0200 mesa: clamp color queries if and only if fragment clamping is enabled commit 9940a3e31c2fb76cc3d28b15ea78dde369825107 Author: Luca Barbieri Date: Wed Aug 25 00:00:16 2010 +0200 mesa: introduce derived _ClampXxxColor state resolving FIXED_ONLY To do this, we make ClampColor call FLUSH_VERTICES with the appropriate _NEW flag. We introduce _NEW_FRAG_CLAMP since fragment clamping has wide-ranging effects, despite being in the Color attrib group. This may be easily changed by s/_NEW_FRAG_CLAMP/_NEW_COLOR/g commit 6244c446e3beed5473b4e811d10787e4019f59d6 Author: Luca Barbieri Date: Thu Aug 26 17:58:24 2010 +0200 mesa: add unclamped color parameters --- src/mesa/main/pack.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/mesa/main/pack.c') diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 512835cb803..02154585aca 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -504,17 +504,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4], luminance = NULL; } - /* XXX - * This test should probably go away. Have the caller set/clear the - * IMAGE_CLAMP_BIT as needed. - */ - if (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE) { - if (!intDstFormat) { - /* need to clamp to [0, 1] */ - transferOps |= IMAGE_CLAMP_BIT; - } - } - if (transferOps) { _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba); } -- cgit v1.2.3 From 14eedf3028422e98ac05713a3e3c37e6c9b4cf37 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 13 Apr 2011 10:50:56 -0700 Subject: mesa: Fix _mesa_unpack_dudv_span_byte assertion. It was accepting only GL_DUDV_ATI and not the specific sized format GL_DU8DV8_ATI. Fixes assertion failure at startup in Shadowgrounds. Reviewed-by: Brian Paul --- src/mesa/main/pack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/pack.c') diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 02154585aca..4bb0a90045e 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -3973,7 +3973,8 @@ _mesa_unpack_dudv_span_byte( struct gl_context *ctx, GLbitfield transferOps ) { ASSERT(dstFormat == GL_DUDV_ATI); - ASSERT(srcFormat == GL_DUDV_ATI); + ASSERT(srcFormat == GL_DUDV_ATI || + srcFormat == GL_DU8DV8_ATI); ASSERT(srcType == GL_UNSIGNED_BYTE || srcType == GL_BYTE || -- cgit v1.2.3