Discussion:
[Mesa-dev] [PATCH] i965: update MaxTextureRectSize to match PRMs and comply with OpenGL 4.1+
Iago Toral Quiroga
2017-06-16 09:04:03 UTC
Permalink
We were exposing 4096, but we can do up to 8192 in Gen4-6 and up to
16384 in gen7+. OpenGL 4.1+ requires at least 16384.
---
src/mesa/drivers/dri/i965/brw_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 2d91b37..157d855 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -503,7 +503,7 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.Max3DTextureLevels = 12; /* 2048 */
ctx->Const.MaxArrayTextureLayers = brw->gen >= 7 ? 2048 : 512;
ctx->Const.MaxTextureMbytes = 1536;
- ctx->Const.MaxTextureRectSize = 1 << 12;
+ ctx->Const.MaxTextureRectSize = brw->gen >= 7 ? 16384 : 8192;
ctx->Const.MaxTextureMaxAnisotropy = 16.0;
ctx->Const.MaxTextureLodBias = 15.0;
ctx->Const.StripTextureBorder = true;
--
2.9.3
Kenneth Graunke
2017-06-17 17:09:07 UTC
Permalink
Post by Iago Toral Quiroga
We were exposing 4096, but we can do up to 8192 in Gen4-6 and up to
16384 in gen7+. OpenGL 4.1+ requires at least 16384.
---
src/mesa/drivers/dri/i965/brw_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 2d91b37..157d855 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -503,7 +503,7 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.Max3DTextureLevels = 12; /* 2048 */
ctx->Const.MaxArrayTextureLayers = brw->gen >= 7 ? 2048 : 512;
ctx->Const.MaxTextureMbytes = 1536;
- ctx->Const.MaxTextureRectSize = 1 << 12;
+ ctx->Const.MaxTextureRectSize = brw->gen >= 7 ? 16384 : 8192;
ctx->Const.MaxTextureMaxAnisotropy = 16.0;
ctx->Const.MaxTextureLodBias = 15.0;
ctx->Const.StripTextureBorder = true;
Good catch - thanks for fixing this!

Reviewed-by: Kenneth Graunke <***@whitecape.org>
Emil Velikov
2017-06-17 17:37:48 UTC
Permalink
Post by Kenneth Graunke
Post by Iago Toral Quiroga
We were exposing 4096, but we can do up to 8192 in Gen4-6 and up to
16384 in gen7+. OpenGL 4.1+ requires at least 16384.
---
src/mesa/drivers/dri/i965/brw_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 2d91b37..157d855 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -503,7 +503,7 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.Max3DTextureLevels = 12; /* 2048 */
ctx->Const.MaxArrayTextureLayers = brw->gen >= 7 ? 2048 : 512;
ctx->Const.MaxTextureMbytes = 1536;
- ctx->Const.MaxTextureRectSize = 1 << 12;
+ ctx->Const.MaxTextureRectSize = brw->gen >= 7 ? 16384 : 8192;
ctx->Const.MaxTextureMaxAnisotropy = 16.0;
ctx->Const.MaxTextureLodBias = 15.0;
ctx->Const.StripTextureBorder = true;
Good catch - thanks for fixing this!
Do we want it in -stable?

-Emil
Kenneth Graunke
2017-06-17 18:36:17 UTC
Permalink
Post by Emil Velikov
Post by Kenneth Graunke
Post by Iago Toral Quiroga
We were exposing 4096, but we can do up to 8192 in Gen4-6 and up to
16384 in gen7+. OpenGL 4.1+ requires at least 16384.
---
src/mesa/drivers/dri/i965/brw_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 2d91b37..157d855 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -503,7 +503,7 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.Max3DTextureLevels = 12; /* 2048 */
ctx->Const.MaxArrayTextureLayers = brw->gen >= 7 ? 2048 : 512;
ctx->Const.MaxTextureMbytes = 1536;
- ctx->Const.MaxTextureRectSize = 1 << 12;
+ ctx->Const.MaxTextureRectSize = brw->gen >= 7 ? 16384 : 8192;
ctx->Const.MaxTextureMaxAnisotropy = 16.0;
ctx->Const.MaxTextureLodBias = 15.0;
ctx->Const.StripTextureBorder = true;
Good catch - thanks for fixing this!
Do we want it in -stable?
-Emil
Sounds like a good idea to me.

Loading...