mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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,
|
const std::string& semanticName,
|
||||||
uint32_t semanticIndex) const {
|
uint32_t semanticIndex) const {
|
||||||
for (auto e = this->begin(); e != this->end(); e++) {
|
for (auto e = this->begin(); e != this->end(); e++) {
|
||||||
if (e->semanticName == semanticName
|
// TODO case-insensitive compare
|
||||||
&& e->semanticIndex == semanticIndex)
|
if (e->semanticIndex == semanticIndex
|
||||||
|
&& compareSemanticNames(semanticName, e->semanticName))
|
||||||
return &(*e);
|
return &(*e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
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;
|
std::vector<DxbcSgnEntry> m_entries;
|
||||||
|
|
||||||
|
bool compareSemanticNames(
|
||||||
|
const std::string& a,
|
||||||
|
const std::string& b) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user