[Mesa-dev] [PATCH 02/95] i965/vec4/nir: simplify glsl_type_for_nir_alu_type()
Francisco Jerez
currojerez at riseup.net
Tue Jul 26 02:15:13 UTC 2016
Iago Toral Quiroga <itoral at igalia.com> writes:
> From: Connor Abbott <connor.w.abbott at intel.com>
>
> Less duplication, one one less case to handle for doubles and support
> for sized NIR types.
>
> v2: Fix call to get_instance by swapping rows and columns params (Iago)
>
> Signed-off-by: Iago Toral Quiroga <itoral at igalia.com>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
> ---
> src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 16 ++--------------
> 1 file changed, 2 insertions(+), 14 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> index f3b4528..6662a1e 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> @@ -1696,20 +1696,8 @@ const glsl_type *
> glsl_type_for_nir_alu_type(nir_alu_type alu_type,
> unsigned components)
> {
> - switch (alu_type) {
> - case nir_type_float:
> - return glsl_type::vec(components);
> - case nir_type_int:
> - return glsl_type::ivec(components);
> - case nir_type_uint:
> - return glsl_type::uvec(components);
> - case nir_type_bool:
> - return glsl_type::bvec(components);
> - default:
> - return glsl_type::error_type;
> - }
> -
> - return glsl_type::error_type;
> + return glsl_type::get_instance(brw_glsl_base_type_for_nir_type(alu_type),
> + components, 1);
> }
>
> void
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160725/2b623aae/attachment.sig>
More information about the mesa-dev
mailing list