The actual effect of this is to change the algorithm for line multisampling.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d10core/tests/d3d10core.c | 10 ++++------ dlls/d3d11/device.c | 17 +++-------------- dlls/d3d11/state.c | 7 +++++++ dlls/d3d11/tests/d3d11.c | 10 ++++------ 4 files changed, 18 insertions(+), 26 deletions(-)
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index 6c0a1c04120..41a16d9e5b8 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -19056,9 +19056,8 @@ static void test_multisample_draw(void) for (i = 0; i < ARRAY_SIZE(pixels); ++i) { color = get_texture_color(test_context.backbuffer, pixels[i].x, pixels[i].y); - todo_wine_if (pixels[i].colour_tri != 0xff000000 && pixels[i].colour_tri != 0xffffffff) - ok(compare_color(color, pixels[i].colour_tri, 1), - "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); + ok(compare_color(color, pixels[i].colour_tri, 1), + "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); }
ID3D10Device_ClearRenderTargetView(device, rtv, black); @@ -19070,9 +19069,8 @@ static void test_multisample_draw(void) for (i = 0; i < ARRAY_SIZE(pixels); ++i) { color = get_texture_color(test_context.backbuffer, pixels[i].x, pixels[i].y); - todo_wine_if (pixels[i].colour_line != 0xff000000 && pixels[i].colour_line != 0xffffffff) - ok(compare_color(color, pixels[i].colour_line, 1), - "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); + ok(compare_color(color, pixels[i].colour_line, 1), + "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); }
ID3D10RasterizerState_Release(rs); diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index ee6ecd2c29c..a2c6c7a75ae 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1142,25 +1142,14 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon ID3D11RasterizerState *rasterizer_state) { struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); struct d3d_rasterizer_state *rasterizer_state_impl; - const D3D11_RASTERIZER_DESC *desc;
TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state);
wined3d_mutex_lock(); - if (!(rasterizer_state_impl = unsafe_impl_from_ID3D11RasterizerState(rasterizer_state))) - { - wined3d_device_context_set_rasterizer_state(context->wined3d_context, NULL); - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, FALSE); - wined3d_mutex_unlock(); - return; - } - - wined3d_device_context_set_rasterizer_state(context->wined3d_context, rasterizer_state_impl->wined3d_state); - - desc = &rasterizer_state_impl->desc; - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, desc->MultisampleEnable); + rasterizer_state_impl = unsafe_impl_from_ID3D11RasterizerState(rasterizer_state); + wined3d_device_context_set_rasterizer_state(context->wined3d_context, + rasterizer_state_impl ? rasterizer_state_impl->wined3d_state : NULL); wined3d_mutex_unlock(); }
diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index 6b287176536..d31ea16bbe8 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -1152,6 +1152,13 @@ static HRESULT d3d_rasterizer_state_init(struct d3d_rasterizer_state *state, str wined3d_desc.scissor = desc->ScissorEnable; wined3d_desc.line_antialias = desc->AntialiasedLineEnable;
+ if (desc->MultisampleEnable) + { + static unsigned int once; + if (!once++) + FIXME("Ignoring MultisampleEnable %#x.\n", desc->MultisampleEnable); + } + /* We cannot fail after creating a wined3d_rasterizer_state object. It * would lead to double free. */ if (FAILED(hr = wined3d_rasterizer_state_create(device->wined3d_device, &wined3d_desc, diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index ddb49d4166b..7229f44d6d2 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -32595,9 +32595,8 @@ static void test_multisample_draw(const D3D_FEATURE_LEVEL feature_level) for (i = 0; i < ARRAY_SIZE(pixels); ++i) { color = get_texture_color(test_context.backbuffer, pixels[i].x, pixels[i].y); - todo_wine_if (pixels[i].colour_tri != 0xff000000 && pixels[i].colour_tri != 0xffffffff) - ok(compare_color(color, pixels[i].colour_tri, 1), - "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); + ok(compare_color(color, pixels[i].colour_tri, 1), + "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); }
ID3D11DeviceContext_ClearRenderTargetView(context, rtv, black); @@ -32609,9 +32608,8 @@ static void test_multisample_draw(const D3D_FEATURE_LEVEL feature_level) for (i = 0; i < ARRAY_SIZE(pixels); ++i) { color = get_texture_color(test_context.backbuffer, pixels[i].x, pixels[i].y); - todo_wine_if (pixels[i].colour_line != 0xff000000 && pixels[i].colour_line != 0xffffffff) - ok(compare_color(color, pixels[i].colour_line, 1), - "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); + ok(compare_color(color, pixels[i].colour_line, 1), + "Got unexpected color 0x%08x at (%u, %u).\n", color, pixels[i].x, pixels[i].y); }
ID3D11RasterizerState_Release(rs);