[Mesa-dev] [PATCH 06/13] mesa: Use the same enable for EXT_texture_env_dot3 and ARB_texture_env_dot3

Ian Romanick idr at freedesktop.org
Wed Aug 24 18:46:14 UTC 2016


From: Ian Romanick <ian.d.romanick at intel.com>

Every driver that supports one also supports the other.  This is
phenomenally unlikely to change.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/drivers/dri/i915/intel_extensions.c | 1 -
 src/mesa/drivers/dri/i965/intel_extensions.c | 1 -
 src/mesa/drivers/dri/nouveau/nv10_context.c  | 1 -
 src/mesa/drivers/dri/nouveau/nv20_context.c  | 1 -
 src/mesa/drivers/dri/r200/r200_context.c     | 1 -
 src/mesa/drivers/dri/radeon/radeon_context.c | 1 -
 src/mesa/main/extensions.c                   | 1 -
 src/mesa/main/extensions_table.h             | 2 +-
 src/mesa/main/mtypes.h                       | 1 -
 src/mesa/main/texenv.c                       | 4 +---
 src/mesa/state_tracker/st_extensions.c       | 2 --
 11 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/intel_extensions.c b/src/mesa/drivers/dri/i915/intel_extensions.c
index ab7820f..4f3c336 100644
--- a/src/mesa/drivers/dri/i915/intel_extensions.c
+++ b/src/mesa/drivers/dri/i915/intel_extensions.c
@@ -67,7 +67,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_pixel_buffer_object = true;
    ctx->Extensions.EXT_point_parameters = true;
    ctx->Extensions.EXT_provoking_vertex = true;
-   ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
    ctx->Extensions.APPLE_object_purgeable = true;
    ctx->Extensions.MESA_pack_invert = true;
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index 466c384..7bd0fcf 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -239,7 +239,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_provoking_vertex = true;
    ctx->Extensions.EXT_stencil_two_side = true;
    ctx->Extensions.EXT_texture_array = true;
-   ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
    ctx->Extensions.EXT_texture_integer = true;
    ctx->Extensions.EXT_texture_shared_exponent = true;
diff --git a/src/mesa/drivers/dri/nouveau/nv10_context.c b/src/mesa/drivers/dri/nouveau/nv10_context.c
index 7a86ba2..00a9358 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_context.c
@@ -448,7 +448,6 @@ nv10_context_create(struct nouveau_screen *screen, gl_api api,
 	ctx->Extensions.ARB_texture_env_crossbar = true;
 	ctx->Extensions.ARB_texture_env_combine = true;
 	ctx->Extensions.ARB_texture_env_dot3 = true;
-	ctx->Extensions.EXT_texture_env_dot3 = true;
 	ctx->Extensions.NV_fog_distance = true;
 	ctx->Extensions.NV_texture_rectangle = true;
 	if (ctx->Mesa_DXTn) {
diff --git a/src/mesa/drivers/dri/nouveau/nv20_context.c b/src/mesa/drivers/dri/nouveau/nv20_context.c
index ec638c0..14329a2 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_context.c
@@ -459,7 +459,6 @@ nv20_context_create(struct nouveau_screen *screen, gl_api api,
 	ctx->Extensions.ARB_texture_env_crossbar = true;
 	ctx->Extensions.ARB_texture_env_combine = true;
 	ctx->Extensions.ARB_texture_env_dot3 = true;
-	ctx->Extensions.EXT_texture_env_dot3 = true;
 	ctx->Extensions.NV_fog_distance = true;
 	ctx->Extensions.NV_texture_rectangle = true;
 	if (ctx->Mesa_DXTn) {
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 2a42ab3..60e7782 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -352,7 +352,6 @@ GLboolean r200CreateContext( gl_api api,
    ctx->Extensions.EXT_blend_minmax = true;
    ctx->Extensions.EXT_gpu_program_parameters = true;
    ctx->Extensions.EXT_point_parameters = true;
-   ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
    ctx->Extensions.EXT_texture_mirror_clamp = true;
    ctx->Extensions.MESA_pack_invert = true;
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 5e15b46..ce9d098 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -304,7 +304,6 @@ r100CreateContext( gl_api api,
    ctx->Extensions.ARB_texture_mirror_clamp_to_edge = true;
    ctx->Extensions.ATI_texture_env_combine3 = true;
    ctx->Extensions.ATI_texture_mirror_once = true;
-   ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
    ctx->Extensions.EXT_texture_mirror_clamp = true;
    ctx->Extensions.MESA_ycbcr_texture = true;
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 62a7316..e8fc70c 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -158,7 +158,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.EXT_stencil_two_side = GL_TRUE;
    ctx->Extensions.EXT_texture_array = GL_TRUE;
    ctx->Extensions.EXT_texture_compression_latc = GL_TRUE;
-   ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
    ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE;
    ctx->Extensions.EXT_texture_mirror_clamp = GL_TRUE;
    ctx->Extensions.EXT_texture_shared_exponent = GL_TRUE;
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index a83d9b7..4b3ff1d 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -249,7 +249,7 @@ EXT(EXT_texture_cube_map                    , ARB_texture_cube_map
 EXT(EXT_texture_edge_clamp                  , dummy_true                             , GLL,  x ,  x ,  x , 1997)
 EXT(EXT_texture_env_add                     , dummy_true                             , GLL,  x ,  x ,  x , 1999)
 EXT(EXT_texture_env_combine                 , dummy_true                             , GLL,  x ,  x ,  x , 2000)
-EXT(EXT_texture_env_dot3                    , EXT_texture_env_dot3                   , GLL,  x ,  x ,  x , 2000)
+EXT(EXT_texture_env_dot3                    , ARB_texture_env_dot3                   , GLL,  x ,  x ,  x , 2000)
 EXT(EXT_texture_filter_anisotropic          , EXT_texture_filter_anisotropic         , GLL, GLC, ES1, ES2, 1999)
 EXT(EXT_texture_format_BGRA8888             , dummy_true                             ,  x ,  x , ES1, ES2, 2005)
 EXT(EXT_texture_integer                     , EXT_texture_integer                    , GLL, GLC,  x ,  x , 2006)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 5b02fad..4b95fdb 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3908,7 +3908,6 @@ struct gl_extensions
    GLboolean EXT_texture_array;
    GLboolean EXT_texture_compression_latc;
    GLboolean EXT_texture_compression_s3tc;
-   GLboolean EXT_texture_env_dot3;
    GLboolean EXT_texture_filter_anisotropic;
    GLboolean EXT_texture_integer;
    GLboolean EXT_texture_mirror_clamp;
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index de49566..c7403d9 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -123,9 +123,7 @@ set_combiner_mode(struct gl_context *ctx,
       break;
    case GL_DOT3_RGB_EXT:
    case GL_DOT3_RGBA_EXT:
-      legal = (ctx->API == API_OPENGL_COMPAT &&
-               ctx->Extensions.EXT_texture_env_dot3 &&
-               pname == GL_COMBINE_RGB);
+      legal = _mesa_has_EXT_texture_env_dot3(ctx) && pname == GL_COMBINE_RGB;
       break;
    case GL_DOT3_RGB:
    case GL_DOT3_RGBA:
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 1f53bdf..88b2331 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -834,8 +834,6 @@ void st_init_extensions(struct pipe_screen *screen,
    extensions->EXT_point_parameters = GL_TRUE;
    extensions->EXT_provoking_vertex = GL_TRUE;
 
-   extensions->EXT_texture_env_dot3 = GL_TRUE;
-
    extensions->ATI_fragment_shader = GL_TRUE;
    extensions->ATI_texture_env_combine3 = GL_TRUE;
 
-- 
2.5.5



More information about the mesa-dev mailing list