[Mesa-dev] [PATCH 5/5] swr: [rasterizer] added EventHandlerFile contructor
Cherniak, Bruce
bruce.cherniak at intel.com
Thu Oct 27 15:57:03 UTC 2016
Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
> On Oct 26, 2016, at 7:08 PM, George Kyriazis <george.kyriazis at intel.com> wrote:
>
> ---
> .../rasterizer/scripts/templates/ar_eventhandlerfile_h.template | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> 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 6a62f17..5310bf5 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
> }
>
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list