1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-22 16:54:27 +01:00

[d3d9] Remove D3D9CommonBuffer::GetDesc

We already have ::Desc()
This commit is contained in:
Joshua Ashton 2021-07-24 17:57:15 +01:00 committed by Joshie
parent 750639d3b6
commit fb7035f16a
3 changed files with 13 additions and 24 deletions

View File

@ -43,15 +43,14 @@ namespace dxvk {
if (pDesc == nullptr) if (pDesc == nullptr)
return D3DERR_INVALIDCALL; return D3DERR_INVALIDCALL;
D3D9_BUFFER_DESC desc; const D3D9_BUFFER_DESC* desc = m_buffer.Desc();
m_buffer.GetDesc(&desc);
pDesc->Format = static_cast<D3DFORMAT>(desc.Format); pDesc->Format = static_cast<D3DFORMAT>(desc->Format);
pDesc->Type = desc.Type; pDesc->Type = desc->Type;
pDesc->Usage = desc.Usage; pDesc->Usage = desc->Usage;
pDesc->Pool = desc.Pool; pDesc->Pool = desc->Pool;
pDesc->Size = desc.Size; pDesc->Size = desc->Size;
pDesc->FVF = desc.FVF; pDesc->FVF = desc->FVF;
return D3D_OK; return D3D_OK;
} }
@ -99,14 +98,13 @@ namespace dxvk {
if (pDesc == nullptr) if (pDesc == nullptr)
return D3DERR_INVALIDCALL; return D3DERR_INVALIDCALL;
D3D9_BUFFER_DESC desc; const D3D9_BUFFER_DESC* desc = m_buffer.Desc();
m_buffer.GetDesc(&desc);
pDesc->Format = static_cast<D3DFORMAT>(desc.Format); pDesc->Format = static_cast<D3DFORMAT>(desc->Format);
pDesc->Type = desc.Type; pDesc->Type = desc->Type;
pDesc->Usage = desc.Usage; pDesc->Usage = desc->Usage;
pDesc->Pool = desc.Pool; pDesc->Pool = desc->Pool;
pDesc->Size = desc.Size; pDesc->Size = desc->Size;
return D3D_OK; return D3D_OK;
} }

View File

@ -39,12 +39,6 @@ namespace dxvk {
} }
void D3D9CommonBuffer::GetDesc(
D3D9_BUFFER_DESC* pDesc) {
*pDesc = m_desc;
}
HRESULT D3D9CommonBuffer::ValidateBufferProperties(const D3D9_BUFFER_DESC* pDesc) { HRESULT D3D9CommonBuffer::ValidateBufferProperties(const D3D9_BUFFER_DESC* pDesc) {
if (pDesc->Size == 0) if (pDesc->Size == 0)
return D3DERR_INVALIDCALL; return D3DERR_INVALIDCALL;

View File

@ -82,9 +82,6 @@ namespace dxvk {
HRESULT Unlock(); HRESULT Unlock();
void GetDesc(
D3D9_BUFFER_DESC* pDesc);
D3D9_COMMON_BUFFER_MAP_MODE GetMapMode() const { D3D9_COMMON_BUFFER_MAP_MODE GetMapMode() const {
return (m_desc.Pool == D3DPOOL_DEFAULT && (m_desc.Usage & (D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY))) return (m_desc.Pool == D3DPOOL_DEFAULT && (m_desc.Usage & (D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY)))
? D3D9_COMMON_BUFFER_MAP_MODE_DIRECT ? D3D9_COMMON_BUFFER_MAP_MODE_DIRECT