pan/mdg: Invert the type conditional for load intrinsics

There are now more intrinsics for which nir_type_uint is forced than
where the destination type is used to find the intrinsic type, so
invert the conditional so that nir_type_uint is the default case when
nothing more specific is given.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8264>
This commit is contained in:
Icecream95 2021-01-01 01:59:27 +13:00 committed by Marge Bot
parent 3665855c2e
commit 684e5aa5b8

View file

@ -1517,9 +1517,9 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
/* Get the base type of the intrinsic */
/* TODO: Infer type? Does it matter? */
nir_alu_type t =
(is_ubo || is_global || is_shared || is_kernel) ? nir_type_uint :
(is_interp) ? nir_type_float :
nir_intrinsic_dest_type(instr);
(is_uniform || is_flat) ? nir_intrinsic_dest_type(instr) :
nir_type_uint;
t = nir_alu_type_get_base_type(t);