[Mesa-dev] [PATCH 6/6] i965: Enable ARB_texture_gather on Gen7

Chris Forbes chrisf at ijw.co.nz
Sun Mar 31 02:10:54 PDT 2013


Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 src/mesa/drivers/dri/i965/brw_context.c       | 1 +
 src/mesa/drivers/dri/intel/intel_extensions.c | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index ceaf325..e8f9c60 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -210,6 +210,7 @@ brwCreateContext(int api,
       ctx->Const.MaxColorTextureSamples = 8;
       ctx->Const.MaxDepthTextureSamples = 8;
       ctx->Const.MaxIntegerSamples = 8;
+      ctx->Const.MaxProgramTextureGatherComponents = 4;
    }
 
    /* if conformance mode is set, swrast can handle any size AA point */
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 9efdee4..450c84d 100755
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -110,6 +110,10 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.ARB_texture_multisample = true;
    }
 
+   if (intel->gen == 7) {
+      ctx->Extensions.ARB_texture_gather = true;
+   }
+
    if (intel->gen >= 5) {
       ctx->Extensions.ARB_texture_query_lod = true;
       ctx->Extensions.EXT_timer_query = true;
-- 
1.8.2



More information about the mesa-dev mailing list