mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
swr: [rasterizer jitter] Pass LLVM-IR size into jitter
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
parent
e0a829d320
commit
c1aa444a3e
3 changed files with 4 additions and 3 deletions
|
|
@ -190,9 +190,9 @@ void JitManager::SetupNewModule()
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Create new LLVM module from IR.
|
/// @brief Create new LLVM module from IR.
|
||||||
bool JitManager::SetupModuleFromIR(const uint8_t *pIR)
|
bool JitManager::SetupModuleFromIR(const uint8_t *pIR, size_t length)
|
||||||
{
|
{
|
||||||
std::unique_ptr<MemoryBuffer> pMem = MemoryBuffer::getMemBuffer(StringRef((const char*)pIR), "");
|
std::unique_ptr<MemoryBuffer> pMem = MemoryBuffer::getMemBuffer(StringRef((const char*)pIR, length), "");
|
||||||
|
|
||||||
SMDiagnostic Err;
|
SMDiagnostic Err;
|
||||||
std::unique_ptr<Module> newModule = parseIR(pMem.get()->getMemBufferRef(), Err, mContext);
|
std::unique_ptr<Module> newModule = parseIR(pMem.get()->getMemBufferRef(), Err, mContext);
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ struct JitManager
|
||||||
std::string mCore;
|
std::string mCore;
|
||||||
|
|
||||||
void SetupNewModule();
|
void SetupNewModule();
|
||||||
bool SetupModuleFromIR(const uint8_t *pIR);
|
bool SetupModuleFromIR(const uint8_t *pIR, size_t length);
|
||||||
|
|
||||||
void DumpAsm(llvm::Function* pFunction, const char* fileName);
|
void DumpAsm(llvm::Function* pFunction, const char* fileName);
|
||||||
static void DumpToFile(llvm::Function *f, const char *fileName);
|
static void DumpToFile(llvm::Function *f, const char *fileName);
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ struct JIT_COMPILE_INPUT
|
||||||
SWR_SHADER_TYPE type;
|
SWR_SHADER_TYPE type;
|
||||||
|
|
||||||
const void* pIR; ///< Pointer to LLVM IR text.
|
const void* pIR; ///< Pointer to LLVM IR text.
|
||||||
|
size_t irLength;
|
||||||
|
|
||||||
bool enableJitSampler;
|
bool enableJitSampler;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue