mesa: GL_ARB_texture_storage_multisample is not optional with GL_ARB_texture_multisample
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 28 Jun 2013 01:20:33 +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.  If a driver enables,
GL_ARB_texture_multisample, it gets GL_ARB_texture_storage_multisample
for free.

NOTE: This has the side effect of enabling the extension in Gallium
drivers that enable GL_ARB_texture_multisample.

v2 (Ken): Still prevent multisample texture targets in TexParameter for
implementations that don't support multisampling.

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

index 50640184e6619927e3b872a1547ce764da24b676..980fd724f78e9c3a7083dd8a57249ce354929127 100644 (file)
@@ -146,7 +146,6 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.OES_depth_texture_cube_map = true;
       ctx->Extensions.ARB_shading_language_packing = true;
       ctx->Extensions.ARB_texture_multisample = true;
-      ctx->Extensions.ARB_texture_storage_multisample = true;
 
       /* Test if the kernel has the ioctl. */
       if (drm_intel_reg_read(intel->bufmgr, TIMESTAMP, &dummy) == 0)
index f914981cb66f02fdf744d393d740c597b4be1101..3fbdf3fd7db87750d7f8118353095242bcc069e7 100644 (file)
@@ -150,7 +150,7 @@ static const struct extension extension_table[] = {
    { "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(dummy_true),                              GL,             2011 },
-   { "GL_ARB_texture_storage_multisample",         o(ARB_texture_storage_multisample),         GL,             2012 },
+   { "GL_ARB_texture_storage_multisample",         o(ARB_texture_multisample),                 GL,             2012 },
    { "GL_ARB_texture_swizzle",                     o(EXT_texture_swizzle),                     GL,             2008 },
    { "GL_ARB_timer_query",                         o(ARB_timer_query),                         GL,             2010 },
    { "GL_ARB_transform_feedback2",                 o(ARB_transform_feedback2),                 GL,             2010 },
index a19ecd6a919b54576661286ec6186edc06299811..d405ac8177ec62ded9540fc014bbee008fa7dc3c 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_multisample;
    GLboolean ARB_timer_query;
    GLboolean ARB_transform_feedback2;
    GLboolean ARB_transform_feedback3;
index 8ed8fe0980db1ab8e47d7b22b2a3b35bbe214797..39cdad35e8ede242cfddd13315a858caba0eaf50 100644 (file)
@@ -176,12 +176,12 @@ get_texobj(struct gl_context *ctx, GLenum target, GLboolean get)
       }
       break;
    case GL_TEXTURE_2D_MULTISAMPLE:
-      if (ctx->Extensions.ARB_texture_storage_multisample) {
+      if (ctx->Extensions.ARB_texture_multisample) {
          return texUnit->CurrentTex[TEXTURE_2D_MULTISAMPLE_INDEX];
       }
       break;
    case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
-      if (ctx->Extensions.ARB_texture_storage_multisample) {
+      if (ctx->Extensions.ARB_texture_multisample) {
          return texUnit->CurrentTex[TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX];
       }
       break;