Mesa (master): intel/fs: Move the scalar-region conversion to the generator.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Apr 22 23:56:26 UTC 2019
Module: Mesa
Branch: master
Commit: c0504569eac5e5c305e9f0c240e248aca9d8891f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c0504569eac5e5c305e9f0c240e248aca9d8891f
Author: Rafael Antognolli <rafael.antognolli at intel.com>
Date: Fri Oct 19 15:44:15 2018 -0700
intel/fs: Move the scalar-region conversion to the generator.
Move the scalar-region conversion from the IR to the generator, so it
doesn't affect the Gen11 path. We need the non-scalar regioning
for a later lowering pass that we are adding.
v2: Better commit message (Matt)
Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
src/intel/compiler/brw_fs.cpp | 2 +-
src/intel/compiler/brw_fs_generator.cpp | 2 +-
src/intel/compiler/brw_fs_nir.cpp | 4 ++--
src/intel/compiler/brw_fs_visitor.cpp | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index e5ec2cbc450..8d72eb8837d 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -1211,7 +1211,7 @@ fs_visitor::emit_fragcoord_interpolation(fs_reg wpos)
} else {
bld.emit(FS_OPCODE_LINTERP, wpos,
this->delta_xy[BRW_BARYCENTRIC_PERSPECTIVE_PIXEL],
- component(interp_reg(VARYING_SLOT_POS, 2), 0));
+ interp_reg(VARYING_SLOT_POS, 2));
}
wpos = offset(wpos, bld, 1);
diff --git a/src/intel/compiler/brw_fs_generator.cpp b/src/intel/compiler/brw_fs_generator.cpp
index 05283f54112..d6a0f2368b8 100644
--- a/src/intel/compiler/brw_fs_generator.cpp
+++ b/src/intel/compiler/brw_fs_generator.cpp
@@ -818,7 +818,7 @@ fs_generator::generate_linterp(fs_inst *inst,
*/
struct brw_reg delta_x = src[0];
struct brw_reg delta_y = offset(src[0], inst->exec_size / 8);
- struct brw_reg interp = src[1];
+ struct brw_reg interp = stride(src[1], 0, 1, 0);
brw_inst *i[4];
if (devinfo->gen >= 11) {
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index c306d5ca2ba..59d9926606b 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -3612,8 +3612,8 @@ fs_visitor::nir_emit_fs_intrinsic(const fs_builder &bld,
for (unsigned int i = 0; i < instr->num_components; i++) {
fs_reg interp =
- component(interp_reg(nir_intrinsic_base(instr),
- nir_intrinsic_component(instr) + i), 0);
+ interp_reg(nir_intrinsic_base(instr),
+ nir_intrinsic_component(instr) + i);
interp.type = BRW_REGISTER_TYPE_F;
dest.type = BRW_REGISTER_TYPE_F;
diff --git a/src/intel/compiler/brw_fs_visitor.cpp b/src/intel/compiler/brw_fs_visitor.cpp
index 232693cec78..af9f803fb68 100644
--- a/src/intel/compiler/brw_fs_visitor.cpp
+++ b/src/intel/compiler/brw_fs_visitor.cpp
@@ -194,7 +194,7 @@ fs_visitor::emit_interpolation_setup_gen4()
*/
this->wpos_w = vgrf(glsl_type::float_type);
abld.emit(FS_OPCODE_LINTERP, wpos_w, delta_xy,
- component(interp_reg(VARYING_SLOT_POS, 3), 0));
+ interp_reg(VARYING_SLOT_POS, 3));
/* Compute the pixel 1/W value from wpos.w. */
this->pixel_w = vgrf(glsl_type::float_type);
abld.emit(SHADER_OPCODE_RCP, this->pixel_w, wpos_w);
More information about the mesa-commit
mailing list