This fix a regression introduced by a9e199e5ad76c0540381f25011d6051ace3e7c0a, which is causing ULTIMATE MARVEL VS CAPCOM 3 (SteamID: 357190) to have black artifacts in characters.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/d3d9/tests/visual.c | 2 +- dlls/wined3d/cs.c | 7 +++++-- dlls/wined3d/state.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index c7de570b42..55d2223212 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -11206,7 +11206,7 @@ static void stencil_cull_test(void) ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 280, 360); - todo_wine ok(color == 0x000000f0, "has color 0x%08x, expected 0x00000090\n", color); + ok(color == 0x000000f0, "has color 0x%08x, expected 0x00000090\n", color);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 32f9954a03..044d586b29 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1152,9 +1152,12 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILWRITEMASK)); device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIAS)); } - else if (prev && prev->format->depth_bias_scale != op->view->format->depth_bias_scale) + else if (prev) { - device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIAS)); + if (prev->format->depth_bias_scale != op->view->format->depth_bias_scale) + device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIAS)); + if (prev->format->stencil_size != op->view->format->stencil_size) + device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILREF)); }
device_invalidate_state(device, STATE_FRAMEBUFFER); diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 4cdca277f6..54c0c67fba 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -925,7 +925,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_ if (!(func_back = wined3d_gl_compare_func(state->render_states[WINED3D_RS_BACK_STENCILFUNC]))) func_back = GL_ALWAYS; mask = state->render_states[WINED3D_RS_STENCILMASK]; - ref = state->render_states[WINED3D_RS_STENCILREF] & mask; + ref = state->render_states[WINED3D_RS_STENCILREF] & ((1 << state->fb->depth_stencil->format->stencil_size) - 1); stencilFail = gl_stencil_op(state->render_states[WINED3D_RS_STENCILFAIL]); depthFail = gl_stencil_op(state->render_states[WINED3D_RS_STENCILZFAIL]); stencilPass = gl_stencil_op(state->render_states[WINED3D_RS_STENCILPASS]);
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=55682
Your paranoid android.
=== debian10 (32 bit report) ===
d3d9: visual.c:9410: Test failed: Test 0 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 6 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 10 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 11 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 12 shading has color1 000000ff, expected 0000ff00. visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 0, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 1, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 2, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 3, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 4, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 5, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 6, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 7, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 8, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 9, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 10, 7, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 11, 7, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 12, 7, size 0). visual.c:20796: Test failed: Expected color 0x00000000, got 0x000000ff, format D3DFMT_Q8W8V8U8, test 0, location 3x2. visual.c:20796: Test failed: Expected color 0x00000000, got 0x000000ff, format D3DFMT_Q8W8V8U8, test 2, location 3x2. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 80. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 80. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 80. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 77. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 77. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 77. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 75. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 75. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 75. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 1515474505. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 1515474505. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 1515474505. visual.c:25206: Test failed: Expected unsynchronised map for flags 0x1000. visual.c:25206: Test failed: Expected unsynchronised map for flags 0x3000.
=== debian10 (32 bit French report) ===
d3d9: visual.c:9410: Test failed: Test 0 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 6 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 10 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 11 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 12 shading has color1 000000ff, expected 0000ff00. visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 0, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 1, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 2, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 3, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 4, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 5, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 6, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 7, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 8, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 9, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 10, 7, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 11, 7, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 12, 7, size 0). visual.c:20796: Test failed: Expected color 0x00000000, got 0x000000ff, format D3DFMT_Q8W8V8U8, test 0, location 3x2. visual.c:20796: Test failed: Expected color 0x00000000, got 0x000000ff, format D3DFMT_Q8W8V8U8, test 2, location 3x2. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 80. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 80. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 80. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 77. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 77. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 77. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 75. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 75. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 75. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 1515474505. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 1515474505. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 1515474505. visual.c:25206: Test failed: Expected unsynchronised map for flags 0x1000. visual.c:25206: Test failed: Expected unsynchronised map for flags 0x3000.
=== debian10 (32 bit Japanese:Japan report) ===
d3d9: visual.c:9410: Test failed: Test 0 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 6 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 10 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 11 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 12 shading has color1 000000ff, expected 0000ff00. visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 0, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 1, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 2, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 3, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 4, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 5, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 6, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 7, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 8, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 9, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 10, 7, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 11, 7, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 12, 7, size 0). visual.c:20796: Test failed: Expected color 0x00000000, got 0x000000ff, format D3DFMT_Q8W8V8U8, test 0, location 3x2. visual.c:20796: Test failed: Expected color 0x00000000, got 0x000000ff, format D3DFMT_Q8W8V8U8, test 2, location 3x2. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 80. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 80. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 80. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 77. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 77. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 77. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 75. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 75. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 75. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 1515474505. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 1515474505. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 1515474505. visual.c:25206: Test failed: Expected unsynchronised map for flags 0x1000. visual.c:25206: Test failed: Expected unsynchronised map for flags 0x3000.
=== debian10 (32 bit Chinese:China report) ===
d3d9: visual.c:9410: Test failed: Test 0 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 6 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 10 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 11 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 12 shading has color1 000000ff, expected 0000ff00. visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 0, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 1, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 2, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 3, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 4, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 5, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 6, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 7, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 8, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 9, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 10, 7, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 11, 7, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 12, 7, size 0). visual.c:20796: Test failed: Expected color 0x00000000, got 0x000000ff, format D3DFMT_Q8W8V8U8, test 0, location 3x2. visual.c:20796: Test failed: Expected color 0x00000000, got 0x000000ff, format D3DFMT_Q8W8V8U8, test 2, location 3x2. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 80. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 80. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 80. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 77. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 77. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 77. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 75. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 75. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 75. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 1515474505. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 1515474505. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 1515474505. visual.c:25206: Test failed: Expected unsynchronised map for flags 0x1000. visual.c:25206: Test failed: Expected unsynchronised map for flags 0x3000.
=== debian10 (32 bit WoW report) ===
d3d9: visual.c:9410: Test failed: Test 0 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 6 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 10 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 11 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 12 shading has color1 000000ff, expected 0000ff00. visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 0, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 1, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 2, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 3, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 4, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 5, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 6, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 7, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 8, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 9, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 10, 7, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 11, 7, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 12, 7, size 0). visual.c:20796: Test failed: Expected color 0x00000000, got 0x000000ff, format D3DFMT_Q8W8V8U8, test 0, location 3x2. visual.c:20796: Test failed: Expected color 0x00000000, got 0x000000ff, format D3DFMT_Q8W8V8U8, test 2, location 3x2. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 80. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 80. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 80. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 77. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 77. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 77. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 75. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 75. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 75. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 1515474505. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 1515474505. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 1515474505. visual.c:25206: Test failed: Expected unsynchronised map for flags 0x1000. visual.c:25206: Test failed: Expected unsynchronised map for flags 0x3000.
=== debian10 (64 bit WoW report) ===
d3d9: visual.c:9410: Test failed: Test 0 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 6 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 10 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 11 shading has color1 000000ff, expected 0000ff00. visual.c:9410: Test failed: Test 12 shading has color1 000000ff, expected 0000ff00. visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 0, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 1, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 2, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 3, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 4, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 5, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 6, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 7, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 8, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x00ff0000 (case 9, 3, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 10, 7, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 11, 7, size 0). visual.c:11967: Test failed: Got unexpected color 0x0000ff00 (case 12, 7, size 0). visual.c:20796: Test failed: Expected color 0x00000000, got 0x000000ff, format D3DFMT_Q8W8V8U8, test 0, location 3x2. visual.c:20796: Test failed: Expected color 0x00000000, got 0x000000ff, format D3DFMT_Q8W8V8U8, test 2, location 3x2. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 80. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 80. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 80. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 77. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 77. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 77. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 75. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 75. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 75. visual.c:22059: Test failed: Got unexpected color 00ffffff at x=64, format 1515474505. visual.c:22066: Test failed: Got unexpected color 000000ff at x=194, format 1515474505. visual.c:22076: Test failed: Got unexpected color 00000000 at x=446, format 1515474505. visual.c:25206: Test failed: Expected unsynchronised map for flags 0x1000. visual.c:25206: Test failed: Expected unsynchronised map for flags 0x3000.