1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-01 16:24:12 +01:00

[d3d11] Fixed shader semantic name comparison

This commit is contained in:
Philip Rebohle 2017-12-30 15:30:31 +01:00
parent e740adfcb7
commit 006e1b25e6
2 changed files with 21 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -46,6 +46,10 @@ namespace dxvk {
std::vector<DxbcSgnEntry> m_entries;
bool compareSemanticNames(
const std::string& a,
const std::string& b) const;
};
}