swr: [rasterizer] added EventHandlerFile contructor
authorGeorge Kyriazis <george.kyriazis@intel.com>
Thu, 20 Oct 2016 16:39:51 +0000 (11:39 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Mon, 31 Oct 2016 14:06:29 +0000 (09:06 -0500)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template

index 6a62f170a839233603468700d40ef816f6fdfa8e..5310bf55b3464342582a7ac2f378d1bd2d96f356 100644 (file)
@@ -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
         }