Mesa (master): swr: [rasterizer archrast] Fix archrast for MSVC 2017 compiler

Tim Rowley torowley at kemper.freedesktop.org
Tue Apr 11 23:11:45 UTC 2017


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

Author: Tim Rowley <timothy.o.rowley at intel.com>
Date:   Fri Apr  7 11:41:25 2017 -0500

swr: [rasterizer archrast] Fix archrast for MSVC 2017 compiler

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

---

 src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp              | 2 +-
 src/gallium/drivers/swr/rasterizer/archrast/archrast.h                | 2 +-
 src/gallium/drivers/swr/rasterizer/archrast/eventmanager.h            | 2 +-
 src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_event.cpp | 2 +-
 src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_event.hpp | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp
index a7d41e27c0..cda161246b 100644
--- a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp
+++ b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp
@@ -298,7 +298,7 @@ namespace ArchRast
     }
 
     // Dispatch event for this thread.
-    void Dispatch(HANDLE hThreadContext, Event& event)
+    void Dispatch(HANDLE hThreadContext, const Event& event)
     {
         EventManager* pManager = FromHandle(hThreadContext);
         SWR_ASSERT(pManager != nullptr);
diff --git a/src/gallium/drivers/swr/rasterizer/archrast/archrast.h b/src/gallium/drivers/swr/rasterizer/archrast/archrast.h
index 1b81e6e952..fa88a4948c 100644
--- a/src/gallium/drivers/swr/rasterizer/archrast/archrast.h
+++ b/src/gallium/drivers/swr/rasterizer/archrast/archrast.h
@@ -42,7 +42,7 @@ namespace ArchRast
     void DestroyThreadContext(HANDLE hThreadContext);
 
     // Dispatch event for this thread.
-    void Dispatch(HANDLE hThreadContext, Event& event);
+    void Dispatch(HANDLE hThreadContext, const Event& event);
     void FlushDraw(HANDLE hThreadContext, uint32_t drawId);
 };
 
diff --git a/src/gallium/drivers/swr/rasterizer/archrast/eventmanager.h b/src/gallium/drivers/swr/rasterizer/archrast/eventmanager.h
index 44f75e4441..c251daf036 100644
--- a/src/gallium/drivers/swr/rasterizer/archrast/eventmanager.h
+++ b/src/gallium/drivers/swr/rasterizer/archrast/eventmanager.h
@@ -60,7 +60,7 @@ namespace ArchRast
             mHandlers.push_back(pHandler);
         }
 
-        void Dispatch(Event& event)
+        void Dispatch(const Event& event)
         {
             ///@todo Add event filter check here.
 
diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_event.cpp b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_event.cpp
index d48fda61c2..1ecb455c3a 100644
--- a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_event.cpp
+++ b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_event.cpp
@@ -37,7 +37,7 @@
 using namespace ArchRast;
 % for name in protos['event_names']:
 
-void ${name}::Accept(EventHandler* pHandler)
+void ${name}::Accept(EventHandler* pHandler) const
 {
     pHandler->Handle(*this);
 }
diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_event.hpp b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_event.hpp
index e792f5f63e..685a10b386 100644
--- a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_event.hpp
+++ b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_ar_event.hpp
@@ -57,7 +57,7 @@ namespace ArchRast
         Event() {}
         virtual ~Event() {}
 
-        virtual void Accept(EventHandler* pHandler) = 0;
+        virtual void Accept(EventHandler* pHandler) const = 0;
     };
 % for name in protos['event_names']:
 
@@ -102,7 +102,7 @@ namespace ArchRast
         % endfor
         }
 
-        virtual void Accept(EventHandler* pHandler);
+        virtual void Accept(EventHandler* pHandler) const;
     };
 % endfor
 }
\ No newline at end of file




More information about the mesa-commit mailing list