mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 10:24:10 +01:00
[d3d11] Fixed shader semantic name comparison
This commit is contained in:
parent
e740adfcb7
commit
006e1b25e6
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -46,6 +46,10 @@ namespace dxvk {
|
||||
|
||||
std::vector<DxbcSgnEntry> m_entries;
|
||||
|
||||
bool compareSemanticNames(
|
||||
const std::string& a,
|
||||
const std::string& b) const;
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user