1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 14:52:11 +01:00

[d3d8] Remove superfluous methods from D3D8Surface

This commit is contained in:
WinterSnowfall 2025-01-13 20:31:18 +02:00 committed by Robin Kertels
parent e2a078d534
commit e757170211
2 changed files with 6 additions and 23 deletions

View File

@ -20,10 +20,6 @@ namespace dxvk {
: D3D8Surface (pDevice, nullptr, std::move(pSurface)) {
}
D3DRESOURCETYPE STDMETHODCALLTYPE D3D8Surface::GetType() {
return D3DRESOURCETYPE(GetD3D9()->GetType());
}
HRESULT STDMETHODCALLTYPE D3D8Surface::GetDesc(D3DSURFACE_DESC* pDesc) {
if (unlikely(pDesc == nullptr))
return D3DERR_INVALIDCALL;
@ -48,14 +44,6 @@ namespace dxvk {
return GetD3D9()->UnlockRect();
}
HRESULT STDMETHODCALLTYPE D3D8Surface::GetDC(HDC* phDC) {
return GetD3D9()->GetDC(phDC);
}
HRESULT STDMETHODCALLTYPE D3D8Surface::ReleaseDC(HDC hDC) {
return GetD3D9()->ReleaseDC(hDC);
}
// TODO: Consider creating only one texture to
// encompass all surface levels of a texture.
Com<d3d9::IDirect3DSurface9> D3D8Surface::GetBlitImage() {

View File

@ -5,8 +5,9 @@
namespace dxvk {
// TODO: all inherited methods in D3D8Surface should be final like in d9vk
// Note: IDirect3DSurface8 does not actually inherit from IDirect3DResource8,
// however it does expose serveral of the methods typically found part of
// IDirect3DResource8, such as Set/Get/FreePrivateData, so model it as such.
using D3D8SurfaceBase = D3D8Subresource<d3d9::IDirect3DSurface9, IDirect3DSurface8>;
class D3D8Surface final : public D3D8SurfaceBase {
@ -21,20 +22,14 @@ namespace dxvk {
D3D8Device* pDevice,
Com<d3d9::IDirect3DSurface9>&& pSurface);
D3DRESOURCETYPE STDMETHODCALLTYPE GetType();
HRESULT STDMETHODCALLTYPE GetDesc(D3DSURFACE_DESC* pDesc);
HRESULT STDMETHODCALLTYPE GetDesc(D3DSURFACE_DESC* pDesc) final;
HRESULT STDMETHODCALLTYPE LockRect(
D3DLOCKED_RECT* pLockedRect,
CONST RECT* pRect,
DWORD Flags);
DWORD Flags) final;
HRESULT STDMETHODCALLTYPE UnlockRect();
HRESULT STDMETHODCALLTYPE GetDC(HDC* phDC);
HRESULT STDMETHODCALLTYPE ReleaseDC(HDC hDC);
HRESULT STDMETHODCALLTYPE UnlockRect() final;
/**
* \brief Allocate or reuse an image of the same size