[Mesa-dev] [PATCH 9/9] nir: s/nir_type_unsigned/nir_type_uint
Matt Turner
mattst88 at gmail.com
Thu Nov 19 03:47:21 PST 2015
On Thu, Nov 19, 2015 at 2:05 AM, Iago Toral Quiroga <itoral at igalia.com> wrote:
> From: Jason Ekstrand <jason.ekstrand at intel.com>
>
> v2: do the same in tgsi_to_nir (Samuel)
>
> v3: added missing cases after rebase (Iago)
>
> Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
> ---
> src/gallium/auxiliary/nir/tgsi_to_nir.c | 2 +-
> src/glsl/nir/glsl_to_nir.cpp | 2 +-
> src/glsl/nir/nir.h | 2 +-
> src/glsl/nir/nir_constant_expressions.py | 2 +-
> src/glsl/nir/nir_opcodes.py | 78 +++++++++++++++---------------
> src/glsl/nir/nir_search.c | 4 +-
> src/mesa/drivers/dri/i965/brw_nir.c | 4 +-
> src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 2 +-
> 8 files changed, 48 insertions(+), 48 deletions(-)
>
> diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
> index 0539cfc..8918240 100644
> --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
> +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
> @@ -295,7 +295,7 @@ ttn_emit_declaration(struct ttn_compile *c)
> type = nir_type_int;
> break;
> case TGSI_RETURN_TYPE_UINT:
> - type = nir_type_unsigned;
> + type = nir_type_uint;
> break;
> case TGSI_RETURN_TYPE_FLOAT:
> default:
> diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
> index e149d73..3455b49 100644
> --- a/src/glsl/nir/glsl_to_nir.cpp
> +++ b/src/glsl/nir/glsl_to_nir.cpp
> @@ -1826,7 +1826,7 @@ nir_visitor::visit(ir_texture *ir)
> instr->dest_type = nir_type_int;
> break;
> case GLSL_TYPE_UINT:
> - instr->dest_type = nir_type_unsigned;
> + instr->dest_type = nir_type_uint;
> break;
> default:
> unreachable("not reached");
> diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
> index e9d722e..7304517 100644
> --- a/src/glsl/nir/nir.h
> +++ b/src/glsl/nir/nir.h
> @@ -633,7 +633,7 @@ typedef enum {
> nir_type_invalid = 0, /* Not a valid type */
> nir_type_float,
> nir_type_int,
> - nir_type_unsigned,
> + nir_type_uint,
> nir_type_bool
> } nir_alu_type;
>
> diff --git a/src/glsl/nir/nir_constant_expressions.py b/src/glsl/nir/nir_constant_expressions.py
> index 2ba8554..b16ef50 100644
> --- a/src/glsl/nir/nir_constant_expressions.py
> +++ b/src/glsl/nir/nir_constant_expressions.py
> @@ -213,7 +213,7 @@ unpack_half_1x16(uint16_t u)
> }
>
> /* Some typed vector structures to make things like src0.y work */
> -% for type in ["float", "int", "unsigned", "bool"]:
> +% for type in ["float", "int", "uint", "bool"]:
> struct ${type}_vec {
> ${type} x;
> ${type} y;
> diff --git a/src/glsl/nir/nir_opcodes.py b/src/glsl/nir/nir_opcodes.py
> index 729f695..8db24eb 100644
> --- a/src/glsl/nir/nir_opcodes.py
> +++ b/src/glsl/nir/nir_opcodes.py
> @@ -91,7 +91,7 @@ class Opcode(object):
> tfloat = "float"
> tint = "int"
> tbool = "bool"
> -tunsigned = "unsigned"
> +tuint = "uint"
>
> commutative = "commutative "
> associative = "associative "
> @@ -156,7 +156,7 @@ unop("fsqrt", tfloat, "sqrtf(src0)")
> unop("fexp2", tfloat, "exp2f(src0)")
> unop("flog2", tfloat, "log2f(src0)")
> unop_convert("f2i", tfloat, tint, "src0") # Float-to-integer conversion.
> -unop_convert("f2u", tfloat, tunsigned, "src0") # Float-to-unsigned conversion
> +unop_convert("f2u", tfloat, tuint, "src0") # Float-to-unsigned conversion
> unop_convert("i2f", tint, tfloat, "src0") # Integer-to-float conversion.
> # Float-to-boolean conversion
> unop_convert("f2b", tfloat, tbool, "src0 != 0.0f")
> @@ -165,7 +165,7 @@ unop_convert("b2f", tbool, tfloat, "src0 ? 1.0f : 0.0f")
> # Int-to-boolean conversion
> unop_convert("i2b", tint, tbool, "src0 != 0")
> unop_convert("b2i", tbool, tint, "src0 ? 1 : 0") # Boolean-to-int conversion
> -unop_convert("u2f", tunsigned, tfloat, "src0") #Unsigned-to-float conversion.
> +unop_convert("u2f", tuint, tfloat, "src0") #Unsigned-to-float conversion.
While you're modifying this line, could you put a space after the # ?
Reviewed-by: Matt Turner <mattst88 at gmail.com>
More information about the mesa-dev
mailing list