diff --git a/src/dxbc/dxbc_chunk_isgn.cpp b/src/dxbc/dxbc_chunk_isgn.cpp index 1462dffc..45285014 100644 --- a/src/dxbc/dxbc_chunk_isgn.cpp +++ b/src/dxbc/dxbc_chunk_isgn.cpp @@ -10,10 +10,14 @@ namespace dxvk { DxbcScalarType::Uint32, DxbcScalarType::Uint32, 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(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); } } diff --git a/src/dxbc/dxbc_module.cpp b/src/dxbc/dxbc_module.cpp index e712438d..5eb90cfb 100644 --- a/src/dxbc/dxbc_module.cpp +++ b/src/dxbc/dxbc_module.cpp @@ -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); } }