summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/builder.cpp3
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/builder.h10
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp5
3 files changed, 15 insertions, 3 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder.cpp
index 1b03d1c0709..9f9438de1d8 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/builder.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder.cpp
@@ -39,7 +39,8 @@ namespace SwrJit
/// @brief Contructor for Builder.
/// @param pJitMgr - JitManager which contains modules, function passes, etc.
Builder::Builder(JitManager *pJitMgr)
- : mpJitMgr(pJitMgr)
+ : mpJitMgr(pJitMgr),
+ mpPrivateContext(nullptr)
{
SWR_ASSERT(pJitMgr->mVWidth == 8);
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder.h b/src/gallium/drivers/swr/rasterizer/jitter/builder.h
index 788c5b23aa6..763d29fdf65 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/builder.h
+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder.h
@@ -97,6 +97,16 @@ namespace SwrJit
#include "builder_mem.h"
protected:
+
+ void SetPrivateContext(Value* pPrivateContext)
+ {
+ mpPrivateContext = pPrivateContext;
+ NotifyPrivateContextSet();
+ }
+ virtual void NotifyPrivateContextSet() {}
+ inline Value* GetPrivateContext() { return mpPrivateContext; }
+
+ private:
Value* mpPrivateContext;
};
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
index 4f56bda83df..9bb62976f60 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
@@ -148,8 +148,9 @@ Function* FetchJit::Create(const FETCH_COMPILE_STATE& fetchState)
auto argitr = fetch->arg_begin();
// Fetch shader arguments
- mpPrivateContext = &*argitr; ++argitr;
- mpPrivateContext->setName("privateContext");
+ Value* privateContext = &*argitr; ++argitr;
+ privateContext->setName("privateContext");
+ SetPrivateContext(privateContext);
mpFetchInfo = &*argitr; ++argitr;
mpFetchInfo->setName("fetchInfo");