Mesa (master): i965: Increase the number of array texture levels to the hardware limit.

Eric Anholt anholt at kemper.freedesktop.org
Wed Jan 11 00:44:50 UTC 2012


Module: Mesa
Branch: master
Commit: 3d4efc583ce46e6f0a13302679fe1349d521a4a3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d4efc583ce46e6f0a13302679fe1349d521a4a3

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan  9 14:47:24 2012 -0800

i965: Increase the number of array texture levels to the hardware limit.

The EXT_texture_array required only 64, but GL 3.0 required 256.
Since we're already exposing values that can get us way beyond our
ability to map the single object directly, go ahead and expose all the
way to hardware limits.

Tested with new piglit EXT_texture_array/maxlayers on gen7.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_context.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 48c141c..087e5a2 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -178,11 +178,12 @@ brwCreateContext(int api,
 	   ctx->Const.MaxTextureLevels = MAX_TEXTURE_LEVELS;
    ctx->Const.Max3DTextureLevels = 9;
    ctx->Const.MaxCubeTextureLevels = 12;
-   /* minimum maximum.  Users are likely to run into memory problems
-    * even at this size, since 64 * 2048 * 2048 * 4 = 1GB and we can't
-    * address that much.
-    */
-   ctx->Const.MaxArrayTextureLayers = 64;
+
+   if (intel->gen >= 7)
+      ctx->Const.MaxArrayTextureLayers = 2048;
+   else
+      ctx->Const.MaxArrayTextureLayers = 512;
+
    ctx->Const.MaxTextureRectSize = (1<<12);
    
    ctx->Const.MaxTextureMaxAnisotropy = 16.0;




More information about the mesa-commit mailing list