...
 
Commits (3)
......@@ -85,7 +85,7 @@ namespace dxvk {
D3D9_BUFFER_DESC* pDesc);
D3D9_COMMON_BUFFER_MAP_MODE GetMapMode() const {
return (m_desc.Pool == D3DPOOL_DEFAULT && (m_desc.Usage & D3DUSAGE_DYNAMIC))
return (m_desc.Pool == D3DPOOL_DEFAULT && (m_desc.Usage & D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY))
? D3D9_COMMON_BUFFER_MAP_MODE_DIRECT
: D3D9_COMMON_BUFFER_MAP_MODE_BUFFER;
}
......
This diff is collapsed.
......@@ -104,13 +104,14 @@ namespace dxvk {
public:
D3D9DeviceEx(
D3D9InterfaceEx* pParent,
D3D9Adapter* pAdapter,
D3DDEVTYPE DeviceType,
HWND hFocusWindow,
DWORD BehaviorFlags,
D3DDISPLAYMODEEX* pDisplayMode,
Rc<DxvkDevice> dxvkDevice);
D3D9InterfaceEx* pParent,
D3D9Adapter* pAdapter,
D3DDEVTYPE DeviceType,
HWND hFocusWindow,
DWORD BehaviorFlags,
D3DPRESENT_PARAMETERS* pPresentationParameters,
D3DDISPLAYMODEEX* pDisplayMode,
Rc<DxvkDevice> dxvkDevice);
~D3D9DeviceEx();
......@@ -854,6 +855,11 @@ namespace dxvk {
const D3D9ConstantLayout& GetVertexConstantLayout() { return m_vsLayout; }
const D3D9ConstantLayout& GetPixelConstantLayout() { return m_psLayout; }
HRESULT ResetState(D3DPRESENT_PARAMETERS* pPresentationParameters);
HRESULT ResetSwapChain(D3DPRESENT_PARAMETERS* pPresentationParameters, D3DDISPLAYMODEEX* pFullscreenDisplayMode);
HRESULT InitialReset(D3DPRESENT_PARAMETERS* pPresentationParameters, D3DDISPLAYMODEEX* pFullscreenDisplayMode);
private:
D3D9DeviceFlags m_flags;
......
......@@ -291,17 +291,10 @@ namespace dxvk {
DeviceType,
hFocusWindow,
BehaviorFlags,
pPresentationParameters,
pFullscreenDisplayMode,
dxvkDevice));
HRESULT hr = (*ppReturnedDeviceInterface)->Reset(pPresentationParameters);
if (FAILED(hr)) {
Logger::warn("D3D9InterfaceEx::CreateDeviceEx: device initial reset failed.");
*ppReturnedDeviceInterface = nullptr;
return hr;
}
return D3D_OK;
}
......