diff --git a/src/d3d9/d3d9_common_texture.h b/src/d3d9/d3d9_common_texture.h index d61799cb..3a6ac45e 100644 --- a/src/d3d9/d3d9_common_texture.h +++ b/src/d3d9/d3d9_common_texture.h @@ -190,6 +190,14 @@ namespace dxvk { return m_shadow; } + /** + * \brief Null + * \returns Whether the texture is D3DFMT_NULL or not + */ + bool IsNull() const { + return m_desc.Format == D3D9Format::NULL_FORMAT; + } + /** * \brief Subresource * \returns The subresource idx of a given face and mip level diff --git a/src/d3d9/d3d9_subresource.h b/src/d3d9/d3d9_subresource.h index 724e5bc2..8d047501 100644 --- a/src/d3d9/d3d9_subresource.h +++ b/src/d3d9/d3d9_subresource.h @@ -23,7 +23,8 @@ namespace dxvk { m_texture (pTexture), m_face (Face), m_mipLevel (MipLevel), - m_isSrgbCompatible (pTexture->IsSrgbCompatible()) { + m_isSrgbCompatible (pTexture->IsSrgbCompatible()), + m_isNull (pTexture->IsNull()) { } @@ -112,7 +113,7 @@ namespace dxvk { } inline bool IsNull() { - return m_texture->Desc()->Format == D3D9Format::NULL_FORMAT; + return m_isNull; } inline IDirect3DBaseTexture9* GetBaseTexture() { @@ -137,6 +138,7 @@ namespace dxvk { UINT m_face : 8; UINT m_mipLevel : 16; UINT m_isSrgbCompatible : 1; + UINT m_isNull : 1; D3D9ColorView m_sampleView; D3D9ColorView m_renderTargetView;