Mesa (master): i965/gen7: expose larger gather offsets

Jason Ekstrand jekstrand at kemper.freedesktop.org
Tue Nov 29 15:44:32 UTC 2016


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

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Sun Nov 27 21:05:35 2016 -0500

i965/gen7: expose larger gather offsets

This matches the capabilities of the hardware.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/mesa/drivers/dri/i965/brw_context.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 6aeb12d..b928f94 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -536,10 +536,15 @@ brw_initialize_context_constants(struct brw_context *brw)
    ctx->Const.MaxTextureRectSize = 1 << 12;
    ctx->Const.MaxTextureMaxAnisotropy = 16.0;
    ctx->Const.StripTextureBorder = true;
-   if (brw->gen >= 7)
+   if (brw->gen >= 7) {
       ctx->Const.MaxProgramTextureGatherComponents = 4;
-   else if (brw->gen == 6)
+      ctx->Const.MinProgramTextureGatherOffset = -32;
+      ctx->Const.MaxProgramTextureGatherOffset = 31;
+   } else if (brw->gen == 6) {
       ctx->Const.MaxProgramTextureGatherComponents = 1;
+      ctx->Const.MinProgramTextureGatherOffset = -8;
+      ctx->Const.MaxProgramTextureGatherOffset = 7;
+   }
 
    ctx->Const.MaxUniformBlockSize = 65536;
 




More information about the mesa-commit mailing list