Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3dx9_36/texture.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c index 022b32bcd8c..8708ed702fd 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/texture.c @@ -773,7 +773,10 @@ HRESULT WINAPI D3DXCreateTextureFromFileExW(struct IDirect3DDevice9 *device, con
hr = map_view_of_file(srcfile, &buffer, &size); if (FAILED(hr)) + { + WARN("Failed to open file.\n"); return D3DXERR_INVALIDDATA; + }
hr = D3DXCreateTextureFromFileInMemoryEx(device, buffer, size, width, height, miplevels, usage, format, pool, filter, mipfilter, colorkey, srcinfo, palette, texture);
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3dx9_36/core.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/d3dx9_36/core.c b/dlls/d3dx9_36/core.c index 75a0e84772e..4c8070711c4 100644 --- a/dlls/d3dx9_36/core.c +++ b/dlls/d3dx9_36/core.c @@ -129,6 +129,8 @@ HRESULT WINAPI D3DXCreateBuffer(DWORD size, ID3DXBuffer **buffer) struct ID3DXBufferImpl *object; HRESULT hr;
+ TRACE("size %u, buffer %p.\n", size, buffer); + if (!buffer) { WARN("Invalid buffer specified.\n");
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- Found while testing bug 43246.
dlls/user32/cursoricon.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 3214746664c..9c61d7ff300 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -1451,6 +1451,8 @@ static void riff_find_chunk( DWORD chunk_id, DWORD chunk_type, const riff_chunk_ }
ptr += sizeof(DWORD); + if (ptr >= end) + break; ptr += (*(const DWORD *)ptr + 1) & ~1; ptr += sizeof(DWORD); }
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- Applications often times don't check the return value of CreateDeferredContext() and might or might not check the returned pointer. I'd argue that crashing with a NULL pointer exception is better than executing random code or getting inconsistent behavior depending on the pointer's uninitialized content.
dlls/d3d11/device.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 5fac1172ca9..212881a9b71 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -3358,6 +3358,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device { FIXME("iface %p, flags %#x, context %p stub!\n", iface, flags, context);
+ *context = NULL; return E_NOTIMPL; }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=57186
Your paranoid android.
=== debian10 (32 bit report) ===
d3d11: d3d11.c:6109: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
user32: msg.c:8716: Test failed: WaitForSingleObject failed 102 msg.c:8722: Test failed: destroy child on thread exit: 0: the msg 0x0082 was expected, but got msg 0x000f instead msg.c:8722: Test failed: destroy child on thread exit: 1: the msg 0x000f was expected, but got msg 0x0014 instead msg.c:8722: Test failed: destroy child on thread exit: 2: the msg sequence is not complete: expected 0014 - actual 0000
=== debian10 (32 bit Chinese:China report) ===
d3d11: d3d11.c:6109: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:6119: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:17941: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000000, 0xffffffff, 0x00000000, 0x00000000} at (0, 0), sub-resource 0.
user32: msg.c:8716: Test failed: WaitForSingleObject failed 102 msg.c:8722: Test failed: destroy child on thread exit: 0: the msg 0x0082 was expected, but got msg 0x000f instead msg.c:8722: Test failed: destroy child on thread exit: 1: the msg 0x000f was expected, but got msg 0x0014 instead msg.c:8722: Test failed: destroy child on thread exit: 2: the msg sequence is not complete: expected 0014 - actual 0000
=== debian10 (32 bit WoW report) ===
d3d11: d3d11.c:6109: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:6119: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
=== debian10 (64 bit WoW report) ===
d3d11: d3d11.c:6109: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:6119: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- v2: Avoid test failures on AMD.
dlls/d3d9/tests/d3d9ex.c | 9 +++++---- dlls/d3d9/tests/device.c | 9 +++++---- include/d3d9caps.h | 3 --- 3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 2639d20332b..38f49572fe4 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -4025,13 +4025,14 @@ static void test_device_caps(void) | D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING | D3DPMISCCAPS_FOGVERTEXCLAMPED | D3DPMISCCAPS_POSTBLENDSRGBCONVERT)), "PrimitiveMiscCaps field has unexpected flags %#x.\n", caps.PrimitiveMiscCaps); - ok(!(caps.RasterCaps & ~(D3DPRASTERCAPS_DITHER | D3DPRASTERCAPS_PAT | D3DPRASTERCAPS_ZTEST - | D3DPRASTERCAPS_FOGVERTEX | D3DPRASTERCAPS_FOGTABLE | D3DPRASTERCAPS_ANTIALIASEDGES - | D3DPRASTERCAPS_MIPMAPLODBIAS | D3DPRASTERCAPS_ZBIAS | D3DPRASTERCAPS_ZBUFFERLESSHSR + ok(!(caps.RasterCaps & ~(D3DPRASTERCAPS_DITHER | D3DPRASTERCAPS_ZTEST + | D3DPRASTERCAPS_FOGVERTEX | D3DPRASTERCAPS_FOGTABLE + | D3DPRASTERCAPS_MIPMAPLODBIAS | D3DPRASTERCAPS_ZBUFFERLESSHSR | D3DPRASTERCAPS_FOGRANGE | D3DPRASTERCAPS_ANISOTROPY | D3DPRASTERCAPS_WBUFFER | D3DPRASTERCAPS_WFOG | D3DPRASTERCAPS_ZFOG | D3DPRASTERCAPS_COLORPERSPECTIVE | D3DPRASTERCAPS_SCISSORTEST | D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS - | D3DPRASTERCAPS_DEPTHBIAS | D3DPRASTERCAPS_MULTISAMPLE_TOGGLE)), + | D3DPRASTERCAPS_DEPTHBIAS | D3DPRASTERCAPS_MULTISAMPLE_TOGGLE)) + || broken(!(caps.RasterCaps & ~0x0f736191)), "RasterCaps field has unexpected flags %#x.\n", caps.RasterCaps); /* D3DPBLENDCAPS_SRCCOLOR2 and D3DPBLENDCAPS_INVSRCCOLOR2 are only * advertised on the reference rasterizer and WARP. */ diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 1e8133b0c8e..170ad571246 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -12644,13 +12644,14 @@ static void test_device_caps(void) | D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING | D3DPMISCCAPS_FOGVERTEXCLAMPED | D3DPMISCCAPS_POSTBLENDSRGBCONVERT)), "PrimitiveMiscCaps field has unexpected flags %#x.\n", caps.PrimitiveMiscCaps); - ok(!(caps.RasterCaps & ~(D3DPRASTERCAPS_DITHER | D3DPRASTERCAPS_PAT | D3DPRASTERCAPS_ZTEST - | D3DPRASTERCAPS_FOGVERTEX | D3DPRASTERCAPS_FOGTABLE | D3DPRASTERCAPS_ANTIALIASEDGES - | D3DPRASTERCAPS_MIPMAPLODBIAS | D3DPRASTERCAPS_ZBIAS | D3DPRASTERCAPS_ZBUFFERLESSHSR + ok(!(caps.RasterCaps & ~(D3DPRASTERCAPS_DITHER | D3DPRASTERCAPS_ZTEST + | D3DPRASTERCAPS_FOGVERTEX | D3DPRASTERCAPS_FOGTABLE + | D3DPRASTERCAPS_MIPMAPLODBIAS | D3DPRASTERCAPS_ZBUFFERLESSHSR | D3DPRASTERCAPS_FOGRANGE | D3DPRASTERCAPS_ANISOTROPY | D3DPRASTERCAPS_WBUFFER | D3DPRASTERCAPS_WFOG | D3DPRASTERCAPS_ZFOG | D3DPRASTERCAPS_COLORPERSPECTIVE | D3DPRASTERCAPS_SCISSORTEST | D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS - | D3DPRASTERCAPS_DEPTHBIAS | D3DPRASTERCAPS_MULTISAMPLE_TOGGLE)), + | D3DPRASTERCAPS_DEPTHBIAS | D3DPRASTERCAPS_MULTISAMPLE_TOGGLE)) + || broken(!(caps.RasterCaps & ~0x0f736191)), "RasterCaps field has unexpected flags %#x.\n", caps.RasterCaps); /* D3DPBLENDCAPS_SRCCOLOR2 and D3DPBLENDCAPS_INVSRCCOLOR2 are only * advertised on the reference rasterizer and WARP. */ diff --git a/include/d3d9caps.h b/include/d3d9caps.h index 58fd3d91d01..feee0d4ce55 100644 --- a/include/d3d9caps.h +++ b/include/d3d9caps.h @@ -125,13 +125,10 @@ #endif
#define D3DPRASTERCAPS_DITHER __MSABI_LONG(0x00000001) -#define D3DPRASTERCAPS_PAT __MSABI_LONG(0x00000008) #define D3DPRASTERCAPS_ZTEST __MSABI_LONG(0x00000010) #define D3DPRASTERCAPS_FOGVERTEX __MSABI_LONG(0x00000080) #define D3DPRASTERCAPS_FOGTABLE __MSABI_LONG(0x00000100) -#define D3DPRASTERCAPS_ANTIALIASEDGES __MSABI_LONG(0x00001000) #define D3DPRASTERCAPS_MIPMAPLODBIAS __MSABI_LONG(0x00002000) -#define D3DPRASTERCAPS_ZBIAS __MSABI_LONG(0x00004000) #define D3DPRASTERCAPS_ZBUFFERLESSHSR __MSABI_LONG(0x00008000) #define D3DPRASTERCAPS_FOGRANGE __MSABI_LONG(0x00010000) #define D3DPRASTERCAPS_ANISOTROPY __MSABI_LONG(0x00020000)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=57187
Your paranoid android.
=== debian10 (32 bit report) ===
d3d11: d3d11.c:6109: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
d3d9: d3d9ex.c:3133: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0.
=== debian10 (32 bit Chinese:China report) ===
d3d11: d3d11.c:6109: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:16857: Test failed: Got {-1.00787401e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001}, expected {-1.00000000e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001} at (0, 0), sub-resource 0.
=== debian10 (32 bit WoW report) ===
d3d11: d3d11.c:6109: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:6119: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
d3d9: d3d9ex.c:3133: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0.
=== debian10 (64 bit WoW report) ===
d3d11: d3d11.c:6109: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:6119: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com