1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[d3d9] Set initial dirty state flags

We had a bug where initial state values caused the data to not get sent to the backend.

Let's fix that going forward and dirty everything we possibly can on device creation.
This commit is contained in:
Joshua Ashton 2022-03-09 23:32:47 +00:00
parent d4d4f0ca18
commit 53b9a723ac

View File

@ -107,6 +107,36 @@ namespace dxvk {
CreateConstantBuffers();
m_availableMemory = DetermineInitialTextureMemory();
// Initially set all the dirty flags so we
// always end up giving the backend *something* to work with.
m_flags.set(D3D9DeviceFlag::DirtyFramebuffer);
m_flags.set(D3D9DeviceFlag::DirtyClipPlanes);
m_flags.set(D3D9DeviceFlag::DirtyDepthStencilState);
m_flags.set(D3D9DeviceFlag::DirtyBlendState);
m_flags.set(D3D9DeviceFlag::DirtyRasterizerState);
m_flags.set(D3D9DeviceFlag::DirtyDepthBias);
m_flags.set(D3D9DeviceFlag::DirtyAlphaTestState);
m_flags.set(D3D9DeviceFlag::DirtyInputLayout);
m_flags.set(D3D9DeviceFlag::DirtyViewportScissor);
m_flags.set(D3D9DeviceFlag::DirtyMultiSampleState);
m_flags.set(D3D9DeviceFlag::DirtyFogState);
m_flags.set(D3D9DeviceFlag::DirtyFogColor);
m_flags.set(D3D9DeviceFlag::DirtyFogDensity);
m_flags.set(D3D9DeviceFlag::DirtyFogScale);
m_flags.set(D3D9DeviceFlag::DirtyFogEnd);
m_flags.set(D3D9DeviceFlag::DirtyFFVertexData);
m_flags.set(D3D9DeviceFlag::DirtyFFVertexBlend);
m_flags.set(D3D9DeviceFlag::DirtyFFVertexShader);
m_flags.set(D3D9DeviceFlag::DirtyFFPixelShader);
m_flags.set(D3D9DeviceFlag::DirtyFFViewport);
m_flags.set(D3D9DeviceFlag::DirtyFFPixelData);
m_flags.set(D3D9DeviceFlag::DirtyProgVertexShader);
m_flags.set(D3D9DeviceFlag::DirtySharedPixelShaderData);
m_flags.set(D3D9DeviceFlag::DirtyDepthBounds);
m_flags.set(D3D9DeviceFlag::DirtyPointScale);
}