From: George Kyriazis Date: Thu, 20 Oct 2016 16:39:51 +0000 (-0500) Subject: swr: [rasterizer] added EventHandlerFile contructor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=55fb8743764a3172e5cbdd4cbcf1c7d9f6a9a529;p=mesa.git swr: [rasterizer] added EventHandlerFile contructor Reviewed-by: Bruce Cherniak --- 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 }