Mesa (master): ir_to_mesa: Use gl_register_file enum type rather than 'int' .

Kenneth Graunke kwg at kemper.freedesktop.org
Tue Apr 5 15:32:35 PDT 2011


Module: Mesa
Branch: master
Commit: b4dfb7473efd378c51b955a856eaef69312c1f9f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b4dfb7473efd378c51b955a856eaef69312c1f9f

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Apr  5 13:22:30 2011 -0700

ir_to_mesa: Use gl_register_file enum type rather than 'int'.

src_reg already used this; make dst_reg use it too.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/mesa/program/ir_to_mesa.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 6a4e484..107bfc7 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -67,9 +67,9 @@ static int swizzle_for_size(int size);
  */
 class src_reg {
 public:
-   src_reg(int file, int index, const glsl_type *type)
+   src_reg(gl_register_file file, int index, const glsl_type *type)
    {
-      this->file = (gl_register_file) file;
+      this->file = file;
       this->index = index;
       if (type && (type->is_scalar() || type->is_vector() || type->is_matrix()))
 	 this->swizzle = swizzle_for_size(type->vector_elements);
@@ -100,7 +100,7 @@ public:
 
 class dst_reg {
 public:
-   dst_reg(int file, int writemask)
+   dst_reg(gl_register_file file, int writemask)
    {
       this->file = file;
       this->index = 0;
@@ -120,7 +120,7 @@ public:
 
    explicit dst_reg(src_reg reg);
 
-   int file; /**< PROGRAM_* from Mesa */
+   gl_register_file file; /**< PROGRAM_* from Mesa */
    int index; /**< temporary index, VERT_ATTRIB_*, FRAG_ATTRIB_*, etc. */
    int writemask; /**< Bitfield of WRITEMASK_[XYZW] */
    GLuint cond_mask:4;
@@ -130,7 +130,7 @@ public:
 
 src_reg::src_reg(dst_reg reg)
 {
-   this->file = (gl_register_file) reg.file;
+   this->file = reg.file;
    this->index = reg.index;
    this->swizzle = SWIZZLE_XYZW;
    this->negate = 0;



More information about the mesa-commit mailing list