1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[dxbc] Implement precise flag

May fix depth precision in Skyrim SE (issue #189).
This commit is contained in:
Philip Rebohle 2018-04-20 23:32:51 +02:00
parent f52cc3859b
commit 50f1cf007d
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 10 additions and 0 deletions

View File

@ -1564,6 +1564,9 @@ namespace dxvk {
return;
}
if (ins.controls.precise())
m_module.decorate(dst.id, spv::DecorationNoContraction);
// Store computed value
dst = emitDstOperandModifiers(dst, ins.modifiers);
emitRegisterStore(ins.dst[0], dst);
@ -1786,6 +1789,9 @@ namespace dxvk {
src.at(0).id,
src.at(1).id);
if (ins.controls.precise())
m_module.decorate(dst.id, spv::DecorationNoContraction);
dst = emitDstOperandModifiers(dst, ins.modifiers);
emitRegisterStore(ins.dst[0], dst);
}

View File

@ -309,6 +309,10 @@ namespace dxvk {
return bit::extract(m_bits, 11, 16);
}
bool precise() const {
return bit::extract(m_bits, 19, 22) != 0;
}
private:
uint32_t m_bits;