summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kyriazis <george.kyriazis@intel.com>2016-10-20 11:39:51 -0500
committerTim Rowley <timothy.o.rowley@intel.com>2016-10-31 09:06:29 -0500
commit55fb8743764a3172e5cbdd4cbcf1c7d9f6a9a529 (patch)
tree564c85700fe6cecad3fe6d016c995f52fbb5142b
parent0a5811b0f381e8920536a19bab4d437d5bdb5b63 (diff)
swr: [rasterizer] added EventHandlerFile contructor
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
-rw-r--r--src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template7
1 files changed, 6 insertions, 1 deletions
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 6a62f170a83..5310bf55b34 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
@@ -60,7 +60,12 @@ namespace ArchRast
sprintf(buf, "%s\\ar_event%d_%d.bin", outDir.str().c_str(), GetCurrentThreadId(), id);
mFilename = std::string(buf);
#else
- SWR_ASSERT(0);
+ char buf[255];
+ // There could be multiple threads creating thread pools. We
+ // want to make sure they are uniquly identified by adding in
+ // the creator's thread id into the filename.
+ sprintf(buf, "%s/ar_event%d_%d.bin", "/tmp", GetCurrentThreadId(), id);
+ mFilename = std::string(buf);
#endif
}