diff options
author | Jason Ekstrand <[email protected]> | 2017-08-26 09:50:01 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-10-25 16:14:09 -0700 |
commit | 99778e7f9f874f132ec9ddace3e91714e42e690f (patch) | |
tree | d3e84decfb98652854e3e807250991af937e765a /src/intel | |
parent | fa6e74e33e5bc5f6fba8f9de76b8b059515e708f (diff) |
i965/fs/nir: Use the nir_src_bit_size helper
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/compiler/brw_fs_nir.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index cc098849bed..a58e41fb287 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -3458,9 +3458,7 @@ fs_visitor::nir_emit_cs_intrinsic(const fs_builder &bld, * expected by our 32-bit write messages. */ unsigned type_size = 4; - unsigned bit_size = instr->src[0].is_ssa ? - instr->src[0].ssa->bit_size : instr->src[0].reg.reg->bit_size; - if (bit_size == 64) { + if (nir_src_bit_size(instr->src[0]) == 64) { type_size = 8; fs_reg tmp = fs_reg(VGRF, alloc.allocate(alloc.sizes[val_reg.nr]), val_reg.type); @@ -3965,9 +3963,7 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr * expected by our 32-bit write messages. */ unsigned type_size = 4; - unsigned bit_size = instr->src[0].is_ssa ? - instr->src[0].ssa->bit_size : instr->src[0].reg.reg->bit_size; - if (bit_size == 64) { + if (nir_src_bit_size(instr->src[0]) == 64) { type_size = 8; fs_reg tmp = fs_reg(VGRF, alloc.allocate(alloc.sizes[val_reg.nr]), val_reg.type); @@ -4032,9 +4028,7 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr unsigned num_components = instr->num_components; unsigned first_component = nir_intrinsic_component(instr); - unsigned bit_size = instr->src[0].is_ssa ? - instr->src[0].ssa->bit_size : instr->src[0].reg.reg->bit_size; - if (bit_size == 64) { + if (nir_src_bit_size(instr->src[0]) == 64) { fs_reg tmp = fs_reg(VGRF, alloc.allocate(2 * num_components), BRW_REGISTER_TYPE_F); |