i965: Enable AMD_seamless_cubemap_per_texture
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 4 Sep 2013 18:15:15 +0000 (11:15 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Sun, 8 Sep 2013 14:54:12 +0000 (07:54 -0700)
The change is very small.  Do seamless filtering if either the context
enable is set or the sampler enable is set.

The AMD_seamless_cubemap_per_texture says:

    "If TEXTURE_CUBE_MAP_SEAMLESS_ARB is emabled (sic) globally or the
    value of the texture's TEXTURE_CUBE_MAP_SEAMLESS_ARB parameter is
    TRUE, seamless cube map sampling is enabled..."

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
docs/relnotes/9.3.html
src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
src/mesa/drivers/dri/i965/gen7_sampler_state.c
src/mesa/drivers/dri/i965/intel_extensions.c

index 1f57df04ba146908b4e6f567fbe52747c28333ee..1b34a9a456c3fed9a5846f40d47e103bed734e74 100644 (file)
@@ -43,6 +43,10 @@ TBD.
 Note: some of the new features are only available with certain drivers.
 </p>
 
+<ul>
+<li>GL_AMD_seamless_cubemap_per_texture on i965.</li>
+</ul>
+
 
 <h2>Bug fixes</h2>
 
index 828820d533ef4fda7a0d036a286cfc0db4c1ac6c..4544028342c174d55ccabcc6baa5cf44e29949c8 100644 (file)
@@ -282,7 +282,7 @@ static void brw_update_sampler_state(struct brw_context *brw,
     */
    if (texObj->Target == GL_TEXTURE_CUBE_MAP ||
        texObj->Target == GL_TEXTURE_CUBE_MAP_ARRAY) {
-      if (ctx->Texture.CubeMapSeamless &&
+      if ((ctx->Texture.CubeMapSeamless || gl_sampler->CubeMapSeamless) &&
          (gl_sampler->MinFilter != GL_NEAREST ||
           gl_sampler->MagFilter != GL_NEAREST)) {
         sampler->ss1.r_wrap_mode = BRW_TEXCOORDMODE_CUBE;
index 61625022d3d6da21adc6b387de0fa640d4419c24..d796fb504992e7a5643b1a49bc9ab8d9083b85d7 100644 (file)
@@ -116,7 +116,7 @@ gen7_update_sampler_state(struct brw_context *brw, int unit, int ss_index,
     */
    if (texObj->Target == GL_TEXTURE_CUBE_MAP ||
        texObj->Target == GL_TEXTURE_CUBE_MAP_ARRAY) {
-      if (ctx->Texture.CubeMapSeamless &&
+      if ((ctx->Texture.CubeMapSeamless || gl_sampler->CubeMapSeamless) &&
          (gl_sampler->MinFilter != GL_NEAREST ||
           gl_sampler->MagFilter != GL_NEAREST)) {
         sampler->ss3.r_wrap_mode = BRW_TEXCOORDMODE_CUBE;
index 655467c3cfb63234322763044ae9fa517a148e73..32f7b5c72860cbfd7ab93371f09367de4ebfde80 100644 (file)
@@ -106,6 +106,7 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_texture_swizzle = true;
    ctx->Extensions.EXT_stencil_two_side = true;
    ctx->Extensions.EXT_vertex_array_bgra = true;
+   ctx->Extensions.AMD_seamless_cubemap_per_texture = true;
    ctx->Extensions.APPLE_object_purgeable = true;
    ctx->Extensions.ATI_envmap_bumpmap = true;
    ctx->Extensions.ATI_separate_stencil = true;