1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-15 07:29:17 +01:00

[dxbc] Scan for discard and derivative instructions

This commit is contained in:
Philip Rebohle 2018-05-26 17:08:08 +02:00
parent 667616bc39
commit ec5572aa69
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 14 additions and 1 deletions

View File

@ -35,6 +35,16 @@ namespace dxvk {
} }
} break; } break;
case DxbcInstClass::TextureSample:
case DxbcInstClass::VectorDeriv: {
m_analysis->usesDerivatives = true;
} break;
case DxbcInstClass::ControlFlow: {
if (ins.op == DxbcOpcode::Discard)
m_analysis->usesKill = true;
} break;
case DxbcInstClass::TypedUavLoad: { case DxbcInstClass::TypedUavLoad: {
const uint32_t registerId = ins.src[1].idx[0].offset; const uint32_t registerId = ins.src[1].idx[0].offset;
m_analysis->uavInfos[registerId].accessTypedLoad = true; m_analysis->uavInfos[registerId].accessTypedLoad = true;

View File

@ -37,6 +37,9 @@ namespace dxvk {
DxbcClipCullInfo clipCullIn; DxbcClipCullInfo clipCullIn;
DxbcClipCullInfo clipCullOut; DxbcClipCullInfo clipCullOut;
bool usesDerivatives = false;
bool usesKill = false;
}; };
/** /**