mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[dxbc] Take used components into account for PS inputs
This commit is contained in:
parent
c2489d5a45
commit
617ebf4e05
@ -23,7 +23,11 @@ namespace dxvk {
|
||||
entry.systemValue = static_cast<DxbcSystemValue>(reader.readu32());
|
||||
entry.componentType = componentTypes.at(reader.readu32());
|
||||
entry.registerId = reader.readu32();
|
||||
entry.componentMask = bit::extract(reader.readu32(), 0, 3);
|
||||
|
||||
uint32_t mask = reader.readu32();
|
||||
|
||||
entry.componentMask = bit::extract(mask, 0, 3);
|
||||
entry.componentUsed = bit::extract(mask, 8, 11);
|
||||
|
||||
if (hasPrecision)
|
||||
reader.readu32();
|
||||
|
@ -20,6 +20,7 @@ namespace dxvk {
|
||||
uint32_t semanticIndex;
|
||||
uint32_t registerId;
|
||||
DxbcRegMask componentMask;
|
||||
DxbcRegMask componentUsed;
|
||||
DxbcScalarType componentType;
|
||||
DxbcSystemValue systemValue;
|
||||
uint32_t streamId;
|
||||
|
@ -7777,10 +7777,18 @@ namespace dxvk {
|
||||
return result;
|
||||
|
||||
DxbcRegMask mask(0u);
|
||||
DxbcRegMask used(0u);
|
||||
|
||||
for (const auto& e : *m_isgn) {
|
||||
if (e.registerId == regIdx && !ignoreInputSystemValue(e.systemValue))
|
||||
if (e.registerId == regIdx && !ignoreInputSystemValue(e.systemValue)) {
|
||||
mask |= e.componentMask;
|
||||
used |= e.componentUsed;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_programInfo.type() == DxbcProgramType::PixelShader) {
|
||||
if ((used.raw() & mask.raw()) == used.raw())
|
||||
mask = used;
|
||||
}
|
||||
|
||||
result.ccount = mask.minComponents();
|
||||
|
Loading…
x
Reference in New Issue
Block a user