From: Kenneth Graunke Date: Tue, 5 Apr 2011 20:22:30 +0000 (-0700) Subject: ir_to_mesa: Use gl_register_file enum type rather than 'int'. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b4dfb7473efd378c51b955a856eaef69312c1f9f;p=mesa.git 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 --- diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 6a4e48417c1..107bfc7957e 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;