Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/tests/ddraw7.c | 72 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+)
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 423dba57c9..168253e468 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -15822,6 +15822,77 @@ static void test_clipper_refcount(void) DestroyWindow(window); }
+static void test_begin_end_state_block(void) +{ + DWORD stateblock, stateblock2; + IDirect3DDevice7 *device; + ULONG refcount; + DWORD value; + HWND window; + HRESULT hr; + + window = create_window(); + if (!(device = create_device(window, DDSCL_NORMAL))) + { + skip("Failed to create 3D device.\n"); + DestroyWindow(window); + return; + } + + hr = IDirect3DDevice7_BeginStateBlock(device); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + stateblock = 0xdeadbeef; + hr = IDirect3DDevice7_EndStateBlock(device, &stateblock); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(!!stateblock && stateblock != 0xdeadbeef, "Got unexpected stateblock %#x.\n", stateblock); + + stateblock2 = 0xdeadbeef; + hr = IDirect3DDevice7_EndStateBlock(device, &stateblock2); + todo_wine ok(hr == D3DERR_NOTINBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(stateblock2 == 0xdeadbeef, "Got unexpected stateblock %#x.\n", stateblock2); + + hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_LIGHTING, &value); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(value == TRUE, "Got unexpected value %#x.\n", value); + + hr = IDirect3DDevice7_BeginStateBlock(device); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice7_BeginStateBlock(device); + todo_wine ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice7_ApplyStateBlock(device, stateblock); + todo_wine ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice7_CaptureStateBlock(device, stateblock); + todo_wine ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice7_CreateStateBlock(device, D3DSBT_ALL, &stateblock2); + todo_wine ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_LIGHTING, &value); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(value == TRUE, "Got unexpected value %#x.\n", value); + + hr = IDirect3DDevice7_EndStateBlock(device, &stateblock2); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice7_ApplyStateBlock(device, stateblock2); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_LIGHTING, &value); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(value == TRUE, "Got unexpected value %#x.\n", value); + + refcount = IDirect3DDevice7_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + DestroyWindow(window); +} + START_TEST(ddraw7) { DDDEVICEIDENTIFIER2 identifier; @@ -15966,4 +16037,5 @@ START_TEST(ddraw7) test_multiply_transform(); test_alphatest(); test_clipper_refcount(); + test_begin_end_state_block(); }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/ddraw_private.h | 2 ++ dlls/ddraw/device.c | 10 +++++++++- dlls/ddraw/tests/ddraw7.c | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 2e58123463..19f21a8923 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -346,6 +346,8 @@ struct d3d_device D3DMATRIXHANDLE world, proj, view;
struct wined3d_vec4 user_clip_planes[D3DMAXUSERCLIPPLANES]; + + BOOL recording; };
HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUnknown *rt_iface, diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index adfbc4152b..4ab7621e1a 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5644,7 +5644,14 @@ static HRESULT d3d_device7_BeginStateBlock(IDirect3DDevice7 *iface) TRACE("iface %p.\n", iface);
wined3d_mutex_lock(); - hr = wined3d_device_begin_stateblock(device->wined3d_device); + if (device->recording) + { + wined3d_mutex_unlock(); + WARN("Trying to begin a stateblock while recording, returning D3DERR_INBEGINSTATEBLOCK.\n"); + return D3DERR_INBEGINSTATEBLOCK; + } + if (SUCCEEDED(hr = wined3d_device_begin_stateblock(device->wined3d_device))) + device->recording = TRUE; wined3d_mutex_unlock();
return hr_ddraw_from_wined3d(hr); @@ -5705,6 +5712,7 @@ static HRESULT d3d_device7_EndStateBlock(IDirect3DDevice7 *iface, DWORD *statebl *stateblock = 0; return hr_ddraw_from_wined3d(hr); } + device->recording = FALSE;
h = ddraw_allocate_handle(&device->handle_table, wined3d_sb, DDRAW_HANDLE_STATEBLOCK); if (h == DDRAW_INVALID_HANDLE) diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 168253e468..c0d2aad06d 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -15863,7 +15863,7 @@ static void test_begin_end_state_block(void) ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice7_BeginStateBlock(device); - todo_wine ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice7_ApplyStateBlock(device, stateblock); todo_wine ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr);
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=50542
Your paranoid android.
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/device.c | 7 ++++++- dlls/ddraw/tests/ddraw7.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 4ab7621e1a..49eb664576 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5703,7 +5703,12 @@ static HRESULT d3d_device7_EndStateBlock(IDirect3DDevice7 *iface, DWORD *statebl return DDERR_INVALIDPARAMS;
wined3d_mutex_lock(); - + if (!device->recording) + { + wined3d_mutex_unlock(); + WARN("Trying to end a stateblock, but no stateblock is being recorded.\n"); + return D3DERR_NOTINBEGINSTATEBLOCK; + } hr = wined3d_device_end_stateblock(device->wined3d_device, &wined3d_sb); if (FAILED(hr)) { diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index c0d2aad06d..e10aedbc16 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -15852,8 +15852,8 @@ static void test_begin_end_state_block(void)
stateblock2 = 0xdeadbeef; hr = IDirect3DDevice7_EndStateBlock(device, &stateblock2); - todo_wine ok(hr == D3DERR_NOTINBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); - todo_wine ok(stateblock2 == 0xdeadbeef, "Got unexpected stateblock %#x.\n", stateblock2); + ok(hr == D3DERR_NOTINBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + ok(stateblock2 == 0xdeadbeef, "Got unexpected stateblock %#x.\n", stateblock2);
hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_LIGHTING, &value); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
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=50543
Your paranoid android.
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/device.c | 6 ++++++ dlls/ddraw/tests/ddraw7.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 49eb664576..0ddf9a8d08 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5822,6 +5822,12 @@ static HRESULT d3d_device7_ApplyStateBlock(IDirect3DDevice7 *iface, DWORD stateb TRACE("iface %p, stateblock %#x.\n", iface, stateblock);
wined3d_mutex_lock(); + if (device->recording) + { + wined3d_mutex_unlock(); + WARN("Trying to apply a stateblock while recording, returning D3DERR_INBEGINSTATEBLOCK.\n"); + return D3DERR_INBEGINSTATEBLOCK; + } wined3d_sb = ddraw_get_object(&device->handle_table, stateblock - 1, DDRAW_HANDLE_STATEBLOCK); if (!wined3d_sb) { diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index e10aedbc16..ff73eea424 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -15866,7 +15866,7 @@ static void test_begin_end_state_block(void) ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice7_ApplyStateBlock(device, stateblock); - todo_wine ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice7_CaptureStateBlock(device, stateblock); todo_wine ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); @@ -15886,7 +15886,7 @@ static void test_begin_end_state_block(void)
hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_LIGHTING, &value); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - todo_wine ok(value == TRUE, "Got unexpected value %#x.\n", value); + ok(value == TRUE, "Got unexpected value %#x.\n", value);
refcount = IDirect3DDevice7_Release(device); ok(!refcount, "Device has %u references left.\n", refcount);
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=50544
Your paranoid android.
=== wvistau64_he (32 bit report) ===
ddraw: ddraw7.c:2719: Test failed: Expected message 0x46, but didn't receive it. ddraw7.c:2721: Test failed: Expected screen size 1024x768, got 0x0. ddraw7.c:2727: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2757: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2764: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2790: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2813: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2835: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2861: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2881: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2917: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2927: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2953: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2976: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2998: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:3024: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:3044: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:3081: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746).
=== wvistau64 (64 bit report) ===
ddraw: ddraw7.c:2719: Test failed: Expected message 0x46, but didn't receive it. ddraw7.c:2721: Test failed: Expected screen size 1024x768, got 0x0. ddraw7.c:2727: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2757: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2764: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2790: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2813: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2835: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2861: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2881: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2917: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2927: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2953: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2976: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:2998: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:3024: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:3044: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746). ddraw7.c:3081: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,746).
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/device.c | 6 ++++++ dlls/ddraw/tests/ddraw7.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 0ddf9a8d08..b471612507 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5882,6 +5882,12 @@ static HRESULT d3d_device7_CaptureStateBlock(IDirect3DDevice7 *iface, DWORD stat TRACE("iface %p, stateblock %#x.\n", iface, stateblock);
wined3d_mutex_lock(); + if (device->recording) + { + wined3d_mutex_unlock(); + WARN("Trying to capture a stateblock while recording, returning D3DERR_INBEGINSTATEBLOCK.\n"); + return D3DERR_INBEGINSTATEBLOCK; + } wined3d_sb = ddraw_get_object(&device->handle_table, stateblock - 1, DDRAW_HANDLE_STATEBLOCK); if (!wined3d_sb) { diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index ff73eea424..61042e319b 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -15869,7 +15869,7 @@ static void test_begin_end_state_block(void) ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice7_CaptureStateBlock(device, stateblock); - todo_wine ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice7_CreateStateBlock(device, D3DSBT_ALL, &stateblock2); todo_wine ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr);
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=50545
Your paranoid android.
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/device.c | 7 +++++++ dlls/ddraw/tests/ddraw7.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index b471612507..003ce1d2e4 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -6018,6 +6018,13 @@ static HRESULT d3d_device7_CreateStateBlock(IDirect3DDevice7 *iface,
wined3d_mutex_lock();
+ if (device->recording) + { + wined3d_mutex_unlock(); + WARN("Trying to apply a stateblock while recording, returning D3DERR_INBEGINSTATEBLOCK.\n"); + return D3DERR_INBEGINSTATEBLOCK; + } + /* The D3DSTATEBLOCKTYPE enum is fine here. */ hr = wined3d_stateblock_create(device->wined3d_device, type, &wined3d_sb); if (FAILED(hr)) diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 61042e319b..5f066a6257 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -15872,7 +15872,7 @@ static void test_begin_end_state_block(void) ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice7_CreateStateBlock(device, D3DSBT_ALL, &stateblock2); - todo_wine ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INBEGINSTATEBLOCK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_LIGHTING, &value); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
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=50546
Your paranoid android.
=== w8adm (32 bit report) ===
ddraw: ddraw7.c:3798: Test failed: Lit quad without normals has color 0x00ff00ff, expected 0x00000000. ddraw7.c:3802: Test failed: Lit quad with normals has color 0x00ff00ff, expected 0x00000000. ddraw7.c:3826: Test failed: Lit quad with light has color 0x00ff00ff. ddraw7.c:3826: Test failed: Lit quad with singular world matrix has color 0x00ff00ff. ddraw7.c:3826: Test failed: Lit quad with transformation matrix has color 0x00ff00ff. ddraw7.c:3826: Test failed: Lit quad with non-affine matrix has color 0x00ff00ff.
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
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=50541
Your paranoid android.
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)