From: Ilia Mirkin Date: Mon, 28 Nov 2016 02:05:35 +0000 (-0500) Subject: i965/gen7: expose larger gather offsets X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=62b8dbf35e0971ec9a310cf4b3b119c9fa1e8a70;p=mesa.git i965/gen7: expose larger gather offsets This matches the capabilities of the hardware. Signed-off-by: Ilia Mirkin Reviewed-by: Jason Ekstrand --- diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 6aeb12ddced..b928f94e188 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;