i965: Enable ARB_texture_gather for one component on Gen6.
authorChris Forbes <chrisf@ijw.co.nz>
Sun, 2 Feb 2014 09:00:18 +0000 (22:00 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Fri, 7 Feb 2014 21:32:24 +0000 (10:32 +1300)
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_extensions.c

index 1879abe56051fae5239fe3f0547d44e1687646e5..021287ee23491596e938ae2b0a900d3e431341ad 100644 (file)
@@ -374,6 +374,8 @@ brw_initialize_context_constants(struct brw_context *brw)
 
    if (brw->gen >= 7)
       ctx->Const.MaxProgramTextureGatherComponents = 4;
+   else if (brw->gen == 6)
+      ctx->Const.MaxProgramTextureGatherComponents = 1;
 
    ctx->Const.MinLineWidth = 1.0;
    ctx->Const.MinLineWidthAA = 1.0;
index a0fd354f2cb1684ad8f212a7ad99902fa2e604e9..eb3f2c7d0876bc81221218081dceaa77878a9112 100644 (file)
@@ -270,6 +270,7 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.ARB_texture_multisample = true;
       ctx->Extensions.ARB_sample_shading = true;
       ctx->Extensions.ARB_vertex_type_10f_11f_11f_rev = true;
+      ctx->Extensions.ARB_texture_gather = true;
 
       /* Test if the kernel has the ioctl. */
       if (drm_intel_reg_read(brw->bufmgr, TIMESTAMP, &dummy) == 0)
@@ -284,7 +285,6 @@ intelInitExtensions(struct gl_context *ctx)
    }
 
    if (brw->gen >= 7) {
-      ctx->Extensions.ARB_texture_gather = true;
       ctx->Extensions.ARB_conservative_depth = true;
       ctx->Extensions.AMD_vertex_shader_layer = true;
       if (can_do_pipelined_register_writes(brw)) {