mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-05 01:24:14 +01:00
[dxbc] Move shex check to constructor
Otherwise we dereference a null pointer when accessing the DxbcProgramInfo.
This commit is contained in:
parent
3393c5f4ff
commit
dd7ec24269
@ -32,6 +32,9 @@ namespace dxvk {
|
||||
if ((tag == "PCSG") || (tag == "PSG1"))
|
||||
m_psgnChunk = new DxbcIsgn(chunkReader, tag);
|
||||
}
|
||||
|
||||
if (m_shexChunk == nullptr)
|
||||
throw DxvkError("DxbcModule::compile: No SHDR/SHEX chunk");
|
||||
}
|
||||
|
||||
|
||||
@ -43,8 +46,6 @@ namespace dxvk {
|
||||
Rc<DxvkShader> DxbcModule::compile(
|
||||
const DxbcModuleInfo& moduleInfo,
|
||||
const std::string& fileName) const {
|
||||
if (m_shexChunk == nullptr)
|
||||
throw DxvkError("DxbcModule::compile: No SHDR/SHEX chunk");
|
||||
|
||||
DxbcAnalysisInfo analysisInfo;
|
||||
|
||||
@ -70,9 +71,6 @@ namespace dxvk {
|
||||
Rc<DxvkShader> DxbcModule::compilePassthroughShader(
|
||||
const DxbcModuleInfo& moduleInfo,
|
||||
const std::string& fileName) const {
|
||||
if (m_shexChunk == nullptr)
|
||||
throw DxvkError("DxbcModule::compile: No SHDR/SHEX chunk");
|
||||
|
||||
DxbcAnalysisInfo analysisInfo;
|
||||
|
||||
DxbcCompiler compiler(
|
||||
|
Loading…
Reference in New Issue
Block a user