From 0b5cffb0bb4abe85136536df136469bdffc51e45 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 26 Jan 2019 14:52:29 +0100 Subject: [PATCH] [dxbc] Parse patch constant signature --- src/dxbc/dxbc_analysis.cpp | 2 ++ src/dxbc/dxbc_analysis.h | 2 ++ src/dxbc/dxbc_compiler.cpp | 2 ++ src/dxbc/dxbc_compiler.h | 2 ++ src/dxbc/dxbc_module.cpp | 9 ++++++--- src/dxbc/dxbc_module.h | 1 + 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/dxbc/dxbc_analysis.cpp b/src/dxbc/dxbc_analysis.cpp index b3444872e..253949997 100644 --- a/src/dxbc/dxbc_analysis.cpp +++ b/src/dxbc/dxbc_analysis.cpp @@ -7,9 +7,11 @@ namespace dxvk { const DxbcProgramInfo& programInfo, const Rc& isgn, const Rc& osgn, + const Rc& psgn, DxbcAnalysisInfo& analysis) : m_isgn (isgn), m_osgn (osgn), + m_psgn (psgn), m_analysis(&analysis) { // Get number of clipping and culling planes from the // input and output signatures. We will need this to diff --git a/src/dxbc/dxbc_analysis.h b/src/dxbc/dxbc_analysis.h index f583a2a1d..1102756a4 100644 --- a/src/dxbc/dxbc_analysis.h +++ b/src/dxbc/dxbc_analysis.h @@ -58,6 +58,7 @@ namespace dxvk { const DxbcProgramInfo& programInfo, const Rc& isgn, const Rc& osgn, + const Rc& psgn, DxbcAnalysisInfo& analysis); ~DxbcAnalyzer(); @@ -73,6 +74,7 @@ namespace dxvk { Rc m_isgn; Rc m_osgn; + Rc m_psgn; DxbcAnalysisInfo* m_analysis = nullptr; diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index fe91978b9..f843e6e03 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -15,11 +15,13 @@ namespace dxvk { const DxbcProgramInfo& programInfo, const Rc& isgn, const Rc& osgn, + const Rc& psgn, const DxbcAnalysisInfo& analysis) : m_moduleInfo (moduleInfo), m_programInfo(programInfo), m_isgn (isgn), m_osgn (osgn), + m_psgn (psgn), m_analysis (&analysis) { // Declare an entry point ID. We'll need it during the // initialization phase where the execution mode is set. diff --git a/src/dxbc/dxbc_compiler.h b/src/dxbc/dxbc_compiler.h index 9c3ad292d..28ac3d03c 100644 --- a/src/dxbc/dxbc_compiler.h +++ b/src/dxbc/dxbc_compiler.h @@ -377,6 +377,7 @@ namespace dxvk { const DxbcProgramInfo& programInfo, const Rc& isgn, const Rc& osgn, + const Rc& psgn, const DxbcAnalysisInfo& analysis); ~DxbcCompiler(); @@ -410,6 +411,7 @@ namespace dxvk { Rc m_isgn; Rc m_osgn; + Rc m_psgn; const DxbcAnalysisInfo* m_analysis; diff --git a/src/dxbc/dxbc_module.cpp b/src/dxbc/dxbc_module.cpp index 5eb90cfbb..d406bf292 100644 --- a/src/dxbc/dxbc_module.cpp +++ b/src/dxbc/dxbc_module.cpp @@ -28,6 +28,9 @@ namespace dxvk { if ((tag == "OSGN") || (tag == "OSG5") || (tag == "OSG1")) m_osgnChunk = new DxbcIsgn(chunkReader, tag); + + if ((tag == "PCSG") || (tag == "PSG1")) + m_psgnChunk = new DxbcIsgn(chunkReader, tag); } } @@ -48,7 +51,7 @@ namespace dxvk { DxbcAnalyzer analyzer(moduleInfo, m_shexChunk->programInfo(), m_isgnChunk, m_osgnChunk, - analysisInfo); + m_psgnChunk, analysisInfo); this->runAnalyzer(analyzer, m_shexChunk->slice()); @@ -56,7 +59,7 @@ namespace dxvk { fileName, moduleInfo, m_shexChunk->programInfo(), m_isgnChunk, m_osgnChunk, - analysisInfo); + m_psgnChunk, analysisInfo); this->runCompiler(compiler, m_shexChunk->slice()); @@ -76,7 +79,7 @@ namespace dxvk { fileName, moduleInfo, DxbcProgramType::GeometryShader, m_osgnChunk, m_osgnChunk, - analysisInfo); + m_psgnChunk, analysisInfo); compiler.processXfbPassthrough(); return compiler.finalize(); diff --git a/src/dxbc/dxbc_module.h b/src/dxbc/dxbc_module.h index 35b20160e..d785d9599 100644 --- a/src/dxbc/dxbc_module.h +++ b/src/dxbc/dxbc_module.h @@ -80,6 +80,7 @@ namespace dxvk { Rc m_isgnChunk; Rc m_osgnChunk; + Rc m_psgnChunk; Rc m_shexChunk; void runAnalyzer(