Re: [Mesa-dev] [PATCH 4/4] i965: Enable AMD_seamless_cubemap_per_texture

2013-09-05 Thread Kenneth Graunke

On 09/04/2013 11:29 AM, Ian Romanick wrote:

From: Ian Romanick 

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 
---
  docs/relnotes/9.3.html   | 4 
  src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 2 +-
  src/mesa/drivers/dri/i965/gen7_sampler_state.c   | 2 +-
  src/mesa/drivers/dri/i965/intel_extensions.c | 1 +
  4 files changed, 7 insertions(+), 2 deletions(-)


Chris actually did this a year and a half ago:
http://lists.freedesktop.org/archives/mesa-dev/2012-April/021267.html

Eric didn't seem to think it was useful at the time.

I'm fine with enabling it.

Patch 4 is:
Reviewed-by: Kenneth Graunke 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 4/4] i965: Enable AMD_seamless_cubemap_per_texture

2013-09-05 Thread Paul Berry
On 4 September 2013 11:29, Ian Romanick  wrote:

> From: Ian Romanick 
>
> 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 
> ---
>  docs/relnotes/9.3.html   | 4 
>  src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 2 +-
>  src/mesa/drivers/dri/i965/gen7_sampler_state.c   | 2 +-
>  src/mesa/drivers/dri/i965/intel_extensions.c | 1 +
>  4 files changed, 7 insertions(+), 2 deletions(-)
>

Patch 1 is:

Acked-by: Paul Berry 

I sent a comment on patch 2.

Patches 3-4 are:

Reviewed-by: Paul Berry 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 4/4] i965: Enable AMD_seamless_cubemap_per_texture

2013-09-04 Thread Chris Forbes
For the series,

Reviewed-by: Chris Forbes 

On Thu, Sep 5, 2013 at 6:29 AM, Ian Romanick  wrote:
> From: Ian Romanick 
>
> 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 
> ---
>  docs/relnotes/9.3.html   | 4 
>  src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 2 +-
>  src/mesa/drivers/dri/i965/gen7_sampler_state.c   | 2 +-
>  src/mesa/drivers/dri/i965/intel_extensions.c | 1 +
>  4 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/docs/relnotes/9.3.html b/docs/relnotes/9.3.html
> index 1f57df0..1b34a9a 100644
> --- a/docs/relnotes/9.3.html
> +++ b/docs/relnotes/9.3.html
> @@ -43,6 +43,10 @@ TBD.
>  Note: some of the new features are only available with certain drivers.
>  
>
> +
> +GL_AMD_seamless_cubemap_per_texture on i965.
> +
> +
>
>  Bug fixes
>
> diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c 
> b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
> index 828820d..4544028 100644
> --- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
> @@ -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;
> diff --git a/src/mesa/drivers/dri/i965/gen7_sampler_state.c 
> b/src/mesa/drivers/dri/i965/gen7_sampler_state.c
> index 6162502..d796fb5 100644
> --- a/src/mesa/drivers/dri/i965/gen7_sampler_state.c
> +++ b/src/mesa/drivers/dri/i965/gen7_sampler_state.c
> @@ -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;
> diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c 
> b/src/mesa/drivers/dri/i965/intel_extensions.c
> index 655467c..32f7b5c 100644
> --- a/src/mesa/drivers/dri/i965/intel_extensions.c
> +++ b/src/mesa/drivers/dri/i965/intel_extensions.c
> @@ -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;
> --
> 1.8.1.4
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 4/4] i965: Enable AMD_seamless_cubemap_per_texture

2013-09-04 Thread Ian Romanick
From: Ian Romanick 

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 
---
 docs/relnotes/9.3.html   | 4 
 src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 2 +-
 src/mesa/drivers/dri/i965/gen7_sampler_state.c   | 2 +-
 src/mesa/drivers/dri/i965/intel_extensions.c | 1 +
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/docs/relnotes/9.3.html b/docs/relnotes/9.3.html
index 1f57df0..1b34a9a 100644
--- a/docs/relnotes/9.3.html
+++ b/docs/relnotes/9.3.html
@@ -43,6 +43,10 @@ TBD.
 Note: some of the new features are only available with certain drivers.
 
 
+
+GL_AMD_seamless_cubemap_per_texture on i965.
+
+
 
 Bug fixes
 
diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c 
b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
index 828820d..4544028 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/gen7_sampler_state.c 
b/src/mesa/drivers/dri/i965/gen7_sampler_state.c
index 6162502..d796fb5 100644
--- a/src/mesa/drivers/dri/i965/gen7_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sampler_state.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c 
b/src/mesa/drivers/dri/i965/intel_extensions.c
index 655467c..32f7b5c 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -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;
-- 
1.8.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev