Henri Verbeet : d3d10core: Don't pass 1 for multisample type to wined3d.

Alexandre Julliard julliard at winehq.org
Wed Feb 25 09:22:40 CST 2009


Module: wine
Branch: master
Commit: 444de4aa126204ce714807f89e3cf97c1117a687
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=444de4aa126204ce714807f89e3cf97c1117a687

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Feb 25 08:39:01 2009 +0100

d3d10core: Don't pass 1 for multisample type to wined3d.

It has a different meaning there.

---

 dlls/d3d10core/device.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c
index 8d2b7e3..87f8a21 100644
--- a/dlls/d3d10core/device.c
+++ b/dlls/d3d10core/device.c
@@ -661,7 +661,8 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture2D(ID3D10Device *ifac
         hr = IWineD3DDevice_CreateSurface(This->wined3d_device, desc->Width, desc->Height,
                 wined3dformat_from_dxgi_format(desc->Format), FALSE, FALSE, 0,
                 &object->wined3d_surface, WINED3DRTYPE_SURFACE, desc->Usage, WINED3DPOOL_DEFAULT,
-                desc->SampleDesc.Count, desc->SampleDesc.Quality, NULL, SURFACE_OPENGL, (IUnknown *)object);
+                desc->SampleDesc.Count > 1 ? desc->SampleDesc.Count : WINED3DMULTISAMPLE_NONE,
+                desc->SampleDesc.Quality, NULL, SURFACE_OPENGL, (IUnknown *)object);
         if (FAILED(hr))
         {
             ERR("CreateSurface failed, returning %#x\n", hr);
@@ -1265,7 +1266,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
     desc.MipLevels = 1;
     desc.ArraySize = 1;
     desc.Format = dxgi_format_from_wined3dformat(format);
-    desc.SampleDesc.Count = multisample_type;
+    desc.SampleDesc.Count = multisample_type ? multisample_type : 1;
     desc.SampleDesc.Quality = multisample_quality;
     desc.Usage = D3D10_USAGE_DEFAULT;
     desc.BindFlags = D3D10_BIND_RENDER_TARGET;
@@ -1304,7 +1305,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
     desc.MipLevels = 1;
     desc.ArraySize = 1;
     desc.Format = dxgi_format_from_wined3dformat(format);
-    desc.SampleDesc.Count = multisample_type;
+    desc.SampleDesc.Count = multisample_type ? multisample_type : 1;
     desc.SampleDesc.Quality = multisample_quality;
     desc.Usage = D3D10_USAGE_DEFAULT;
     desc.BindFlags = D3D10_BIND_RENDER_TARGET;




More information about the wine-cvs mailing list