summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer/common
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-05-17 17:26:27 -0600
committerTim Rowley <[email protected]>2016-05-24 13:29:21 -0500
commitdc34479b8c610314076b5c19cdeded8180c7beb4 (patch)
tree4744ae95ec5c2fb11fbf58bb9c86b752effd7c0d /src/gallium/drivers/swr/rasterizer/common
parent3074a2b4facf5c51e82f3b9511089386193f988a (diff)
swr: [rasterizer core] buckets fixes
1. Don't clear bucket descriptions to fix issues with sim level buckets getting out of sync. 2. Close out threadviz file descriptors in ClearThreads(). 3. Skip buckets for jitter based buckets when multithreaded. We need thread local storage through llvm jit functions to be fixed before we can enable this. 4. Fix buckets StopCapture to correctly detect capture complete. Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/common')
-rw-r--r--src/gallium/drivers/swr/rasterizer/common/rdtsc_buckets.cpp1
-rw-r--r--src/gallium/drivers/swr/rasterizer/common/rdtsc_buckets.h13
2 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/common/rdtsc_buckets.cpp b/src/gallium/drivers/swr/rasterizer/common/rdtsc_buckets.cpp
index 8df5deb3416..412182f22aa 100644
--- a/src/gallium/drivers/swr/rasterizer/common/rdtsc_buckets.cpp
+++ b/src/gallium/drivers/swr/rasterizer/common/rdtsc_buckets.cpp
@@ -175,6 +175,7 @@ void BucketManager::DumpThreadViz()
{
fflush(thread.vizFile);
fclose(thread.vizFile);
+ thread.vizFile = nullptr;
}
mThreadMutex.unlock();
diff --git a/src/gallium/drivers/swr/rasterizer/common/rdtsc_buckets.h b/src/gallium/drivers/swr/rasterizer/common/rdtsc_buckets.h
index 95841163155..fe25e77832e 100644
--- a/src/gallium/drivers/swr/rasterizer/common/rdtsc_buckets.h
+++ b/src/gallium/drivers/swr/rasterizer/common/rdtsc_buckets.h
@@ -53,6 +53,17 @@ public:
void ClearThreads()
{
mThreadMutex.lock();
+ // close out the threadviz files if threadviz is enabled
+ if (KNOB_BUCKETS_ENABLE_THREADVIZ)
+ {
+ for (auto& thread : mThreads)
+ {
+ if (thread.vizFile != nullptr)
+ {
+ fclose(thread.vizFile);
+ }
+ }
+ }
mThreads.clear();
mThreadMutex.unlock();
}
@@ -99,7 +110,7 @@ public:
stillCapturing = false;
for (const BUCKET_THREAD& t : mThreads)
{
- if (t.pCurrent != &t.root)
+ if (t.level > 0)
{
stillCapturing = true;
continue;