[PATCH v3 3/5] wined3d: Default to multisample antialiasing disabled.

Chip Davis cdavis at codeweavers.com
Thu Apr 16 14:30:45 CDT 2020


Have d3d8 and d3d9 enable it on startup and reset.

Signed-off-by: Chip Davis <cdavis at codeweavers.com>
---
v3: Split change to enable multisampling for blits into its own patch.
---
 dlls/d3d8/device.c        | 2 ++
 dlls/d3d9/device.c        | 2 ++
 dlls/wined3d/stateblock.c | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index e123502dab6..32ba5c2c1ba 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -984,6 +984,7 @@ static HRESULT WINAPI d3d8_device_Reset(IDirect3DDevice8 *iface,
         wined3d_stateblock_set_render_state(device->state, WINED3D_RS_POINTSIZE_MIN, 0);
         wined3d_stateblock_set_render_state(device->state, WINED3D_RS_ZENABLE,
                 !!swapchain_desc.enable_auto_depth_stencil);
+        wined3d_stateblock_set_render_state(device->state, WINED3D_RS_MULTISAMPLEANTIALIAS, TRUE);
         device_reset_viewport_state(device);
         device->device_state = D3D8_DEVICE_STATE_OK;
     }
@@ -3819,6 +3820,7 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine
     wined3d_stateblock_set_render_state(device->state, WINED3D_RS_ZENABLE,
             !!swapchain_desc.enable_auto_depth_stencil);
     wined3d_stateblock_set_render_state(device->state, WINED3D_RS_POINTSIZE_MIN, 0);
+    wined3d_stateblock_set_render_state(device->state, WINED3D_RS_MULTISAMPLEANTIALIAS, TRUE);
     device_reset_viewport_state(device);
     wined3d_mutex_unlock();
 
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 61aee971a1d..5c5e45e6ff9 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -1099,6 +1099,7 @@ static HRESULT d3d9_device_reset(struct d3d9_device *device,
             device->auto_mipmaps = 0;
             wined3d_stateblock_set_render_state(device->state, WINED3D_RS_ZENABLE,
                     !!swapchain_desc.enable_auto_depth_stencil);
+            wined3d_stateblock_set_render_state(device->state, WINED3D_RS_MULTISAMPLEANTIALIAS, TRUE);
             device_reset_viewport_state(device);
         }
 
@@ -4791,6 +4792,7 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
 
     wined3d_stateblock_set_render_state(device->state, WINED3D_RS_ZENABLE,
             !!swapchain_desc->enable_auto_depth_stencil);
+    wined3d_stateblock_set_render_state(device->state, WINED3D_RS_MULTISAMPLEANTIALIAS, TRUE);
     device_reset_viewport_state(device);
 
     if (FAILED(hr = d3d9_device_get_swapchains(device)))
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 7e97c84c19e..001a9b6debd 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -1709,7 +1709,7 @@ static void init_default_render_states(DWORD rs[WINEHIGHEST_RENDER_STATE + 1], c
     rs[WINED3D_RS_POINTSCALE_B] = tmpfloat.d;
     tmpfloat.f = 0.0f;
     rs[WINED3D_RS_POINTSCALE_C] = tmpfloat.d;
-    rs[WINED3D_RS_MULTISAMPLEANTIALIAS] = TRUE;
+    rs[WINED3D_RS_MULTISAMPLEANTIALIAS] = FALSE;
     rs[WINED3D_RS_MULTISAMPLEMASK] = 0xffffffff;
     rs[WINED3D_RS_PATCHEDGESTYLE] = WINED3D_PATCH_EDGE_DISCRETE;
     tmpfloat.f = 1.0f;
-- 
2.24.0




More information about the wine-devel mailing list