summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-07-13 20:16:11 -0700
committerKenneth Graunke <[email protected]>2016-07-17 19:26:54 -0700
commit18f67c8a69fcde5d3f585effeef670d0861b0730 (patch)
treee5682c386f3fdd0b946d302e5cb5a0b0348697f9 /src/mesa
parent7ef7738a61ded5632105b8de6f8141307592e20a (diff)
i965: Move pulls_bary setting to emit_pixel_interpolator_send().
pulls_bary should be set when the shader uses a pixel interpolator message. So, setting it from the function that emits pixel interpolator messages makes a lot of sense. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index 898f23ae746..5442b7355fe 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -1639,6 +1639,8 @@ emit_pixel_interpolater_send(const fs_builder &bld,
const fs_reg &desc,
glsl_interp_mode interpolation)
{
+ struct brw_wm_prog_data *wm_prog_data =
+ (struct brw_wm_prog_data *) bld.shader->stage_prog_data;
fs_inst *inst;
fs_reg payload;
int mlen;
@@ -1658,6 +1660,8 @@ emit_pixel_interpolater_send(const fs_builder &bld,
inst->regs_written = 2 * bld.dispatch_width() / 8;
inst->pi_noperspective = interpolation == INTERP_MODE_NOPERSPECTIVE;
+ wm_prog_data->pulls_bary = true;
+
return inst;
}
@@ -3023,8 +3027,6 @@ fs_visitor::nir_emit_fs_intrinsic(const fs_builder &bld,
nir_intrinsic_instr *instr)
{
assert(stage == MESA_SHADER_FRAGMENT);
- struct brw_wm_prog_data *wm_prog_data =
- (struct brw_wm_prog_data *) prog_data;
const struct brw_wm_prog_key *wm_key = (const struct brw_wm_prog_key *) key;
fs_reg dest;
@@ -3103,8 +3105,6 @@ fs_visitor::nir_emit_fs_intrinsic(const fs_builder &bld,
* pre-interpolation. In order to get the actual location of the bits
* we get from the vertex fetching hardware, we need the variable.
*/
- wm_prog_data->pulls_bary = true;
-
fs_reg dst_xy = bld.vgrf(BRW_REGISTER_TYPE_F, 2);
const glsl_interp_mode interpolation =
(glsl_interp_mode) instr->variables[0]->var->data.interpolation;