Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 3 --- dlls/d3d11/state.c | 1 + dlls/wined3d/device.c | 2 ++ dlls/wined3d/state.c | 10 +++++----- include/wine/wined3d.h | 1 + 5 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 82292662e4..555d998da2 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -937,7 +937,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon { wined3d_device_set_rasterizer_state(device->wined3d_device, NULL); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, FALSE); - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ANTIALIASEDLINEENABLE, FALSE); wined3d_mutex_unlock(); return; } @@ -946,8 +945,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
desc = &rasterizer_state_impl->desc; wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, desc->MultisampleEnable); - wined3d_device_set_render_state(device->wined3d_device, - WINED3D_RS_ANTIALIASEDLINEENABLE, desc->AntialiasedLineEnable); wined3d_mutex_unlock(); }
diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index 7402ff8ce8..dd2eb6306e 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -1084,6 +1084,7 @@ static HRESULT d3d_rasterizer_state_init(struct d3d_rasterizer_state *state, str wined3d_desc.scale_bias = desc->SlopeScaledDepthBias; wined3d_desc.depth_clip = desc->DepthClipEnable; wined3d_desc.scissor = desc->ScissorEnable; + wined3d_desc.line_antialias = desc->AntialiasedLineEnable;
/* We cannot fail after creating a wined3d_rasterizer_state object. It * would lead to double free. */ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 13b3348c04..bcad597178 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3603,6 +3603,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, case WINED3D_RS_SLOPESCALEDEPTHBIAS: case WINED3D_RS_DEPTHBIAS: case WINED3D_RS_SCISSORTESTENABLE: + case WINED3D_RS_ANTIALIASEDLINEENABLE: set_rasterizer_state = TRUE; break;
@@ -3633,6 +3634,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, desc.scale_bias = bias.f; desc.depth_clip = TRUE; desc.scissor = state->rs[WINED3D_RS_SCISSORTESTENABLE]; + desc.line_antialias = state->rs[WINED3D_RS_ANTIALIASEDLINEENABLE];
if ((entry = wine_rb_get(&device->rasterizer_states, &desc))) { diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 53daca8d52..ca59eba1d7 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1707,9 +1707,9 @@ static void state_msaa(struct wined3d_context *context, const struct wined3d_sta static void state_line_antialias(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info; + const struct wined3d_rasterizer_state *r = state->rasterizer_state;
- if (state->render_states[WINED3D_RS_EDGEANTIALIAS] - || state->render_states[WINED3D_RS_ANTIALIASEDLINEENABLE]) + if (state->render_states[WINED3D_RS_EDGEANTIALIAS] || (r && r->desc.line_antialias)) { gl_info->gl_ops.gl.p_glEnable(GL_LINE_SMOOTH); checkGLcall("glEnable(GL_LINE_SMOOTH)"); @@ -4334,6 +4334,7 @@ static void rasterizer(struct wined3d_context *context, const struct wined3d_sta cullmode(r, gl_info); depth_clip(r, gl_info); scissor(r, gl_info); + state_line_antialias(context, state, STATE_RENDER(WINED3D_RS_ANTIALIASEDLINEENABLE)); }
static void rasterizer_cc(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) @@ -4351,6 +4352,7 @@ static void rasterizer_cc(struct wined3d_context *context, const struct wined3d_ cullmode(r, gl_info); depth_clip(r, gl_info); scissor(r, gl_info); + state_line_antialias(context, state, STATE_RENDER(WINED3D_RS_ANTIALIASEDLINEENABLE)); }
static void psorigin_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) @@ -4511,7 +4513,6 @@ const struct wined3d_state_entry_template misc_state_template[] = { STATE_RENDER(WINED3D_RS_DESTBLEND), { STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE), NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE), { STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE), state_blend }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_EDGEANTIALIAS), { STATE_RENDER(WINED3D_RS_EDGEANTIALIAS), state_line_antialias}, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_ANTIALIASEDLINEENABLE), { STATE_RENDER(WINED3D_RS_ANTIALIASEDLINEENABLE), state_line_antialias}, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_SEPARATEALPHABLENDENABLE), { STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE), NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_SRCBLENDALPHA), { STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE), NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_DESTBLENDALPHA), { STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE), NULL }, WINED3D_GL_EXT_NONE }, @@ -5431,8 +5432,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) { 61, 127}, {149, 150}, {169, 169}, - {174, 175}, - {177, 177}, + {174, 177}, {193, 193}, {195, 197}, { 0, 0}, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 211e9d37d0..7691064f6e 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2041,6 +2041,7 @@ struct wined3d_rasterizer_state_desc float scale_bias; BOOL depth_clip; BOOL scissor; + BOOL line_antialias; };
struct wined3d_sampler_desc