diff options
author | Kenneth Graunke <[email protected]> | 2012-08-13 23:59:09 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-08-27 14:23:39 -0700 |
commit | b6b1fc1261e86e2aa03ae8d2dd587c88a207354f (patch) | |
tree | 0c9cf6725a1cb3cb6f25a893e2f5ef4cf14f9caa /src/mesa/drivers | |
parent | 87cdefed405da1a57a006737297d20ba0c25fa1b (diff) |
i965: Don't set vp_outputs_written in the WM program key on Gen6+.
It's only used by on pre-Sandybridge hardware.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 3 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index f5b2649dd29..ae462f7fcfe 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2155,17 +2155,21 @@ brw_fs_precompile(struct gl_context *ctx, struct gl_shader_program *prog) key.iz_lookup |= IZ_DEPTH_WRITE_ENABLE_BIT; } - key.vp_outputs_written |= BITFIELD64_BIT(FRAG_ATTRIB_WPOS); + if (intel->gen < 6) + key.vp_outputs_written |= BITFIELD64_BIT(FRAG_ATTRIB_WPOS); + for (int i = 0; i < FRAG_ATTRIB_MAX; i++) { if (!(fp->Base.InputsRead & BITFIELD64_BIT(i))) continue; key.proj_attrib_mask |= 1 << i; - int vp_index = _mesa_vert_result_to_frag_attrib((gl_vert_result) i); + if (intel->gen < 6) { + int vp_index = _mesa_vert_result_to_frag_attrib((gl_vert_result) i); - if (vp_index >= 0) - key.vp_outputs_written |= BITFIELD64_BIT(vp_index); + if (vp_index >= 0) + key.vp_outputs_written |= BITFIELD64_BIT(vp_index); + } } key.clamp_fragment_color = true; diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index e7ef9f2631a..8b7d0693a35 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -636,7 +636,8 @@ static void brw_wm_populate_key( struct brw_context *brw, key->sample_alpha_to_coverage = ctx->Multisample.SampleAlphaToCoverage; /* CACHE_NEW_VS_PROG */ - key->vp_outputs_written = brw->vs.prog_data->outputs_written; + if (intel->gen < 6) + key->vp_outputs_written = brw->vs.prog_data->outputs_written; /* The unique fragment program ID */ key->program_string_id = fp->id; |