summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer/archrast
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-10-05 13:45:12 -0500
committerTim Rowley <[email protected]>2016-10-11 11:22:04 -0500
commit07326d4006245be761469a58e4dd41ef378f6c25 (patch)
tree184d6fa82cf3bcb1f7f3894b1b5dbed511d40326 /src/gallium/drivers/swr/rasterizer/archrast
parente845eeb0be89e3dcc62ae43a03f71336c26c40ed (diff)
swr: [rasterizer archrast] add mako template
Add template for generating code to save events to a file. Signed-off-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/archrast')
-rw-r--r--src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp9
1 files changed, 8 insertions, 1 deletions
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 <atomic>
+
#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<uint32_t> 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)
{