[d3d9] Track if a texture is upgraded to D32f

This commit is contained in:
Georg Lehmann 2022-09-26 11:18:59 +02:00 committed by Joshie
parent 6188ffa23a
commit 5684e29718
2 changed files with 11 additions and 0 deletions

View File

@ -40,6 +40,8 @@ namespace dxvk {
m_mapMode = DetermineMapMode();
m_shadow = DetermineShadowState();
m_upgradedToD32f = ConvertFormatUnfixed(m_desc.Format).FormatColor != VK_FORMAT_D32_SFLOAT_S8_UINT &&
m_mapping.FormatColor == VK_FORMAT_D32_SFLOAT_S8_UINT;
m_supportsFetch4 = DetermineFetch4Compatibility();
const bool createImage = m_desc.Pool != D3DPOOL_SYSTEMMEM && m_desc.Pool != D3DPOOL_SCRATCH && m_desc.Format != D3D9Format::NULL_FORMAT;

View File

@ -203,6 +203,14 @@ namespace dxvk {
return m_shadow;
}
/**
* \brief Dref Clamp
* \returns Whether the texture emulates an UNORM format with D32f
*/
bool IsUpgradedToD32f() const {
return m_upgradedToD32f;
}
/**
* \brief FETCH4 compatibility
* \returns Whether the format of the texture supports the FETCH4 hack
@ -499,6 +507,7 @@ namespace dxvk {
D3D9_VK_FORMAT_MAPPING m_mapping;
bool m_shadow; //< Depth Compare-ness
bool m_upgradedToD32f; // Dref Clamp
bool m_supportsFetch4;
int64_t m_size = 0;