From: Bas Nieuwenhuizen Date: Sat, 12 May 2018 23:17:23 +0000 (+0200) Subject: radeonsi: Remove deref chain support in nir scan pass. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=67df3739c599d85c01681a278ae3b34284af5735;p=mesa.git radeonsi: Remove deref chain support in nir scan pass. Acked-by: Rob Clark Acked-by: Bas Nieuwenhuizen Acked-by: Dave Airlie --- diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 21551a76d6b..c46d0ab5a82 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -34,9 +34,6 @@ static nir_variable* tex_get_texture_var(nir_tex_instr *instr) { - if (instr->texture) - return instr->texture->var; - for (unsigned i = 0; i < instr->num_srcs; i++) { switch (instr->src[i].src_type) { case nir_tex_src_texture_deref: @@ -51,9 +48,6 @@ static nir_variable* tex_get_texture_var(nir_tex_instr *instr) static nir_variable* intrinsic_get_var(nir_intrinsic_instr *instr) { - if (instr->variables[0]) - return instr->variables[0]->var; - return nir_deref_instr_get_variable(nir_src_as_deref(instr->src[0])); } @@ -149,9 +143,6 @@ static void scan_instruction(struct tgsi_shader_info *info, case nir_intrinsic_load_tess_level_outer: info->reads_tess_factors = true; break; - case nir_intrinsic_image_var_load: - case nir_intrinsic_image_var_size: - case nir_intrinsic_image_var_samples: case nir_intrinsic_image_deref_load: case nir_intrinsic_image_deref_size: case nir_intrinsic_image_deref_samples: { @@ -161,15 +152,6 @@ static void scan_instruction(struct tgsi_shader_info *info, break; } - case nir_intrinsic_image_var_store: - case nir_intrinsic_image_var_atomic_add: - case nir_intrinsic_image_var_atomic_min: - case nir_intrinsic_image_var_atomic_max: - case nir_intrinsic_image_var_atomic_and: - case nir_intrinsic_image_var_atomic_or: - case nir_intrinsic_image_var_atomic_xor: - case nir_intrinsic_image_var_atomic_exchange: - case nir_intrinsic_image_var_atomic_comp_swap: case nir_intrinsic_image_deref_store: case nir_intrinsic_image_deref_atomic_add: case nir_intrinsic_image_deref_atomic_min: @@ -198,7 +180,6 @@ static void scan_instruction(struct tgsi_shader_info *info, case nir_intrinsic_ssbo_atomic_comp_swap: info->writes_memory = true; break; - case nir_intrinsic_load_var: case nir_intrinsic_load_deref: { nir_variable *var = intrinsic_get_var(intr); nir_variable_mode mode = var->data.mode; @@ -233,9 +214,6 @@ static void scan_instruction(struct tgsi_shader_info *info, } break; } - case nir_intrinsic_interp_var_at_centroid: - case nir_intrinsic_interp_var_at_sample: - case nir_intrinsic_interp_var_at_offset: case nir_intrinsic_interp_deref_at_centroid: case nir_intrinsic_interp_deref_at_sample: case nir_intrinsic_interp_deref_at_offset: { @@ -243,21 +221,17 @@ static void scan_instruction(struct tgsi_shader_info *info, switch (interp) { case INTERP_MODE_SMOOTH: case INTERP_MODE_NONE: - if (intr->intrinsic == nir_intrinsic_interp_var_at_centroid || - intr->intrinsic == nir_intrinsic_interp_deref_at_centroid) + if (intr->intrinsic == nir_intrinsic_interp_deref_at_centroid) info->uses_persp_opcode_interp_centroid = true; - else if (intr->intrinsic == nir_intrinsic_interp_var_at_sample || - intr->intrinsic == nir_intrinsic_interp_deref_at_sample) + else if (intr->intrinsic == nir_intrinsic_interp_deref_at_sample) info->uses_persp_opcode_interp_sample = true; else info->uses_persp_opcode_interp_offset = true; break; case INTERP_MODE_NOPERSPECTIVE: - if (intr->intrinsic == nir_intrinsic_interp_var_at_centroid || - intr->intrinsic == nir_intrinsic_interp_deref_at_centroid) + if (intr->intrinsic == nir_intrinsic_interp_deref_at_centroid) info->uses_linear_opcode_interp_centroid = true; - else if (intr->intrinsic == nir_intrinsic_interp_var_at_sample || - intr->intrinsic == nir_intrinsic_interp_deref_at_sample) + else if (intr->intrinsic == nir_intrinsic_interp_deref_at_sample) info->uses_linear_opcode_interp_sample = true; else info->uses_linear_opcode_interp_offset = true;