Mesa (master): i965/fs: Use num_components from the SSA def in image intrinsics

Jason Ekstrand jekstrand at kemper.freedesktop.org
Tue Mar 14 15:56:36 UTC 2017


Module: Mesa
Branch: master
Commit: b377be921324a1841027e68eac7d1b64c8e65bbd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b377be921324a1841027e68eac7d1b64c8e65bbd

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Thu Mar  2 21:39:58 2017 -0800

i965/fs: Use num_components from the SSA def in image intrinsics

Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>

---

 src/intel/compiler/brw_fs_nir.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index d403dec..b392895 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -3759,8 +3759,7 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
                   type->sampler_array;
 
       /* Copy all the components. */
-      const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
-      for (unsigned c = 0; c < info->dest_components; ++c) {
+      for (unsigned c = 0; c < instr->dest.ssa.num_components; ++c) {
          if ((int)c >= type->coordinate_components()) {
              bld.MOV(offset(retype(dest, BRW_REGISTER_TYPE_D), bld, c),
                      brw_imm_d(1));




More information about the mesa-commit mailing list