mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[dxso] Allocate shader compiler on the heap
In some apps that call us with limited stack space, this can stack overflow
This commit is contained in:
parent
3e65c2bb87
commit
81632b91bb
@ -3,6 +3,8 @@
|
||||
#include "dxso_code.h"
|
||||
#include "dxso_compiler.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
DxsoModule::DxsoModule(DxsoReader& reader)
|
||||
@ -24,22 +26,22 @@ namespace dxvk {
|
||||
const std::string& fileName,
|
||||
const DxsoAnalysisInfo& analysis,
|
||||
const D3D9ConstantLayout& layout) {
|
||||
DxsoCompiler compiler(
|
||||
auto compiler = std::make_unique<DxsoCompiler>(
|
||||
fileName, moduleInfo,
|
||||
m_header.info(), analysis,
|
||||
layout);
|
||||
|
||||
this->runCompiler(compiler, m_code.iter());
|
||||
m_isgn = compiler.isgn();
|
||||
this->runCompiler(*compiler, m_code.iter());
|
||||
m_isgn = compiler->isgn();
|
||||
|
||||
m_meta = compiler.meta();
|
||||
m_constants = compiler.constants();
|
||||
m_usedSamplers = compiler.usedSamplers();
|
||||
m_usedRTs = compiler.usedRTs();
|
||||
m_meta = compiler->meta();
|
||||
m_constants = compiler->constants();
|
||||
m_usedSamplers = compiler->usedSamplers();
|
||||
m_usedRTs = compiler->usedRTs();
|
||||
|
||||
compiler.finalize();
|
||||
compiler->finalize();
|
||||
|
||||
return compiler.compile();
|
||||
return compiler->compile();
|
||||
}
|
||||
|
||||
void DxsoModule::runAnalyzer(
|
||||
|
Loading…
x
Reference in New Issue
Block a user