diff options
author | Jason Ekstrand <[email protected]> | 2019-04-01 21:31:26 -0500 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2019-04-14 22:25:56 +0200 |
commit | 9b1e4bab6bb3be7a5dad910b10a28db0a4bb8b5f (patch) | |
tree | c0a17e60f0f182dfcace2f4ac315a4074447049a /src/intel | |
parent | daaf777376303077f9fd4c72e602b8892fe1caaf (diff) |
nir/builder: Add a nir_imm_zero helper
v2: replace nir_zero_vec with nir_imm_zero (Karol Herbst)
Reviewed-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/compiler/brw_nir_lower_image_load_store.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/intel/compiler/brw_nir_lower_image_load_store.c b/src/intel/compiler/brw_nir_lower_image_load_store.c index 48b98bc57bd..c23f64fb338 100644 --- a/src/intel/compiler/brw_nir_lower_image_load_store.c +++ b/src/intel/compiler/brw_nir_lower_image_load_store.c @@ -313,15 +313,6 @@ get_format_info(enum isl_format fmt) } static nir_ssa_def * -nir_zero_vec(nir_builder *b, unsigned num_components) -{ - nir_const_value v; - memset(&v, 0, sizeof(v)); - - return nir_build_imm(b, num_components, 32, v); -} - -static nir_ssa_def * convert_color_for_load(nir_builder *b, const struct gen_device_info *devinfo, nir_ssa_def *color, enum isl_format image_fmt, enum isl_format lower_fmt, @@ -498,7 +489,7 @@ lower_image_load_instr(nir_builder *b, nir_push_else(b, NULL); - nir_ssa_def *zero = nir_zero_vec(b, load->num_components); + nir_ssa_def *zero = nir_imm_zero(b, load->num_components, 32); nir_pop_if(b, NULL); |