mesa: GL_ARB_texture_storage is not optional
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 28 Jun 2013 01:20:32 +0000 (18:20 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 28 Jun 2013 20:35:22 +0000 (13:35 -0700)
In Mesa, this extension is implemented purely in software.  Drivers may
*optionally* provide optimized paths.

NOTE: This has the side effect of enabling the extension in the radeon,
r200, and nouveau drivers.

v2: Minor whitespace tidying (suggested by Brian).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
docs/relnotes/9.2.html
src/mesa/drivers/dri/i915/intel_extensions.c
src/mesa/drivers/dri/i965/intel_extensions.c
src/mesa/main/extensions.c
src/mesa/main/mtypes.h
src/mesa/main/teximage.c
src/mesa/main/texparam.c
src/mesa/state_tracker/st_extensions.c

index 2f2c39415d592e4c3f1fe48316def522be2d3363..1f49191148eba3430dc78ce73c326b79d1ae4088 100644 (file)
@@ -48,6 +48,7 @@ Note: some of the new features are only available with certain drivers.
 <li>GL_ARB_texture_multisample</li>
 <li>GL_ARB_texture_storage_multisample</li>
 <li>GL_ARB_texture_query_lod</li>
+<li>Enable GL_ARB_texture_storage on radeon, r200, and nouveau</li>
 <li>Added new freedreno gallium driver</li>
 <li>OSMesa interface for gallium llvmpipe/softpipe drivers</li>
 <li>Gallium Heads-Up Display (HUD) feature for performance monitoring</li>
index 74b304a23c443a605b2b49b6367219d639b4b44e..479217b889dc5c2f66968bd38e35ee25f33d71aa 100644 (file)
@@ -57,7 +57,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.ARB_texture_env_combine = true;
    ctx->Extensions.ARB_texture_env_crossbar = true;
    ctx->Extensions.ARB_texture_env_dot3 = true;
-   ctx->Extensions.ARB_texture_storage = true;
    ctx->Extensions.ARB_vertex_program = true;
    ctx->Extensions.ARB_vertex_shader = true;
    ctx->Extensions.EXT_blend_color = true;
index 23b74a521d23da011cf10b4f34d7c72a43d596bb..50640184e6619927e3b872a1547ce764da24b676 100644 (file)
@@ -79,7 +79,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.ARB_texture_non_power_of_two = true;
    ctx->Extensions.ARB_texture_rg = true;
    ctx->Extensions.ARB_texture_rgb10_a2ui = true;
-   ctx->Extensions.ARB_texture_storage = true;
    ctx->Extensions.ARB_vertex_program = true;
    ctx->Extensions.ARB_vertex_shader = true;
    ctx->Extensions.ARB_vertex_type_2_10_10_10_rev = true;
index 73282e13b515652fa00d7b592bb2039100857839..f914981cb66f02fdf744d393d740c597b4be1101 100644 (file)
@@ -149,7 +149,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_texture_rectangle",                   o(NV_texture_rectangle),                    GL,             2004 },
    { "GL_ARB_texture_rgb10_a2ui",                  o(ARB_texture_rgb10_a2ui),                  GL,             2009 },
    { "GL_ARB_texture_rg",                          o(ARB_texture_rg),                          GL,             2008 },
-   { "GL_ARB_texture_storage",                     o(ARB_texture_storage),                     GL,             2011 },
+   { "GL_ARB_texture_storage",                     o(dummy_true),                              GL,             2011 },
    { "GL_ARB_texture_storage_multisample",         o(ARB_texture_storage_multisample),         GL,             2012 },
    { "GL_ARB_texture_swizzle",                     o(EXT_texture_swizzle),                     GL,             2008 },
    { "GL_ARB_timer_query",                         o(ARB_timer_query),                         GL,             2010 },
@@ -403,7 +403,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
    ctx->Extensions.ARB_texture_rg = GL_TRUE;
    ctx->Extensions.ARB_texture_compression_rgtc = GL_TRUE;
-   ctx->Extensions.ARB_texture_storage = GL_TRUE;
    ctx->Extensions.ARB_vertex_program = GL_TRUE;
    ctx->Extensions.ARB_vertex_shader = GL_TRUE;
    ctx->Extensions.ARB_sync = GL_TRUE;
index 287934139de0c8b5231ba524141d9427ea15e492..a19ecd6a919b54576661286ec6186edc06299811 100644 (file)
@@ -3036,7 +3036,6 @@ struct gl_extensions
    GLboolean ARB_texture_query_lod;
    GLboolean ARB_texture_rg;
    GLboolean ARB_texture_rgb10_a2ui;
-   GLboolean ARB_texture_storage;
    GLboolean ARB_texture_storage_multisample;
    GLboolean ARB_timer_query;
    GLboolean ARB_transform_feedback2;
index 5226687ff924c5b50fdc57637608dd70e2a50fd4..11184965513eb00e8dc7210d390fdbd350f4e878 100644 (file)
@@ -1852,12 +1852,8 @@ legal_texsubimage_target(struct gl_context *ctx, GLuint dims, GLenum target)
 static GLboolean
 mutable_tex_object(struct gl_context *ctx, GLenum target)
 {
-   if (ctx->Extensions.ARB_texture_storage) {
-      struct gl_texture_object *texObj =
-         _mesa_get_current_tex_object(ctx, target);
-      return !texObj->Immutable;
-   }
-   return GL_TRUE;
+   struct gl_texture_object *texObj = _mesa_get_current_tex_object(ctx, target);
+   return !texObj->Immutable;
 }
 
 
index 9507bc3947fd37f7b65e1467ca967184bc59dc3c..8ed8fe0980db1ab8e47d7b22b2a3b35bbe214797 100644 (file)
@@ -1541,8 +1541,6 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
          break;
 
       case GL_TEXTURE_IMMUTABLE_FORMAT:
-         if (!ctx->Extensions.ARB_texture_storage)
-            goto invalid_pname;
          *params = (GLfloat) obj->Immutable;
          break;
 
@@ -1724,8 +1722,6 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
          break;
 
       case GL_TEXTURE_IMMUTABLE_FORMAT:
-         if (!ctx->Extensions.ARB_texture_storage)
-            goto invalid_pname;
          *params = (GLint) obj->Immutable;
          break;
 
index cd24ed3e27f0c5d1ba872d1d98b4cc5a7846114d..906eb07a22061b0cb36f3ed66dbc961daed085d9 100644 (file)
@@ -542,7 +542,6 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.ARB_texture_env_combine = GL_TRUE;
    ctx->Extensions.ARB_texture_env_crossbar = GL_TRUE;
    ctx->Extensions.ARB_texture_env_dot3 = GL_TRUE;
-   ctx->Extensions.ARB_texture_storage = GL_TRUE;
    ctx->Extensions.ARB_vertex_program = GL_TRUE;
    ctx->Extensions.ARB_vertex_shader = GL_TRUE;