[Mesa-dev] [PATCH 12/15] i965/vec4: Pass argument by reference to src_reg/dst_reg conversion constructors.

Francisco Jerez currojerez at riseup.net
Fri Mar 20 07:11:48 PDT 2015


---
 src/mesa/drivers/dri/i965/brw_ir_vec4.h | 4 ++--
 src/mesa/drivers/dri/i965/brw_vec4.cpp  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_ir_vec4.h b/src/mesa/drivers/dri/i965/brw_ir_vec4.h
index 0181961..73ffa00 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_vec4.h
@@ -53,7 +53,7 @@ public:
    src_reg(class vec4_visitor *v, const struct glsl_type *type);
    src_reg(class vec4_visitor *v, const struct glsl_type *type, int size);
 
-   explicit src_reg(dst_reg reg);
+   explicit src_reg(const dst_reg &reg);
 
    unsigned swizzle; /**< BRW_SWIZZLE_XYZW macros from brw_reg.h. */
 
@@ -120,7 +120,7 @@ public:
    dst_reg(struct brw_reg reg);
    dst_reg(class vec4_visitor *v, const struct glsl_type *type);
 
-   explicit dst_reg(src_reg reg);
+   explicit dst_reg(const src_reg &reg);
 
    bool equals(const dst_reg &r) const;
 
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 69e80f2..6ebac50 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -123,7 +123,7 @@ src_reg::src_reg(struct brw_reg reg)
    this->type = reg.type;
 }
 
-src_reg::src_reg(dst_reg reg)
+src_reg::src_reg(const dst_reg &reg)
 {
    init();
 
@@ -194,7 +194,7 @@ dst_reg::dst_reg(struct brw_reg reg)
    this->type = reg.type;
 }
 
-dst_reg::dst_reg(src_reg reg)
+dst_reg::dst_reg(const src_reg &reg)
 {
    init();
 
-- 
2.1.3



More information about the mesa-dev mailing list