diff options
author | Francisco Jerez <[email protected]> | 2017-01-13 15:23:48 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-28 13:19:38 -0700 |
commit | 8f143f70d64786a521fe57f109bff9a084cdf27f (patch) | |
tree | 4bd14e8a74752f54ad63c1b58f5bf42e5b49cbdd /src/intel/compiler/brw_fs.cpp | |
parent | d996e5b81225e84944b09f1d48b4b16e1ec4ed0c (diff) |
intel/fs: Wrap FS payload register look-up in a helper function.
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_fs.cpp')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 893a7e2e526..18bcdc4f8b3 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -1075,7 +1075,7 @@ fs_visitor::emit_fragcoord_interpolation(fs_reg wpos) /* gl_FragCoord.z */ if (devinfo->gen >= 6) { - bld.MOV(wpos, fs_reg(brw_vec8_grf(payload.source_depth_reg, 0))); + bld.MOV(wpos, fetch_payload_reg(bld, payload.source_depth_reg)); } else { bld.emit(FS_OPCODE_LINTERP, wpos, this->delta_xy[BRW_BARYCENTRIC_PERSPECTIVE_PIXEL], @@ -1213,8 +1213,8 @@ fs_visitor::emit_samplepos_setup() * The X, Y sample positions come in as bytes in thread payload. So, read * the positions using vstride=16, width=8, hstride=2. */ - const fs_reg sample_pos_reg = retype(brw_vec8_grf(payload.sample_pos_reg, 0), - BRW_REGISTER_TYPE_W); + const fs_reg sample_pos_reg = + fetch_payload_reg(abld, payload.sample_pos_reg, BRW_REGISTER_TYPE_W); /* Compute gl_SamplePosition.x */ abld.MOV(int_sample_x, subscript(sample_pos_reg, BRW_REGISTER_TYPE_B, 0)); @@ -1331,8 +1331,8 @@ fs_visitor::emit_samplemaskin_setup() fs_reg *reg = new(this->mem_ctx) fs_reg(vgrf(glsl_type::int_type)); - fs_reg coverage_mask(retype(brw_vec8_grf(payload.sample_mask_in_reg, 0), - BRW_REGISTER_TYPE_D)); + fs_reg coverage_mask = + fetch_payload_reg(bld, payload.sample_mask_in_reg, BRW_REGISTER_TYPE_D); if (wm_prog_data->persample_dispatch) { /* gl_SampleMaskIn[] comes from two sources: the input coverage mask, |