mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxbc] Rework semantic name matching
This commit is contained in:
parent
ec0c377cf8
commit
5540df955c
@ -99,13 +99,21 @@ namespace dxvk {
|
||||
|
||||
|
||||
bool DxbcIsgn::compareSemanticNames(
|
||||
const std::string& a, const std::string& b) const {
|
||||
const std::string& a, const std::string& b) {
|
||||
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;
|
||||
char ac = a[i];
|
||||
char bc = b[i];
|
||||
|
||||
if (ac != bc) {
|
||||
if (ac >= 'A' && ac <= 'Z') ac += 'a' - 'A';
|
||||
if (bc >= 'A' && bc <= 'Z') bc += 'a' - 'A';
|
||||
|
||||
if (ac != bc)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -56,14 +56,14 @@ namespace dxvk {
|
||||
|
||||
void printEntries() const;
|
||||
|
||||
static bool compareSemanticNames(
|
||||
const std::string& a,
|
||||
const std::string& b);
|
||||
|
||||
private:
|
||||
|
||||
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