summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp6
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c8
2 files changed, 12 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index ae462f7fcfe..ebb52fcef43 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2155,6 +2155,9 @@ brw_fs_precompile(struct gl_context *ctx, struct gl_shader_program *prog)
key.iz_lookup |= IZ_DEPTH_WRITE_ENABLE_BIT;
}
+ if (prog->Name != 0)
+ key.proj_attrib_mask = 0xffffffff;
+
if (intel->gen < 6)
key.vp_outputs_written |= BITFIELD64_BIT(FRAG_ATTRIB_WPOS);
@@ -2162,7 +2165,8 @@ brw_fs_precompile(struct gl_context *ctx, struct gl_shader_program *prog)
if (!(fp->Base.InputsRead & BITFIELD64_BIT(i)))
continue;
- key.proj_attrib_mask |= 1 << i;
+ if (prog->Name == 0)
+ key.proj_attrib_mask |= 1 << i;
if (intel->gen < 6) {
int vp_index = _mesa_vert_result_to_frag_attrib((gl_vert_result) i);
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 9d969618042..ec5eccdc130 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -592,7 +592,13 @@ static void brw_wm_populate_key( struct brw_context *brw,
key->stats_wm = brw->intel.stats_wm;
/* BRW_NEW_WM_INPUT_DIMENSIONS */
- key->proj_attrib_mask = brw->wm.input_size_masks[4-1];
+ /* Only set this for fixed function. The optimization it enables isn't
+ * useful for programs using shaders.
+ */
+ if (ctx->Shader.CurrentFragmentProgram)
+ key->proj_attrib_mask = 0xffffffff;
+ else
+ key->proj_attrib_mask = brw->wm.input_size_masks[4-1];
/* _NEW_LIGHT */
key->flat_shade = (ctx->Light.ShadeModel == GL_FLAT);