summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorTim Rowley <timothy.o.rowley@intel.com>2016-10-13 20:57:05 -0500
committerTim Rowley <timothy.o.rowley@intel.com>2016-10-13 23:39:14 -0500
commita42c22fdbfcdd0d24a51e1575f2e1f3340bfbeda (patch)
treebc448918505fa90ca1667e3804a696c5c30057d2 /src/gallium/drivers
parent29d07480b8e7b8e5529e6a824b7d99e9677a1816 (diff)
downloadexternal_mesa3d-a42c22fdbfcdd0d24a51e1575f2e1f3340bfbeda.zip
external_mesa3d-a42c22fdbfcdd0d24a51e1575f2e1f3340bfbeda.tar.gz
external_mesa3d-a42c22fdbfcdd0d24a51e1575f2e1f3340bfbeda.tar.bz2
swr: [rasterizer core] don't construct pArContext on non-ar builds
Stops debug directory being created on non-ar builds. Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/api.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp
index 119dbde..2269240 100644
--- a/src/gallium/drivers/swr/rasterizer/core/api.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/api.cpp
@@ -112,9 +112,11 @@ HANDLE SwrCreateContext(
pContext->ppScratch = new uint8_t*[pContext->NumWorkerThreads];
pContext->pStats = new SWR_STATS[pContext->NumWorkerThreads];
+#if KNOB_ENABLE_AR
// Setup ArchRast thread contexts which includes +1 for API thread.
pContext->pArContext = new HANDLE[pContext->NumWorkerThreads+1];
pContext->pArContext[pContext->NumWorkerThreads] = ArchRast::CreateThreadContext();
+#endif
// Allocate scratch space for workers.
///@note We could lazily allocate this but its rather small amount of memory.
@@ -131,8 +133,10 @@ HANDLE SwrCreateContext(
pContext->ppScratch[i] = (uint8_t*)AlignedMalloc(32 * sizeof(KILOBYTE), KNOB_SIMD_WIDTH * 4);
#endif
+#if KNOB_ENABLE_AR
// Initialize worker thread context for ArchRast.
pContext->pArContext[i] = ArchRast::CreateThreadContext();
+#endif
}
// State setup AFTER context is fully initialized
@@ -379,7 +383,9 @@ void SwrDestroyContext(HANDLE hContext)
AlignedFree(pContext->ppScratch[i]);
#endif
+#if KNOB_ENABLE_AR
ArchRast::DestroyThreadContext(pContext->pArContext[i]);
+#endif
}
delete[] pContext->ppScratch;