[Mesa-dev] [PATCH 13/19] i965/fs: Make fs_visitor::emit take a constant reference to an fs_inst.

Matt Turner mattst88 at gmail.com
Thu Feb 20 13:41:26 PST 2014


It makes a copy internally, so making a second copy is unnecessary.
---
 src/mesa/drivers/dri/i965/brw_fs.h           | 2 +-
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index da4ef2a..fe063e6 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -269,7 +269,7 @@ public:
 
    bool can_do_source_mods(fs_inst *inst);
 
-   fs_inst *emit(fs_inst inst);
+   fs_inst *emit(const fs_inst &inst);
    fs_inst *emit(fs_inst *inst);
    void emit(exec_list list);
 
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 0c376a7..b28d7aa 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -2439,7 +2439,7 @@ fs_visitor::emit_untyped_surface_read(unsigned surf_index, fs_reg dst,
 }
 
 fs_inst *
-fs_visitor::emit(fs_inst inst)
+fs_visitor::emit(const fs_inst &inst)
 {
    fs_inst *list_inst = new(mem_ctx) fs_inst;
    *list_inst = inst;
-- 
1.8.3.2



More information about the mesa-dev mailing list