mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxbc] Support parsing the ISG1 and OSG1 signature chunks
Required to get the Resident Evil 2 demo to work.
This commit is contained in:
parent
3935d2540e
commit
bee21e7539
@ -11,9 +11,13 @@ namespace dxvk {
|
||||
DxbcScalarType::Sint32, DxbcScalarType::Float32,
|
||||
};
|
||||
|
||||
// https://github.com/DarkStarSword/3d-fixes/blob/master/dx11shaderanalyse.py#L101
|
||||
bool hasStream = (tag == "ISG1") || (tag == "OSG1") || (tag == "PSG1") || (tag == "OSG5");
|
||||
bool hasPrecision = (tag == "ISG1") || (tag == "OSG1") || (tag == "PSG1");
|
||||
|
||||
for (uint32_t i = 0; i < elementCount; i++) {
|
||||
DxbcSgnEntry entry;
|
||||
entry.streamId = tag == "OSG5" ? reader.readu32() : 0;
|
||||
entry.streamId = hasStream ? reader.readu32() : 0;
|
||||
entry.semanticName = reader.clone(reader.readu32()).readString();
|
||||
entry.semanticIndex = reader.readu32();
|
||||
entry.systemValue = static_cast<DxbcSystemValue>(reader.readu32());
|
||||
@ -21,6 +25,9 @@ namespace dxvk {
|
||||
entry.registerId = reader.readu32();
|
||||
entry.componentMask = bit::extract(reader.readu32(), 0, 3);
|
||||
|
||||
if (hasPrecision)
|
||||
reader.readu32();
|
||||
|
||||
m_entries.push_back(entry);
|
||||
}
|
||||
}
|
||||
|
@ -23,10 +23,10 @@ namespace dxvk {
|
||||
if ((tag == "SHDR") || (tag == "SHEX"))
|
||||
m_shexChunk = new DxbcShex(chunkReader);
|
||||
|
||||
if ((tag == "ISGN"))
|
||||
if ((tag == "ISGN") || (tag == "ISG1"))
|
||||
m_isgnChunk = new DxbcIsgn(chunkReader, tag);
|
||||
|
||||
if ((tag == "OSGN") || (tag == "OSG5"))
|
||||
if ((tag == "OSGN") || (tag == "OSG5") || (tag == "OSG1"))
|
||||
m_osgnChunk = new DxbcIsgn(chunkReader, tag);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user