Mesa (master): gallium: Define PIPE_CAP_BLEND_EQUATION_SEPARATE, remove extension from default extension list

Patrice Mandin pmandin at kemper.freedesktop.org
Tue Jul 14 00:45:27 PDT 2009


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

Author: Patrice Mandin <patmandin at gmail.com>
Date:   Tue Jul 14 09:44:49 2009 +0200

gallium: Define PIPE_CAP_BLEND_EQUATION_SEPARATE, remove extension from default extension list

---

 src/gallium/drivers/nv04/nv04_screen.c          |    2 ++
 src/gallium/drivers/nv10/nv10_screen.c          |    2 ++
 src/gallium/drivers/nv20/nv20_screen.c          |    2 ++
 src/gallium/drivers/nv30/nv30_screen.c          |    2 ++
 src/gallium/drivers/nv40/nv40_screen.c          |    2 ++
 src/gallium/drivers/nv50/nv50_screen.c          |    2 ++
 src/gallium/drivers/softpipe/sp_screen.c        |    2 ++
 src/gallium/include/pipe/p_defines.h            |    1 +
 src/gallium/state_trackers/dri/dri_extensions.c |    2 --
 src/mesa/state_tracker/st_extensions.c          |    5 ++++-
 10 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/nv04/nv04_screen.c b/src/gallium/drivers/nv04/nv04_screen.c
index 190ef62..ff2febb 100644
--- a/src/gallium/drivers/nv04/nv04_screen.c
+++ b/src/gallium/drivers/nv04/nv04_screen.c
@@ -42,6 +42,8 @@ nv04_screen_get_param(struct pipe_screen *screen, int param)
 		return 1;
 	case PIPE_CAP_TGSI_CONT_SUPPORTED:
 		return 0;
+	case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+		return 0;
 	case NOUVEAU_CAP_HW_VTXBUF:
 	case NOUVEAU_CAP_HW_IDXBUF:
 		return 0;
diff --git a/src/gallium/drivers/nv10/nv10_screen.c b/src/gallium/drivers/nv10/nv10_screen.c
index c64f78b..4469b22 100644
--- a/src/gallium/drivers/nv10/nv10_screen.c
+++ b/src/gallium/drivers/nv10/nv10_screen.c
@@ -37,6 +37,8 @@ nv10_screen_get_param(struct pipe_screen *screen, int param)
 		return 0;
 	case PIPE_CAP_TGSI_CONT_SUPPORTED:
 		return 0;
+	case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+		return 0;
 	case NOUVEAU_CAP_HW_VTXBUF:
 	case NOUVEAU_CAP_HW_IDXBUF:
 		return 0;
diff --git a/src/gallium/drivers/nv20/nv20_screen.c b/src/gallium/drivers/nv20/nv20_screen.c
index 52859a9..e6924ad 100644
--- a/src/gallium/drivers/nv20/nv20_screen.c
+++ b/src/gallium/drivers/nv20/nv20_screen.c
@@ -37,6 +37,8 @@ nv20_screen_get_param(struct pipe_screen *screen, int param)
 		return 0;
 	case PIPE_CAP_TGSI_CONT_SUPPORTED:
 		return 0;
+	case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+		return 0;
 	case NOUVEAU_CAP_HW_VTXBUF:
 	case NOUVEAU_CAP_HW_IDXBUF:
 		return 0;
diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c
index 328a5c9..c8b4078 100644
--- a/src/gallium/drivers/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nv30/nv30_screen.c
@@ -48,6 +48,8 @@ nv30_screen_get_param(struct pipe_screen *pscreen, int param)
 		return 0;
 	case PIPE_CAP_TGSI_CONT_SUPPORTED:
 		return 0;
+	case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+		return 0;
 	case NOUVEAU_CAP_HW_VTXBUF:
 	case NOUVEAU_CAP_HW_IDXBUF:
 		return 1;
diff --git a/src/gallium/drivers/nv40/nv40_screen.c b/src/gallium/drivers/nv40/nv40_screen.c
index 8f070e2..5d2a421 100644
--- a/src/gallium/drivers/nv40/nv40_screen.c
+++ b/src/gallium/drivers/nv40/nv40_screen.c
@@ -46,6 +46,8 @@ nv40_screen_get_param(struct pipe_screen *pscreen, int param)
 		return 0; /* We have 4 - but unsupported currently */
 	case PIPE_CAP_TGSI_CONT_SUPPORTED:
 		return 0;
+	case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+		return 1;
 	case NOUVEAU_CAP_HW_VTXBUF:
 		return 1;
 	case NOUVEAU_CAP_HW_IDXBUF:
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index bdd449d..ce8f906 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -111,6 +111,8 @@ nv50_screen_get_param(struct pipe_screen *pscreen, int param)
 		return 0;
 	case PIPE_CAP_TGSI_CONT_SUPPORTED:
 		return 0;
+	case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+		return 1;
 	case NOUVEAU_CAP_HW_VTXBUF:
 		return 1;
 	case NOUVEAU_CAP_HW_IDXBUF:
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index be76f1d..6178c4a 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -89,6 +89,8 @@ softpipe_get_param(struct pipe_screen *screen, int param)
       return 13; /* max 4Kx4K */
    case PIPE_CAP_TGSI_CONT_SUPPORTED:
       return 1;
+   case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+      return 1;
    default:
       return 0;
    }
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index b7857c5..bc4bc70 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -304,6 +304,7 @@ enum pipe_transfer_usage {
 #define PIPE_CAP_TEXTURE_MIRROR_REPEAT   25
 #define PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS 26
 #define PIPE_CAP_TGSI_CONT_SUPPORTED     27
+#define PIPE_CAP_BLEND_EQUATION_SEPARATE 28
 
 
 /**
diff --git a/src/gallium/state_trackers/dri/dri_extensions.c b/src/gallium/state_trackers/dri/dri_extensions.c
index 2f48162..8106a7a 100644
--- a/src/gallium/state_trackers/dri/dri_extensions.c
+++ b/src/gallium/state_trackers/dri/dri_extensions.c
@@ -82,8 +82,6 @@ const struct dri_extension card_extensions[] = {
    {"GL_ARB_vertex_program", GL_ARB_vertex_program_functions},
    {"GL_ARB_window_pos", GL_ARB_window_pos_functions},
    {"GL_EXT_blend_color", GL_EXT_blend_color_functions},
-   {"GL_EXT_blend_equation_separate",
-    GL_EXT_blend_equation_separate_functions},
    {"GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions},
    {"GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions},
    {"GL_EXT_blend_subtract", NULL},
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index be0af6e..8a958e8 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -158,7 +158,6 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.ARB_vertex_program = GL_TRUE;
 
    ctx->Extensions.EXT_blend_color = GL_TRUE;
-   ctx->Extensions.EXT_blend_equation_separate = GL_TRUE;
    ctx->Extensions.EXT_blend_func_separate = GL_TRUE;
    ctx->Extensions.EXT_blend_logic_op = GL_TRUE;
    ctx->Extensions.EXT_blend_minmax = GL_TRUE;
@@ -206,6 +205,10 @@ void st_init_extensions(struct st_context *st)
       ctx->Extensions.ARB_texture_mirrored_repeat = GL_TRUE;
    }
 
+   if (screen->get_param(screen, PIPE_CAP_BLEND_EQUATION_SEPARATE)) {
+      ctx->Extensions.EXT_blend_equation_separate = GL_TRUE;
+   }
+
    if (screen->get_param(screen, PIPE_CAP_TEXTURE_MIRROR_CLAMP) > 0) {
       ctx->Extensions.EXT_texture_mirror_clamp = GL_TRUE;
    }



More information about the mesa-commit mailing list