[Mesa-dev] [PATCH 03/44] i965/fs/nir: Use the nir_src_bit_size helper
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Tue Oct 3 17:15:28 UTC 2017
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
On 05/09/17 16:12, Jason Ekstrand wrote:
> ---
> src/intel/compiler/brw_fs_nir.cpp | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
> index d760946..18c5fc6 100644
> --- a/src/intel/compiler/brw_fs_nir.cpp
> +++ b/src/intel/compiler/brw_fs_nir.cpp
> @@ -3448,9 +3448,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);
> @@ -3955,9 +3953,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);
> @@ -4022,9 +4018,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);
More information about the mesa-dev
mailing list