tgsi: use enums instead of unsigned in ureg code
authorBrian Paul <brianp@vmware.com>
Thu, 26 Apr 2018 17:55:16 +0000 (11:55 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 1 May 2018 03:13:53 +0000 (21:13 -0600)
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_ureg.c
src/gallium/auxiliary/tgsi/tgsi_ureg.h

index 393e01500173bd83a630d1956148888b56b98216..7d2b9af140d998fc0d03bccc849c1b1252eee13c 100644 (file)
@@ -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)
 {
index 7eef94a65e9c8b319a3cd0d8398877ba4fc31aa1..ac46da55080be4ef78838c4a81ea18d32388ff8c 100644 (file)
@@ -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,