From: Brian Paul Date: Thu, 26 Apr 2018 17:55:16 +0000 (-0600) Subject: tgsi: use enums instead of unsigned in ureg code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=efec712d515a329dbd20fd867de9601c4d4a0915;p=mesa.git tgsi: use enums instead of unsigned in ureg code Reviewed-by: Charmaine Lee --- diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 393e0150017..7d2b9af140d 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -170,7 +170,7 @@ struct ureg_program struct { unsigned index; enum tgsi_texture_type target; - unsigned format; + enum pipe_format format; boolean wr; boolean raw; } image[PIPE_MAX_SHADER_IMAGES]; @@ -773,7 +773,7 @@ struct ureg_src ureg_DECL_image(struct ureg_program *ureg, unsigned index, enum tgsi_texture_type target, - unsigned format, + enum pipe_format format, boolean wr, boolean raw) { @@ -1363,8 +1363,8 @@ void ureg_emit_memory(struct ureg_program *ureg, unsigned extended_token, unsigned qualifier, - unsigned texture, - unsigned format) + enum tgsi_texture_type texture, + enum pipe_format format) { union tgsi_any_token *out, *insn; @@ -1478,8 +1478,8 @@ ureg_memory_insn(struct ureg_program *ureg, const struct ureg_src *src, unsigned nr_src, unsigned qualifier, - unsigned texture, - unsigned format) + enum tgsi_texture_type texture, + enum pipe_format format) { struct ureg_emit_insn_result insn; unsigned i; @@ -1719,7 +1719,7 @@ static void emit_decl_image(struct ureg_program *ureg, unsigned index, enum tgsi_texture_type target, - unsigned format, + enum pipe_format format, boolean wr, boolean raw) { diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h index 7eef94a65e9..ac46da55080 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h @@ -372,7 +372,7 @@ struct ureg_src ureg_DECL_image(struct ureg_program *ureg, unsigned index, enum tgsi_texture_type target, - unsigned format, + enum pipe_format format, boolean wr, boolean raw); @@ -579,8 +579,8 @@ ureg_memory_insn(struct ureg_program *ureg, const struct ureg_src *src, unsigned nr_src, unsigned qualifier, - unsigned texture, - unsigned format); + enum tgsi_texture_type texture, + enum pipe_format format); /*********************************************************************** * Internal instruction helpers, don't call these directly: @@ -619,8 +619,8 @@ void ureg_emit_memory(struct ureg_program *ureg, unsigned insn_token, unsigned qualifier, - unsigned texture, - unsigned format); + enum tgsi_texture_type texture, + enum pipe_format format); void ureg_emit_dst( struct ureg_program *ureg,