From 07326d4006245be761469a58e4dd41ef378f6c25 Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Wed, 5 Oct 2016 13:45:12 -0500 Subject: swr: [rasterizer archrast] add mako template Add template for generating code to save events to a file. Signed-off-by: Tim Rowley --- src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/swr/rasterizer/archrast') diff --git a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp index 48dec28a105..b1c5134caf1 100644 --- a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp +++ b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp @@ -25,9 +25,12 @@ * @brief Definitions for archrast. * ******************************************************************************/ +#include + #include "common/os.h" #include "archrast/archrast.h" #include "archrast/eventmanager.h" +#include "gen_ar_eventhandlerfile.h" namespace ArchRast { @@ -39,8 +42,12 @@ namespace ArchRast // Construct an event manager and associate a handler with it. HANDLE CreateThreadContext() { + // Can we assume single threaded here? + static std::atomic counter(0); + uint32_t id = counter.fetch_add(1); + EventManager* pManager = new EventManager(); - EventHandler* pHandler = new EventHandler(); + EventHandler* pHandler = new EventHandlerFile(id); if (pManager && pHandler) { -- cgit v1.2.3