[Bug 4535] wined3d:Farcry demo crashes in wined3d
Wine Bugs
wine-bugs at winehq.org
Fri Jul 7 05:26:46 CDT 2006
http://bugs.winehq.org/show_bug.cgi?id=4535
------- Additional Comments From xerox_xerox2000 at yahoo.co.uk 2006-07-07 05:26 -------
Created an attachment (id=2848)
--> (http://bugs.winehq.org/attachment.cgi?id=2848&action=view)
simple test
this very simple test fails in wine, but passes on windows (wine
d3d9_crosstest.exe volume). Farcry passes these values to CreateVolumetexture.
Somehow there should be a check in CreateVolumetexture that returns
D3DERR_INVALIDCALL (i'd guess when widht,height and length are zero). Adding
this check makes Farcry get around this bug.
diff --git a/dlls/d3d9/tests/volume.c b/dlls/d3d9/tests/volume.c
index 98ae389..779501a 100644
--- a/dlls/d3d9/tests/volume.c
+++ b/dlls/d3d9/tests/volume.c
@@ -113,6 +113,24 @@ cleanup:
if (volume_ptr) IDirect3DVolume9_Release(volume_ptr);
}
+static void test_volume_0(IDirect3DDevice9 *device_ptr)
+{
+ IDirect3DVolumeTexture9 *texture_ptr = 0;
+ IDirect3DVolume9 *volume_ptr = 0;
+
+ HRESULT hr;
+
+ hr = IDirect3DDevice9_CreateVolumeTexture(device_ptr, 0, 0, 0, 1, 0,
+ D3DFMT_A8, D3DPOOL_MANAGED, &texture_ptr, 0);
+ ok(hr == D3DERR_INVALIDCALL, "CreateVolumeTexture returned: hr %#lx "
+ "Expected hr %#lx\n", hr, D3DERR_INVALIDCALL);
+ if (!texture_ptr || FAILED(hr)) goto cleanup;
+
+cleanup:
+ if (texture_ptr) IDirect3DVolumeTexture9_Release(texture_ptr);
+ if (volume_ptr) IDirect3DVolume9_Release(volume_ptr);
+}
+
START_TEST(volume)
{
HMODULE d3d9_handle;
@@ -129,4 +147,6 @@ START_TEST(volume)
if (!device_ptr) return;
test_volume_get_container(device_ptr);
+
+ test_volume_0(device_ptr);
}
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs
mailing list