Mesa (master): swr: [rasterizer archrast] move to pass by value

Tim Rowley torowley at kemper.freedesktop.org
Mon Nov 14 15:35:40 UTC 2016


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

Author: Tim Rowley <timothy.o.rowley at intel.com>
Date:   Wed Nov  9 17:29:00 2016 -0600

swr: [rasterizer archrast] move to pass by value

Move to pass by value since most events are very small in size.

We can look at pass by reference but will need to create multiple
versions to handle temp objects.

Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>

---

 .../drivers/swr/rasterizer/scripts/templates/ar_eventhandler_h.template | 2 +-
 .../swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandler_h.template b/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandler_h.template
index abde3c0..dd4e2f5 100644
--- a/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandler_h.template
+++ b/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandler_h.template
@@ -43,7 +43,7 @@ namespace ArchRast
         virtual ~EventHandler() {}
 
 % for name in protos['event_names']:
-        virtual void Handle(${name}&& event) {}
+        virtual void Handle(${name} event) {}
 % endfor
     };
 }
diff --git a/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template b/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template
index ada134d..87674bf 100644
--- a/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template
+++ b/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template
@@ -128,7 +128,7 @@ namespace ArchRast
 % for name in protos['event_names']:
         //////////////////////////////////////////////////////////////////////////
         /// @brief Handle ${name} event
-        virtual void Handle(${name}&& event)
+        virtual void Handle(${name} event)
         {
 % if protos['events'][name]['num_fields'] == 0:
             Write(${protos['events'][name]['event_id']}, (char*)&event.data, 0);




More information about the mesa-commit mailing list