diff --git a/src/dxbc/dxbc_chunk_isgn.cpp b/src/dxbc/dxbc_chunk_isgn.cpp index 8b26099d..f2d23a06 100644 --- a/src/dxbc/dxbc_chunk_isgn.cpp +++ b/src/dxbc/dxbc_chunk_isgn.cpp @@ -34,12 +34,27 @@ namespace dxvk { const std::string& semanticName, uint32_t semanticIndex) const { for (auto e = this->begin(); e != this->end(); e++) { - if (e->semanticName == semanticName - && e->semanticIndex == semanticIndex) + // TODO case-insensitive compare + if (e->semanticIndex == semanticIndex + && compareSemanticNames(semanticName, e->semanticName)) return &(*e); } return nullptr; } + + bool DxbcIsgn::compareSemanticNames( + const std::string& a, const std::string& b) const { + if (a.size() != b.size()) + return false; + + for (size_t i = 0; i < a.size(); i++) { + if (std::toupper(a[i]) != std::toupper(b[i])) + return false; + } + + 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 13b680f4..a6b9636c 100644 --- a/src/dxbc/dxbc_chunk_isgn.h +++ b/src/dxbc/dxbc_chunk_isgn.h @@ -46,6 +46,10 @@ namespace dxvk { std::vector m_entries; + bool compareSemanticNames( + const std::string& a, + const std::string& b) const; + }; } \ No newline at end of file