Mesa (master): gallium: set PIPE_CAP_MIXED_COLORBUFFER_FORMATS in some drivers

Marek Olšák mareko at kemper.freedesktop.org
Fri Apr 1 05:16:17 PDT 2011


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Tue Mar 29 18:18:05 2011 +0200

gallium: set PIPE_CAP_MIXED_COLORBUFFER_FORMATS in some drivers

---

 src/gallium/drivers/llvmpipe/lp_screen.c |    1 +
 src/gallium/drivers/noop/noop_pipe.c     |    1 +
 src/gallium/drivers/nv50/nv50_screen.c   |    1 +
 src/gallium/drivers/nvc0/nvc0_screen.c   |    1 +
 src/gallium/drivers/nvfx/nvfx_screen.c   |    2 ++
 src/gallium/drivers/r300/r300_screen.c   |    2 ++
 src/gallium/drivers/r600/r600_pipe.c     |    1 +
 src/gallium/drivers/svga/svga_screen.c   |    2 ++
 8 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 521a52a..036a6e0 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -166,6 +166,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
       return 0;
    case PIPE_CAP_TGSI_INSTANCEID:
    case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
+   case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
       return 1;
    default:
       return 0;
diff --git a/src/gallium/drivers/noop/noop_pipe.c b/src/gallium/drivers/noop/noop_pipe.c
index 496b7f5..18308b7 100644
--- a/src/gallium/drivers/noop/noop_pipe.c
+++ b/src/gallium/drivers/noop/noop_pipe.c
@@ -337,6 +337,7 @@ static int noop_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 	case PIPE_CAP_TEXTURE_SHADOW_MAP:
 	case PIPE_CAP_TEXTURE_SWIZZLE:
 	case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+	case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
 
 	  return 1;
 	case PIPE_CAP_DUAL_SOURCE_BLEND:
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index 9978d1e..cfa49aa 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -131,6 +131,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_PRIMITIVE_RESTART:
    case PIPE_CAP_TGSI_INSTANCEID:
    case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
+   case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
       return 1;
    default:
       NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
index f0f5237..e98a4c0 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nvc0/nvc0_screen.c
@@ -115,6 +115,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_PRIMITIVE_RESTART:
    case PIPE_CAP_TGSI_INSTANCEID:
    case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
+   case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
       return 1;
    default:
       NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c
index 9e6b9d6..0c8d33f 100644
--- a/src/gallium/drivers/nvfx/nvfx_screen.c
+++ b/src/gallium/drivers/nvfx/nvfx_screen.c
@@ -81,6 +81,8 @@ nvfx_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
 		return 0; // TODO: implement primitive restart
 	case PIPE_CAP_SHADER_STENCIL_EXPORT:
 		return 0;
+	case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
+                return 0;
 	default:
 		NOUVEAU_ERR("Warning: unknown PIPE_CAP %d\n", param);
 		return 0;
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index deaeb77..f09c9c0 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -118,6 +118,8 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
             return 1;
         case PIPE_CAP_TEXTURE_SWIZZLE:
             return util_format_s3tc_enabled ? r300screen->caps.dxtc_swizzle : 1;
+        case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
+            return is_r500 ? 1 : 0;
 
         /* Unsupported features (boolean caps). */
         case PIPE_CAP_TIMER_QUERY:
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index c5fc2ba..3e24bfa 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -371,6 +371,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 	case PIPE_CAP_SHADER_STENCIL_EXPORT:
 	case PIPE_CAP_TGSI_INSTANCEID:
 	case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
+	case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
 		return 1;
 	case PIPE_CAP_INDEP_BLEND_ENABLE:
 		/* R600 doesn't support per-MRT blends */
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 6c987ab..b847cf3 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -181,6 +181,8 @@ svga_get_paramf(struct pipe_screen *screen, enum pipe_cap param)
 
    case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
       return 1;
+   case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
+      return 0;
 
    default:
       return 0;



More information about the mesa-commit mailing list