From 762a6333f21fd8606f69db6060027c4522d46678 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 7 Mar 2017 19:54:37 -0800 Subject: nir: Rework conversion opcodes The NIR story on conversion opcodes is a mess. We've had way too many of them, naming is inconsistent, and which ones have explicit sizes was sort-of random. This commit re-organizes things and makes them all consistent: - All non-bool conversion opcodes now have the explicit size in the destination and are named 2. - Integer <-> integer conversion opcodes now only come in i2i and u2u forms (i2u and u2i have been removed) since the only difference between the different integer conversions is whether or not they sign-extend when up-converting. - Boolean conversion opcodes all have the explicit size on the bool and are named 2. Making things consistent also allows nir_type_conversion_op to be moved to nir_opcodes.c and auto-generated using mako. This will make adding int8, int16, and float16 versions much easier when the time comes. Reviewed-by: Eric Anholt --- src/intel/vulkan/anv_nir_lower_input_attachments.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/intel/vulkan') diff --git a/src/intel/vulkan/anv_nir_lower_input_attachments.c b/src/intel/vulkan/anv_nir_lower_input_attachments.c index 244e7ff7ae1..6ed7fafbf01 100644 --- a/src/intel/vulkan/anv_nir_lower_input_attachments.c +++ b/src/intel/vulkan/anv_nir_lower_input_attachments.c @@ -57,7 +57,7 @@ try_lower_input_load(nir_function_impl *impl, nir_intrinsic_instr *load) nir_builder_init(&b, impl); b.cursor = nir_before_instr(&load->instr); - nir_ssa_def *frag_coord = nir_f2i(&b, load_frag_coord(&b)); + nir_ssa_def *frag_coord = nir_f2i32(&b, load_frag_coord(&b)); nir_ssa_def *offset = nir_ssa_for_src(&b, load->src[0], 2); nir_ssa_def *pos = nir_iadd(&b, frag_coord, offset); -- cgit v1.2.3