Hi,

the first patch enables EXT_framebuffer_multisample in st/mesa. This
extension appears to alias ARB_fbo functions and there's no other checking
for multisampling in st/mesa where ARB_fbo is being enabled, so
fbo_multisample could be enabled by default.

The second patch enables hardware-accelerated CopyTex[Sub]Image in cases
when the RGB and RGBA destination formats are used regardless of source
formats. The idea is that if the colorbuffer is of RGB or RGBA format, the
format conversion for copying between two different surfaces is basically
done in texture units (using swizzles), therefore there is no reason to use
software fallback. Without this patch, openarena fallbacks to software when
bloom is enabled.

Please review.

Best regards.

Marek
From 80d9b69f00f72b106784c21a7d5a63c985e3bc0a Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Marek=20Ol=C5=A1=C3=A1k?= <mar...@gmail.com>
Date: Wed, 6 Jan 2010 14:27:50 +0100
Subject: [PATCH 1/2] st/mesa: enable EXT_framebuffer_multisample

---
 src/mesa/state_tracker/st_extensions.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 35e0874..a94236b 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -168,6 +168,7 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.EXT_blend_subtract = GL_TRUE;
    ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
    ctx->Extensions.EXT_framebuffer_object = GL_TRUE;
+   ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE;
    ctx->Extensions.EXT_fog_coord = GL_TRUE;
    ctx->Extensions.EXT_multi_draw_arrays = GL_TRUE;
    ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
-- 
1.6.3.3

From d41fc110bf5a32ecf44e74b6094140610d643739 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Marek=20Ol=C5=A1=C3=A1k?= <mar...@gmail.com>
Date: Tue, 29 Dec 2009 15:17:13 +0100
Subject: [PATCH 2/2] st/mesa: always use accelerated CopyTex[Sub]Image for RGB and RGBA dest buffers

Later on we might do the same thing for R/RG buffers.
---
 src/mesa/state_tracker/st_cb_texture.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index f01053c..d57304e 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1381,9 +1381,13 @@ compatible_src_dst_formats(const struct gl_renderbuffer *src,
        */
       return TGSI_WRITEMASK_XYZW;
    }
-   else if (srcFormat == GL_RGBA &&
-            dstLogicalFormat == GL_RGB) {
-      /* Add a single special case to cope with RGBA->RGB transfers,
+   else if (dstLogicalFormat == GL_RGBA) {
+      /* In theory, any format can be converted to GL_RGBA.
+       */
+      return TGSI_WRITEMASK_XYZW;
+   }
+   else if (dstLogicalFormat == GL_RGB) {
+      /* Add a special case to cope with transfers into RGB,
        * setting A to 1.0 to cope with situations where the RGB
        * destination is actually stored as RGBA.
        */
-- 
1.6.3.3

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to