diff --git a/src/dxbc/dxbc_chunk_isgn.cpp b/src/dxbc/dxbc_chunk_isgn.cpp index bd67f4ca8..ce6617bd1 100644 --- a/src/dxbc/dxbc_chunk_isgn.cpp +++ b/src/dxbc/dxbc_chunk_isgn.cpp @@ -83,6 +83,20 @@ namespace dxvk { return result; } + void DxbcIsgn::printEntries() const { + for (auto entry = this->begin(); entry != this->end(); entry++) { + Logger::debug(str::format("SGN Entry:\n\t", + "semanticName: ", entry->semanticName, "\n\t", + "semanticIndex: ", entry->semanticIndex, "\n\t", + "registerId: ", entry->registerId, "\n\t", + "componentMask: ", entry->componentMask.maskString(), "\n\t", + "componentType: ", entry->componentType, "\n\t", + "systemValue: ", entry->systemValue, "\n\t", + "streamId: ", entry->streamId, "\n", + "\n")); + } + } + bool DxbcIsgn::compareSemanticNames( const std::string& a, const std::string& b) const { @@ -97,4 +111,4 @@ namespace dxvk { return true; } -} \ No newline at end of file +} diff --git a/src/dxbc/dxbc_chunk_isgn.h b/src/dxbc/dxbc_chunk_isgn.h index baf4aa5ec..030372f3f 100644 --- a/src/dxbc/dxbc_chunk_isgn.h +++ b/src/dxbc/dxbc_chunk_isgn.h @@ -53,6 +53,8 @@ namespace dxvk { uint32_t registerId) const; uint32_t maxRegisterCount() const; + + void printEntries() const; private: @@ -64,4 +66,4 @@ namespace dxvk { }; -} \ No newline at end of file +} diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 563665be8..ab8f6bb84 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -32,6 +32,21 @@ namespace dxvk { spv::SourceLanguageUnknown, 0, m_module.addDebugString(fileName.c_str()), nullptr); + + if (Logger::logLevel() <= LogLevel::Debug) { + if (m_isgn != nullptr) { + Logger::debug(str::format("Input Signature for - ", fileName.c_str(), "\n")); + m_isgn->printEntries(); + } + if (m_osgn != nullptr) { + Logger::debug(str::format("Output Signature for - ", fileName.c_str(), "\n")); + m_osgn->printEntries(); + } + if (m_psgn != nullptr) { + Logger::debug(str::format("Patch Constant Signature for - ", fileName.c_str(), "\n")); + m_psgn->printEntries(); + } + } // Set the memory model. This is the same for all shaders. m_module.setMemoryModel(