[Mesa-dev] [PATCH] tgsi: use enums instead of unsigned in ureg code
Charmaine Lee
charmainel at vmware.com
Mon Apr 30 17:20:32 UTC 2018
Reviewed-by: Charmaine Lee <charmainel at vmware.com>
________________________________________
From: Brian Paul <brianp at vmware.com>
Sent: Monday, April 30, 2018 7:42 AM
To: mesa-dev at lists.freedesktop.org
Cc: Charmaine Lee; Neha Bhende
Subject: [PATCH] tgsi: use enums instead of unsigned in ureg code
---
src/gallium/auxiliary/tgsi/tgsi_ureg.c | 14 +++++++-------
src/gallium/auxiliary/tgsi/tgsi_ureg.h | 10 +++++-----
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 393e015..7d2b9af 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 7eef94a..ac46da5 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,
--
2.7.4
More information about the mesa-dev
mailing list