Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 2 -- dlls/d3d11/state.c | 2 ++ dlls/wined3d/adapter_vk.c | 2 -- dlls/wined3d/context_vk.c | 14 +++++++------- dlls/wined3d/device.c | 13 +++++++++++++ dlls/wined3d/directx.c | 2 -- dlls/wined3d/state.c | 9 ++++----- include/wine/wined3d.h | 7 +++++++ 8 files changed, 33 insertions(+), 18 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 159d3f36334..c913a590dab 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -766,7 +766,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3 wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILFAIL, front->StencilFailOp); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILZFAIL, front->StencilDepthFailOp); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILPASS, front->StencilPassOp); - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILFUNC, front->StencilFunc); if (front->StencilFailOp != back->StencilFailOp || front->StencilDepthFailOp != back->StencilDepthFailOp || front->StencilPassOp != back->StencilPassOp @@ -777,7 +776,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3 wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BACK_STENCILZFAIL, back->StencilDepthFailOp); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BACK_STENCILPASS, back->StencilPassOp); - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BACK_STENCILFUNC, back->StencilFunc); } else { diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index c0be2fe592b..14d91c68e86 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -799,6 +799,8 @@ HRESULT d3d_depthstencil_state_create(struct d3d_device *device, const D3D11_DEP wined3d_desc.stencil = desc->StencilEnable; wined3d_desc.stencil_read_mask = desc->StencilReadMask; wined3d_desc.stencil_write_mask = desc->StencilWriteMask; + wined3d_desc.front.func = desc->FrontFace.StencilFunc; + wined3d_desc.back.func = desc->BackFace.StencilFunc;
/* We cannot fail after creating a wined3d_depth_stencil_state object. It * would lead to double free. */ diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index 80b06482e64..4ab21cd7998 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -120,13 +120,11 @@ static const struct wined3d_state_entry_template misc_state_template_vk[] = {STATE_RENDER(WINED3D_RS_STENCILFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_STENCILZFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_STENCILPASS), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, - {STATE_RENDER(WINED3D_RS_STENCILFUNC), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_STENCILREF), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_BACK_STENCILFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_BACK_STENCILPASS), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, - {STATE_RENDER(WINED3D_RS_BACK_STENCILFUNC), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_WRAP0), {STATE_RENDER(WINED3D_RS_WRAP0), state_nop}}, {STATE_RENDER(WINED3D_RS_WRAP1), {STATE_RENDER(WINED3D_RS_WRAP0)}}, {STATE_RENDER(WINED3D_RS_WRAP2), {STATE_RENDER(WINED3D_RS_WRAP0)}}, diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index 26cd3f5a4ef..23b4fcbc90c 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -2050,12 +2050,18 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte key->ds_desc.front.passOp = vk_stencil_op_from_wined3d(state->render_states[WINED3D_RS_STENCILPASS]); key->ds_desc.front.depthFailOp = vk_stencil_op_from_wined3d( state->render_states[WINED3D_RS_STENCILZFAIL]); - key->ds_desc.front.compareOp = vk_compare_op_from_wined3d(state->render_states[WINED3D_RS_STENCILFUNC]); + key->ds_desc.front.compareOp = vk_compare_op_from_wined3d(d->desc.front.func); key->ds_desc.front.compareMask = d->desc.stencil_read_mask; key->ds_desc.front.writeMask = d->desc.stencil_write_mask; key->ds_desc.front.reference = state->render_states[WINED3D_RS_STENCILREF] & ((1 << state->fb.depth_stencil->format->stencil_size) - 1);
+ key->ds_desc.back.compareOp = vk_compare_op_from_wined3d(d->desc.back.func); + key->ds_desc.back.compareMask = d->desc.stencil_read_mask; + key->ds_desc.back.writeMask = d->desc.stencil_write_mask; + key->ds_desc.back.reference = state->render_states[WINED3D_RS_STENCILREF] + & ((1 << state->fb.depth_stencil->format->stencil_size) - 1); + if (state->render_states[WINED3D_RS_TWOSIDEDSTENCILMODE]) { key->ds_desc.back.failOp = vk_stencil_op_from_wined3d( @@ -2064,12 +2070,6 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte state->render_states[WINED3D_RS_BACK_STENCILPASS]); key->ds_desc.back.depthFailOp = vk_stencil_op_from_wined3d( state->render_states[WINED3D_RS_BACK_STENCILZFAIL]); - key->ds_desc.back.compareOp = vk_compare_op_from_wined3d( - state->render_states[WINED3D_RS_BACK_STENCILFUNC]); - key->ds_desc.back.compareMask = d->desc.stencil_read_mask; - key->ds_desc.back.writeMask = d->desc.stencil_write_mask; - key->ds_desc.back.reference = state->render_states[WINED3D_RS_STENCILREF] - & ((1 << state->fb.depth_stencil->format->stencil_size) - 1); } else { diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 754dd7693c9..c72ae633fcc 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3685,9 +3685,12 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, set_blend_state = TRUE; break;
+ case WINED3D_RS_BACK_STENCILFUNC: case WINED3D_RS_STENCILENABLE: + case WINED3D_RS_STENCILFUNC: case WINED3D_RS_STENCILMASK: case WINED3D_RS_STENCILWRITEMASK: + case WINED3D_RS_TWOSIDEDSTENCILMODE: case WINED3D_RS_ZENABLE: case WINED3D_RS_ZWRITEENABLE: set_depth_stencil_state = TRUE; @@ -3847,6 +3850,16 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, desc.stencil = state->rs[WINED3D_RS_STENCILENABLE]; desc.stencil_read_mask = state->rs[WINED3D_RS_STENCILMASK]; desc.stencil_write_mask = state->rs[WINED3D_RS_STENCILWRITEMASK]; + desc.front.func = state->rs[WINED3D_RS_STENCILFUNC]; + + if (state->rs[WINED3D_RS_TWOSIDEDSTENCILMODE]) + { + desc.back.func = state->rs[WINED3D_RS_BACK_STENCILFUNC]; + } + else + { + desc.back = desc.front; + }
if ((entry = wine_rb_get(&device->depth_stencil_states, &desc))) { diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index c31cf06ec26..e3f0e0bdb85 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2442,13 +2442,11 @@ static const struct wined3d_state_entry_template misc_state_template_no3d[] = {STATE_RENDER(WINED3D_RS_STENCILFAIL), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_STENCILZFAIL), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_STENCILPASS), {STATE_VDECL}}, - {STATE_RENDER(WINED3D_RS_STENCILFUNC), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_STENCILREF), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_BACK_STENCILFAIL), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_BACK_STENCILPASS), {STATE_VDECL}}, - {STATE_RENDER(WINED3D_RS_BACK_STENCILFUNC), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_WRAP0), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_WRAP1), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_WRAP2), {STATE_VDECL}}, diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 4a1a7c80b8f..1819155fae3 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1078,9 +1078,9 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_ }
twosided_enable = state->render_states[WINED3D_RS_TWOSIDEDSTENCILMODE]; - if (!(func = wined3d_gl_compare_func(state->render_states[WINED3D_RS_STENCILFUNC]))) + if (!(func = wined3d_gl_compare_func(d->desc.front.func))) func = GL_ALWAYS; - if (!(func_back = wined3d_gl_compare_func(state->render_states[WINED3D_RS_BACK_STENCILFUNC]))) + if (!(func_back = wined3d_gl_compare_func(d->desc.back.func))) func_back = GL_ALWAYS; mask = d->desc.stencil_read_mask; ref = state->render_states[WINED3D_RS_STENCILREF] & ((1 << state->fb.depth_stencil->format->stencil_size) - 1); @@ -4769,13 +4769,11 @@ const struct wined3d_state_entry_template misc_state_template_gl[] = { STATE_RENDER(WINED3D_RS_STENCILFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_STENCILZFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_STENCILPASS), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_STENCILFUNC), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_STENCILREF), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_BACK_STENCILFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_BACK_STENCILPASS), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_BACK_STENCILFUNC), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_WRAP0), { STATE_RENDER(WINED3D_RS_WRAP0), state_wrap }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_WRAP1), { STATE_RENDER(WINED3D_RS_WRAP0), NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_WRAP2), { STATE_RENDER(WINED3D_RS_WRAP0), NULL }, WINED3D_GL_EXT_NONE }, @@ -5575,6 +5573,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) { 42, 45}, { 47, 47}, { 52, 52}, + { 56, 56}, { 58, 59}, { 61, 127}, {149, 150}, @@ -5582,7 +5581,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) {168, 169}, {171, 171}, {174, 177}, - {190, 193}, + {189, 193}, {195, 197}, {206, 209}, { 0, 0}, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index f77f7dec7eb..f9a4402873f 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2036,6 +2036,11 @@ struct wined3d_blend_state_desc } rt[WINED3D_MAX_RENDER_TARGETS]; };
+struct wined3d_stencil_op_desc +{ + enum wined3d_cmp_func func; +}; + struct wined3d_depth_stencil_state_desc { BOOL depth; @@ -2043,6 +2048,8 @@ struct wined3d_depth_stencil_state_desc BOOL stencil; unsigned int stencil_read_mask; unsigned int stencil_write_mask; + struct wined3d_stencil_op_desc front; + struct wined3d_stencil_op_desc back; };
struct wined3d_rasterizer_state_desc
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 2 -- dlls/d3d11/state.c | 2 ++ dlls/wined3d/adapter_vk.c | 2 -- dlls/wined3d/context_vk.c | 5 ++--- dlls/wined3d/device.c | 4 ++++ dlls/wined3d/directx.c | 2 -- dlls/wined3d/state.c | 10 ++++------ include/wine/wined3d.h | 1 + 8 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index c913a590dab..a386abd4c00 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -765,7 +765,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILFAIL, front->StencilFailOp); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILZFAIL, front->StencilDepthFailOp); - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILPASS, front->StencilPassOp); if (front->StencilFailOp != back->StencilFailOp || front->StencilDepthFailOp != back->StencilDepthFailOp || front->StencilPassOp != back->StencilPassOp @@ -775,7 +774,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3 wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BACK_STENCILFAIL, back->StencilFailOp); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BACK_STENCILZFAIL, back->StencilDepthFailOp); - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BACK_STENCILPASS, back->StencilPassOp); } else { diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index 14d91c68e86..f2fe8a5910b 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -799,7 +799,9 @@ HRESULT d3d_depthstencil_state_create(struct d3d_device *device, const D3D11_DEP wined3d_desc.stencil = desc->StencilEnable; wined3d_desc.stencil_read_mask = desc->StencilReadMask; wined3d_desc.stencil_write_mask = desc->StencilWriteMask; + wined3d_desc.front.pass_op = desc->FrontFace.StencilPassOp; wined3d_desc.front.func = desc->FrontFace.StencilFunc; + wined3d_desc.back.pass_op = desc->BackFace.StencilPassOp; wined3d_desc.back.func = desc->BackFace.StencilFunc;
/* We cannot fail after creating a wined3d_depth_stencil_state object. It diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index 4ab21cd7998..f950f2a4711 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -119,12 +119,10 @@ static const struct wined3d_state_entry_template misc_state_template_vk[] = {STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), {STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), state_nop}}, {STATE_RENDER(WINED3D_RS_STENCILFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_STENCILZFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, - {STATE_RENDER(WINED3D_RS_STENCILPASS), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_STENCILREF), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_BACK_STENCILFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, - {STATE_RENDER(WINED3D_RS_BACK_STENCILPASS), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_WRAP0), {STATE_RENDER(WINED3D_RS_WRAP0), state_nop}}, {STATE_RENDER(WINED3D_RS_WRAP1), {STATE_RENDER(WINED3D_RS_WRAP0)}}, {STATE_RENDER(WINED3D_RS_WRAP2), {STATE_RENDER(WINED3D_RS_WRAP0)}}, diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index 23b4fcbc90c..e5e2a275fd0 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -2047,7 +2047,7 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte if (key->ds_desc.stencilTestEnable) { key->ds_desc.front.failOp = vk_stencil_op_from_wined3d(state->render_states[WINED3D_RS_STENCILFAIL]); - key->ds_desc.front.passOp = vk_stencil_op_from_wined3d(state->render_states[WINED3D_RS_STENCILPASS]); + key->ds_desc.front.passOp = vk_stencil_op_from_wined3d(d->desc.front.pass_op); key->ds_desc.front.depthFailOp = vk_stencil_op_from_wined3d( state->render_states[WINED3D_RS_STENCILZFAIL]); key->ds_desc.front.compareOp = vk_compare_op_from_wined3d(d->desc.front.func); @@ -2056,6 +2056,7 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte key->ds_desc.front.reference = state->render_states[WINED3D_RS_STENCILREF] & ((1 << state->fb.depth_stencil->format->stencil_size) - 1);
+ key->ds_desc.back.passOp = vk_stencil_op_from_wined3d(d->desc.back.pass_op); key->ds_desc.back.compareOp = vk_compare_op_from_wined3d(d->desc.back.func); key->ds_desc.back.compareMask = d->desc.stencil_read_mask; key->ds_desc.back.writeMask = d->desc.stencil_write_mask; @@ -2066,8 +2067,6 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte { key->ds_desc.back.failOp = vk_stencil_op_from_wined3d( state->render_states[WINED3D_RS_BACK_STENCILFAIL]); - key->ds_desc.back.passOp = vk_stencil_op_from_wined3d( - state->render_states[WINED3D_RS_BACK_STENCILPASS]); key->ds_desc.back.depthFailOp = vk_stencil_op_from_wined3d( state->render_states[WINED3D_RS_BACK_STENCILZFAIL]); } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index c72ae633fcc..8ba834c4f5d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3686,9 +3686,11 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, break;
case WINED3D_RS_BACK_STENCILFUNC: + case WINED3D_RS_BACK_STENCILPASS: case WINED3D_RS_STENCILENABLE: case WINED3D_RS_STENCILFUNC: case WINED3D_RS_STENCILMASK: + case WINED3D_RS_STENCILPASS: case WINED3D_RS_STENCILWRITEMASK: case WINED3D_RS_TWOSIDEDSTENCILMODE: case WINED3D_RS_ZENABLE: @@ -3850,10 +3852,12 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, desc.stencil = state->rs[WINED3D_RS_STENCILENABLE]; desc.stencil_read_mask = state->rs[WINED3D_RS_STENCILMASK]; desc.stencil_write_mask = state->rs[WINED3D_RS_STENCILWRITEMASK]; + desc.front.pass_op = state->rs[WINED3D_RS_STENCILPASS]; desc.front.func = state->rs[WINED3D_RS_STENCILFUNC];
if (state->rs[WINED3D_RS_TWOSIDEDSTENCILMODE]) { + desc.back.pass_op = state->rs[WINED3D_RS_BACK_STENCILPASS]; desc.back.func = state->rs[WINED3D_RS_BACK_STENCILFUNC]; } else diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index e3f0e0bdb85..c8098a885ab 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2441,12 +2441,10 @@ static const struct wined3d_state_entry_template misc_state_template_no3d[] = {STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_STENCILFAIL), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_STENCILZFAIL), {STATE_VDECL}}, - {STATE_RENDER(WINED3D_RS_STENCILPASS), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_STENCILREF), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_BACK_STENCILFAIL), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), {STATE_VDECL}}, - {STATE_RENDER(WINED3D_RS_BACK_STENCILPASS), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_WRAP0), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_WRAP1), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_WRAP2), {STATE_VDECL}}, diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 1819155fae3..1934c9d3a16 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1086,10 +1086,10 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_ 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]); + stencilPass = gl_stencil_op(d->desc.front.pass_op); stencilFail_back = gl_stencil_op(state->render_states[WINED3D_RS_BACK_STENCILFAIL]); depthFail_back = gl_stencil_op(state->render_states[WINED3D_RS_BACK_STENCILZFAIL]); - stencilPass_back = gl_stencil_op(state->render_states[WINED3D_RS_BACK_STENCILPASS]); + stencilPass_back = gl_stencil_op(d->desc.back.pass_op);
TRACE("(twosided %d, ref %x, mask %x, " "GL_FRONT: func: %x, fail %x, zfail %x, zpass %x " @@ -4768,12 +4768,10 @@ const struct wined3d_state_entry_template misc_state_template_gl[] = { STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT),{ STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT),state_translucentsi }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_STENCILFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_STENCILZFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_STENCILPASS), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_STENCILREF), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_BACK_STENCILFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_BACK_STENCILPASS), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_WRAP0), { STATE_RENDER(WINED3D_RS_WRAP0), state_wrap }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_WRAP1), { STATE_RENDER(WINED3D_RS_WRAP0), NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_WRAP2), { STATE_RENDER(WINED3D_RS_WRAP0), NULL }, WINED3D_GL_EXT_NONE }, @@ -5573,7 +5571,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) { 42, 45}, { 47, 47}, { 52, 52}, - { 56, 56}, + { 55, 56}, { 58, 59}, { 61, 127}, {149, 150}, @@ -5581,7 +5579,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) {168, 169}, {171, 171}, {174, 177}, - {189, 193}, + {188, 193}, {195, 197}, {206, 209}, { 0, 0}, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index f9a4402873f..ee3a8547841 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2038,6 +2038,7 @@ struct wined3d_blend_state_desc
struct wined3d_stencil_op_desc { + enum wined3d_stencil_op pass_op; enum wined3d_cmp_func func; };
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 2 -- dlls/d3d11/state.c | 2 ++ dlls/wined3d/adapter_vk.c | 2 -- dlls/wined3d/context_vk.c | 5 ++--- dlls/wined3d/device.c | 4 ++++ dlls/wined3d/directx.c | 2 -- dlls/wined3d/state.c | 9 ++++----- include/wine/wined3d.h | 1 + 8 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index a386abd4c00..81e5f89a878 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -763,7 +763,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3 { wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILREF, stencil_ref);
- wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILFAIL, front->StencilFailOp); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILZFAIL, front->StencilDepthFailOp); if (front->StencilFailOp != back->StencilFailOp || front->StencilDepthFailOp != back->StencilDepthFailOp @@ -771,7 +770,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3 || front->StencilFunc != back->StencilFunc) { wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_TWOSIDEDSTENCILMODE, TRUE); - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BACK_STENCILFAIL, back->StencilFailOp); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BACK_STENCILZFAIL, back->StencilDepthFailOp); } diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index f2fe8a5910b..eba3dde6143 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -799,8 +799,10 @@ HRESULT d3d_depthstencil_state_create(struct d3d_device *device, const D3D11_DEP wined3d_desc.stencil = desc->StencilEnable; wined3d_desc.stencil_read_mask = desc->StencilReadMask; wined3d_desc.stencil_write_mask = desc->StencilWriteMask; + wined3d_desc.front.fail_op = desc->FrontFace.StencilFailOp; wined3d_desc.front.pass_op = desc->FrontFace.StencilPassOp; wined3d_desc.front.func = desc->FrontFace.StencilFunc; + wined3d_desc.back.fail_op = desc->BackFace.StencilFailOp; wined3d_desc.back.pass_op = desc->BackFace.StencilPassOp; wined3d_desc.back.func = desc->BackFace.StencilFunc;
diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index f950f2a4711..cc24ba3e2c4 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -117,11 +117,9 @@ static const struct wined3d_state_entry_template misc_state_template_vk[] = {STATE_RENDER(WINED3D_RS_ANISOTROPY), {STATE_RENDER(WINED3D_RS_ANISOTROPY), state_nop}}, {STATE_RENDER(WINED3D_RS_FLUSHBATCH), {STATE_RENDER(WINED3D_RS_FLUSHBATCH), state_nop}}, {STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), {STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), state_nop}}, - {STATE_RENDER(WINED3D_RS_STENCILFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_STENCILZFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_STENCILREF), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, - {STATE_RENDER(WINED3D_RS_BACK_STENCILFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_WRAP0), {STATE_RENDER(WINED3D_RS_WRAP0), state_nop}}, {STATE_RENDER(WINED3D_RS_WRAP1), {STATE_RENDER(WINED3D_RS_WRAP0)}}, diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index e5e2a275fd0..1a6b3bffe67 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -2046,7 +2046,7 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte key->ds_desc.stencilTestEnable = state->fb.depth_stencil && d->desc.stencil; if (key->ds_desc.stencilTestEnable) { - key->ds_desc.front.failOp = vk_stencil_op_from_wined3d(state->render_states[WINED3D_RS_STENCILFAIL]); + key->ds_desc.front.failOp = vk_stencil_op_from_wined3d(d->desc.front.fail_op); key->ds_desc.front.passOp = vk_stencil_op_from_wined3d(d->desc.front.pass_op); key->ds_desc.front.depthFailOp = vk_stencil_op_from_wined3d( state->render_states[WINED3D_RS_STENCILZFAIL]); @@ -2056,6 +2056,7 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte key->ds_desc.front.reference = state->render_states[WINED3D_RS_STENCILREF] & ((1 << state->fb.depth_stencil->format->stencil_size) - 1);
+ key->ds_desc.back.failOp = vk_stencil_op_from_wined3d(d->desc.back.fail_op); key->ds_desc.back.passOp = vk_stencil_op_from_wined3d(d->desc.back.pass_op); key->ds_desc.back.compareOp = vk_compare_op_from_wined3d(d->desc.back.func); key->ds_desc.back.compareMask = d->desc.stencil_read_mask; @@ -2065,8 +2066,6 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte
if (state->render_states[WINED3D_RS_TWOSIDEDSTENCILMODE]) { - key->ds_desc.back.failOp = vk_stencil_op_from_wined3d( - state->render_states[WINED3D_RS_BACK_STENCILFAIL]); key->ds_desc.back.depthFailOp = vk_stencil_op_from_wined3d( state->render_states[WINED3D_RS_BACK_STENCILZFAIL]); } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 8ba834c4f5d..87bd5288f29 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3685,9 +3685,11 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, set_blend_state = TRUE; break;
+ case WINED3D_RS_BACK_STENCILFAIL: case WINED3D_RS_BACK_STENCILFUNC: case WINED3D_RS_BACK_STENCILPASS: case WINED3D_RS_STENCILENABLE: + case WINED3D_RS_STENCILFAIL: case WINED3D_RS_STENCILFUNC: case WINED3D_RS_STENCILMASK: case WINED3D_RS_STENCILPASS: @@ -3852,11 +3854,13 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, desc.stencil = state->rs[WINED3D_RS_STENCILENABLE]; desc.stencil_read_mask = state->rs[WINED3D_RS_STENCILMASK]; desc.stencil_write_mask = state->rs[WINED3D_RS_STENCILWRITEMASK]; + desc.front.fail_op = state->rs[WINED3D_RS_STENCILFAIL]; desc.front.pass_op = state->rs[WINED3D_RS_STENCILPASS]; desc.front.func = state->rs[WINED3D_RS_STENCILFUNC];
if (state->rs[WINED3D_RS_TWOSIDEDSTENCILMODE]) { + desc.back.fail_op = state->rs[WINED3D_RS_BACK_STENCILFAIL]; desc.back.pass_op = state->rs[WINED3D_RS_BACK_STENCILPASS]; desc.back.func = state->rs[WINED3D_RS_BACK_STENCILFUNC]; } diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index c8098a885ab..818dd46c40f 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2439,11 +2439,9 @@ static const struct wined3d_state_entry_template misc_state_template_no3d[] = {STATE_RENDER(WINED3D_RS_ANISOTROPY), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_FLUSHBATCH), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), {STATE_VDECL}}, - {STATE_RENDER(WINED3D_RS_STENCILFAIL), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_STENCILZFAIL), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_STENCILREF), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), {STATE_VDECL}}, - {STATE_RENDER(WINED3D_RS_BACK_STENCILFAIL), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_WRAP0), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_WRAP1), {STATE_VDECL}}, diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 1934c9d3a16..20c0c60bc54 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1084,10 +1084,10 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_ func_back = GL_ALWAYS; mask = d->desc.stencil_read_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]); + stencilFail = gl_stencil_op(d->desc.front.fail_op); depthFail = gl_stencil_op(state->render_states[WINED3D_RS_STENCILZFAIL]); stencilPass = gl_stencil_op(d->desc.front.pass_op); - stencilFail_back = gl_stencil_op(state->render_states[WINED3D_RS_BACK_STENCILFAIL]); + stencilFail_back = gl_stencil_op(d->desc.back.fail_op); depthFail_back = gl_stencil_op(state->render_states[WINED3D_RS_BACK_STENCILZFAIL]); stencilPass_back = gl_stencil_op(d->desc.back.pass_op);
@@ -4766,11 +4766,9 @@ const struct wined3d_state_entry_template misc_state_template_gl[] = { STATE_RENDER(WINED3D_RS_ANISOTROPY), { STATE_RENDER(WINED3D_RS_ANISOTROPY), state_anisotropy }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_FLUSHBATCH), { STATE_RENDER(WINED3D_RS_FLUSHBATCH), state_flushbatch }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT),{ STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT),state_translucentsi }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_STENCILFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_STENCILZFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_STENCILREF), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_BACK_STENCILFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_WRAP0), { STATE_RENDER(WINED3D_RS_WRAP0), state_wrap }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_WRAP1), { STATE_RENDER(WINED3D_RS_WRAP0), NULL }, WINED3D_GL_EXT_NONE }, @@ -5570,7 +5568,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) { 40, 40}, { 42, 45}, { 47, 47}, - { 52, 52}, + { 52, 53}, { 55, 56}, { 58, 59}, { 61, 127}, @@ -5579,6 +5577,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) {168, 169}, {171, 171}, {174, 177}, + {186, 186}, {188, 193}, {195, 197}, {206, 209}, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index ee3a8547841..a57007826fe 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2038,6 +2038,7 @@ struct wined3d_blend_state_desc
struct wined3d_stencil_op_desc { + enum wined3d_stencil_op fail_op; enum wined3d_stencil_op pass_op; enum wined3d_cmp_func func; };
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 19 ------------------- dlls/d3d11/state.c | 2 ++ dlls/wined3d/adapter_vk.c | 3 --- dlls/wined3d/context_vk.c | 14 ++------------ dlls/wined3d/device.c | 4 ++++ dlls/wined3d/directx.c | 3 --- dlls/wined3d/state.c | 21 +++++++-------------- include/wine/wined3d.h | 1 + 8 files changed, 16 insertions(+), 51 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 81e5f89a878..1a3f3e5a1b2 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -733,7 +733,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3 ID3D11DepthStencilState *depth_stencil_state, UINT stencil_ref) { struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - const D3D11_DEPTH_STENCILOP_DESC *front, *back; struct d3d_depthstencil_state *state_impl; const D3D11_DEPTH_STENCIL_DESC *desc;
@@ -753,30 +752,12 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3 wined3d_device_set_depth_stencil_state(device->wined3d_device, state_impl->wined3d_state); desc = &state_impl->desc;
- front = &desc->FrontFace; - back = &desc->BackFace; - if (desc->DepthEnable) wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ZFUNC, desc->DepthFunc);
if (desc->StencilEnable) { wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILREF, stencil_ref); - - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILZFAIL, front->StencilDepthFailOp); - if (front->StencilFailOp != back->StencilFailOp - || front->StencilDepthFailOp != back->StencilDepthFailOp - || front->StencilPassOp != back->StencilPassOp - || front->StencilFunc != back->StencilFunc) - { - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_TWOSIDEDSTENCILMODE, TRUE); - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BACK_STENCILZFAIL, - back->StencilDepthFailOp); - } - else - { - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_TWOSIDEDSTENCILMODE, FALSE); - } } wined3d_mutex_unlock(); } diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index eba3dde6143..9ed812da1ed 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -800,9 +800,11 @@ HRESULT d3d_depthstencil_state_create(struct d3d_device *device, const D3D11_DEP wined3d_desc.stencil_read_mask = desc->StencilReadMask; wined3d_desc.stencil_write_mask = desc->StencilWriteMask; wined3d_desc.front.fail_op = desc->FrontFace.StencilFailOp; + wined3d_desc.front.depth_fail_op = desc->FrontFace.StencilDepthFailOp; wined3d_desc.front.pass_op = desc->FrontFace.StencilPassOp; wined3d_desc.front.func = desc->FrontFace.StencilFunc; wined3d_desc.back.fail_op = desc->BackFace.StencilFailOp; + wined3d_desc.back.depth_fail_op = desc->BackFace.StencilDepthFailOp; wined3d_desc.back.pass_op = desc->BackFace.StencilPassOp; wined3d_desc.back.func = desc->BackFace.StencilFunc;
diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index cc24ba3e2c4..debfa2218bc 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -117,10 +117,7 @@ static const struct wined3d_state_entry_template misc_state_template_vk[] = {STATE_RENDER(WINED3D_RS_ANISOTROPY), {STATE_RENDER(WINED3D_RS_ANISOTROPY), state_nop}}, {STATE_RENDER(WINED3D_RS_FLUSHBATCH), {STATE_RENDER(WINED3D_RS_FLUSHBATCH), state_nop}}, {STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), {STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), state_nop}}, - {STATE_RENDER(WINED3D_RS_STENCILZFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_STENCILREF), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, - {STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, - {STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, {STATE_RENDER(WINED3D_RS_WRAP0), {STATE_RENDER(WINED3D_RS_WRAP0), state_nop}}, {STATE_RENDER(WINED3D_RS_WRAP1), {STATE_RENDER(WINED3D_RS_WRAP0)}}, {STATE_RENDER(WINED3D_RS_WRAP2), {STATE_RENDER(WINED3D_RS_WRAP0)}}, diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index 1a6b3bffe67..f2a124eb9d8 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -2048,8 +2048,7 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte { key->ds_desc.front.failOp = vk_stencil_op_from_wined3d(d->desc.front.fail_op); key->ds_desc.front.passOp = vk_stencil_op_from_wined3d(d->desc.front.pass_op); - key->ds_desc.front.depthFailOp = vk_stencil_op_from_wined3d( - state->render_states[WINED3D_RS_STENCILZFAIL]); + key->ds_desc.front.depthFailOp = vk_stencil_op_from_wined3d(d->desc.front.depth_fail_op); key->ds_desc.front.compareOp = vk_compare_op_from_wined3d(d->desc.front.func); key->ds_desc.front.compareMask = d->desc.stencil_read_mask; key->ds_desc.front.writeMask = d->desc.stencil_write_mask; @@ -2058,21 +2057,12 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte
key->ds_desc.back.failOp = vk_stencil_op_from_wined3d(d->desc.back.fail_op); key->ds_desc.back.passOp = vk_stencil_op_from_wined3d(d->desc.back.pass_op); + key->ds_desc.back.depthFailOp = vk_stencil_op_from_wined3d(d->desc.back.depth_fail_op); key->ds_desc.back.compareOp = vk_compare_op_from_wined3d(d->desc.back.func); key->ds_desc.back.compareMask = d->desc.stencil_read_mask; key->ds_desc.back.writeMask = d->desc.stencil_write_mask; key->ds_desc.back.reference = state->render_states[WINED3D_RS_STENCILREF] & ((1 << state->fb.depth_stencil->format->stencil_size) - 1); - - if (state->render_states[WINED3D_RS_TWOSIDEDSTENCILMODE]) - { - key->ds_desc.back.depthFailOp = vk_stencil_op_from_wined3d( - state->render_states[WINED3D_RS_BACK_STENCILZFAIL]); - } - else - { - key->ds_desc.back = key->ds_desc.front; - } } } else diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 87bd5288f29..5ab3bf38501 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3688,12 +3688,14 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, case WINED3D_RS_BACK_STENCILFAIL: case WINED3D_RS_BACK_STENCILFUNC: case WINED3D_RS_BACK_STENCILPASS: + case WINED3D_RS_BACK_STENCILZFAIL: case WINED3D_RS_STENCILENABLE: case WINED3D_RS_STENCILFAIL: case WINED3D_RS_STENCILFUNC: case WINED3D_RS_STENCILMASK: case WINED3D_RS_STENCILPASS: case WINED3D_RS_STENCILWRITEMASK: + case WINED3D_RS_STENCILZFAIL: case WINED3D_RS_TWOSIDEDSTENCILMODE: case WINED3D_RS_ZENABLE: case WINED3D_RS_ZWRITEENABLE: @@ -3855,12 +3857,14 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, desc.stencil_read_mask = state->rs[WINED3D_RS_STENCILMASK]; desc.stencil_write_mask = state->rs[WINED3D_RS_STENCILWRITEMASK]; desc.front.fail_op = state->rs[WINED3D_RS_STENCILFAIL]; + desc.front.depth_fail_op = state->rs[WINED3D_RS_STENCILZFAIL]; desc.front.pass_op = state->rs[WINED3D_RS_STENCILPASS]; desc.front.func = state->rs[WINED3D_RS_STENCILFUNC];
if (state->rs[WINED3D_RS_TWOSIDEDSTENCILMODE]) { desc.back.fail_op = state->rs[WINED3D_RS_BACK_STENCILFAIL]; + desc.back.depth_fail_op = state->rs[WINED3D_RS_BACK_STENCILZFAIL]; desc.back.pass_op = state->rs[WINED3D_RS_BACK_STENCILPASS]; desc.back.func = state->rs[WINED3D_RS_BACK_STENCILFUNC]; } diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 818dd46c40f..f51aae95507 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2439,10 +2439,7 @@ static const struct wined3d_state_entry_template misc_state_template_no3d[] = {STATE_RENDER(WINED3D_RS_ANISOTROPY), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_FLUSHBATCH), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), {STATE_VDECL}}, - {STATE_RENDER(WINED3D_RS_STENCILZFAIL), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_STENCILREF), {STATE_VDECL}}, - {STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), {STATE_VDECL}}, - {STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_WRAP0), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_WRAP1), {STATE_VDECL}}, {STATE_RENDER(WINED3D_RS_WRAP2), {STATE_VDECL}}, diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 20c0c60bc54..3199da09180 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1057,7 +1057,6 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_ { const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info; const struct wined3d_depth_stencil_state *d = state->depth_stencil_state; - DWORD twosided_enable; GLint func; GLint func_back; GLint ref; @@ -1077,7 +1076,6 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_ return; }
- twosided_enable = state->render_states[WINED3D_RS_TWOSIDEDSTENCILMODE]; if (!(func = wined3d_gl_compare_func(d->desc.front.func))) func = GL_ALWAYS; if (!(func_back = wined3d_gl_compare_func(d->desc.back.func))) @@ -1085,20 +1083,20 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_ mask = d->desc.stencil_read_mask; ref = state->render_states[WINED3D_RS_STENCILREF] & ((1 << state->fb.depth_stencil->format->stencil_size) - 1); stencilFail = gl_stencil_op(d->desc.front.fail_op); - depthFail = gl_stencil_op(state->render_states[WINED3D_RS_STENCILZFAIL]); + depthFail = gl_stencil_op(d->desc.front.depth_fail_op); stencilPass = gl_stencil_op(d->desc.front.pass_op); stencilFail_back = gl_stencil_op(d->desc.back.fail_op); - depthFail_back = gl_stencil_op(state->render_states[WINED3D_RS_BACK_STENCILZFAIL]); + depthFail_back = gl_stencil_op(d->desc.back.depth_fail_op); stencilPass_back = gl_stencil_op(d->desc.back.pass_op);
- TRACE("(twosided %d, ref %x, mask %x, " + TRACE("(ref %x, mask %x, " "GL_FRONT: func: %x, fail %x, zfail %x, zpass %x " "GL_BACK: func: %x, fail %x, zfail %x, zpass %x)\n", - twosided_enable, ref, mask, + ref, mask, func, stencilFail, depthFail, stencilPass, func_back, stencilFail_back, depthFail_back, stencilPass_back);
- if (twosided_enable) + if (memcmp(&d->desc.front, &d->desc.back, sizeof(d->desc.front))) { gl_info->gl_ops.gl.p_glEnable(GL_STENCIL_TEST); checkGLcall("glEnable GL_STENCIL_TEST"); @@ -4766,10 +4764,7 @@ const struct wined3d_state_entry_template misc_state_template_gl[] = { STATE_RENDER(WINED3D_RS_ANISOTROPY), { STATE_RENDER(WINED3D_RS_ANISOTROPY), state_anisotropy }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_FLUSHBATCH), { STATE_RENDER(WINED3D_RS_FLUSHBATCH), state_flushbatch }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT),{ STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT),state_translucentsi }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_STENCILZFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_STENCILREF), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), { STATE_DEPTH_STENCIL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_WRAP0), { STATE_RENDER(WINED3D_RS_WRAP0), state_wrap }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_WRAP1), { STATE_RENDER(WINED3D_RS_WRAP0), NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_WRAP2), { STATE_RENDER(WINED3D_RS_WRAP0), NULL }, WINED3D_GL_EXT_NONE }, @@ -5568,8 +5563,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) { 40, 40}, { 42, 45}, { 47, 47}, - { 52, 53}, - { 55, 56}, + { 52, 56}, { 58, 59}, { 61, 127}, {149, 150}, @@ -5577,8 +5571,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) {168, 169}, {171, 171}, {174, 177}, - {186, 186}, - {188, 193}, + {185, 193}, {195, 197}, {206, 209}, { 0, 0}, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index a57007826fe..225ce14e70b 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2039,6 +2039,7 @@ struct wined3d_blend_state_desc struct wined3d_stencil_op_desc { enum wined3d_stencil_op fail_op; + enum wined3d_stencil_op depth_fail_op; enum wined3d_stencil_op pass_op; enum wined3d_cmp_func func; };
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 11 ----------- dlls/d3d11/state.c | 1 + dlls/wined3d/adapter_vk.c | 3 +-- dlls/wined3d/context_vk.c | 2 +- dlls/wined3d/device.c | 2 ++ dlls/wined3d/state.c | 23 ++++++++++------------- include/wine/wined3d.h | 1 + 7 files changed, 16 insertions(+), 27 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 1a3f3e5a1b2..dd0a67ebc80 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -724,11 +724,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi wined3d_mutex_unlock(); }
-static void set_default_depth_stencil_state(struct wined3d_device *wined3d_device) -{ - wined3d_device_set_render_state(wined3d_device, WINED3D_RS_ZFUNC, WINED3D_CMP_LESS); -} - static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3D11DeviceContext1 *iface, ID3D11DepthStencilState *depth_stencil_state, UINT stencil_ref) { @@ -744,7 +739,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3 if (!(state_impl = unsafe_impl_from_ID3D11DepthStencilState(depth_stencil_state))) { wined3d_device_set_depth_stencil_state(device->wined3d_device, NULL); - set_default_depth_stencil_state(device->wined3d_device); wined3d_mutex_unlock(); return; } @@ -752,9 +746,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3 wined3d_device_set_depth_stencil_state(device->wined3d_device, state_impl->wined3d_state); desc = &state_impl->desc;
- if (desc->DepthEnable) - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ZFUNC, desc->DepthFunc); - if (desc->StencilEnable) { wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_STENCILREF, stencil_ref); @@ -6114,8 +6105,6 @@ static void CDECL device_parent_wined3d_device_created(struct wined3d_device_par device->wined3d_device = wined3d_device;
device->feature_level = d3d_feature_level_from_wined3d(wined3d_device_get_feature_level(wined3d_device)); - - set_default_depth_stencil_state(wined3d_device); }
static void CDECL device_parent_mode_changed(struct wined3d_device_parent *device_parent) diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index 9ed812da1ed..737dae93848 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -796,6 +796,7 @@ HRESULT d3d_depthstencil_state_create(struct d3d_device *device, const D3D11_DEP
wined3d_desc.depth = desc->DepthEnable; wined3d_desc.depth_write = desc->DepthWriteMask; + wined3d_desc.depth_func = desc->DepthFunc; wined3d_desc.stencil = desc->StencilEnable; wined3d_desc.stencil_read_mask = desc->StencilReadMask; wined3d_desc.stencil_write_mask = desc->StencilWriteMask; diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index debfa2218bc..799ec2601e6 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -107,7 +107,6 @@ static const struct wined3d_state_entry_template misc_state_template_vk[] = {STATE_RENDER(WINED3D_RS_ROP2), {STATE_RENDER(WINED3D_RS_ROP2), state_nop}}, {STATE_RENDER(WINED3D_RS_PLANEMASK), {STATE_RENDER(WINED3D_RS_PLANEMASK), state_nop}}, {STATE_RENDER(WINED3D_RS_LASTPIXEL), {STATE_RENDER(WINED3D_RS_LASTPIXEL), state_nop}}, - {STATE_RENDER(WINED3D_RS_ZFUNC), {STATE_RENDER(WINED3D_RS_ZFUNC), state_nop}}, {STATE_RENDER(WINED3D_RS_DITHERENABLE), {STATE_RENDER(WINED3D_RS_DITHERENABLE), state_nop}}, {STATE_RENDER(WINED3D_RS_SUBPIXEL), {STATE_RENDER(WINED3D_RS_SUBPIXEL), state_nop}}, {STATE_RENDER(WINED3D_RS_SUBPIXELX), {STATE_RENDER(WINED3D_RS_SUBPIXELX), state_nop}}, @@ -117,7 +116,7 @@ static const struct wined3d_state_entry_template misc_state_template_vk[] = {STATE_RENDER(WINED3D_RS_ANISOTROPY), {STATE_RENDER(WINED3D_RS_ANISOTROPY), state_nop}}, {STATE_RENDER(WINED3D_RS_FLUSHBATCH), {STATE_RENDER(WINED3D_RS_FLUSHBATCH), state_nop}}, {STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), {STATE_RENDER(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT), state_nop}}, - {STATE_RENDER(WINED3D_RS_STENCILREF), {STATE_RENDER(WINED3D_RS_ZFUNC)}}, + {STATE_RENDER(WINED3D_RS_STENCILREF), {STATE_RENDER(WINED3D_RS_STENCILREF), state_nop}}, {STATE_RENDER(WINED3D_RS_WRAP0), {STATE_RENDER(WINED3D_RS_WRAP0), state_nop}}, {STATE_RENDER(WINED3D_RS_WRAP1), {STATE_RENDER(WINED3D_RS_WRAP0)}}, {STATE_RENDER(WINED3D_RS_WRAP2), {STATE_RENDER(WINED3D_RS_WRAP0)}}, diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index f2a124eb9d8..aeb505ebfc6 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -2071,7 +2071,7 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte key->ds_desc.depthWriteEnable = VK_TRUE; key->ds_desc.stencilTestEnable = VK_FALSE; } - key->ds_desc.depthCompareOp = vk_compare_op_from_wined3d(state->render_states[WINED3D_RS_ZFUNC]); + key->ds_desc.depthCompareOp = vk_compare_op_from_wined3d(d->desc.depth_func);
update = true; } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 5ab3bf38501..b077d5317db 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3698,6 +3698,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, case WINED3D_RS_STENCILZFAIL: case WINED3D_RS_TWOSIDEDSTENCILMODE: case WINED3D_RS_ZENABLE: + case WINED3D_RS_ZFUNC: case WINED3D_RS_ZWRITEENABLE: set_depth_stencil_state = TRUE; break; @@ -3853,6 +3854,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, FIXME("Unrecognized depth buffer type %#x.\n", state->rs[WINED3D_RS_ZENABLE]); } desc.depth_write = state->rs[WINED3D_RS_ZWRITEENABLE]; + desc.depth_func = state->rs[WINED3D_RS_ZFUNC]; desc.stencil = state->rs[WINED3D_RS_STENCILENABLE]; desc.stencil_read_mask = state->rs[WINED3D_RS_STENCILMASK]; desc.stencil_write_mask = state->rs[WINED3D_RS_STENCILWRITEMASK]; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 3199da09180..71f7ac53a2f 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -388,17 +388,6 @@ GLenum wined3d_gl_compare_func(enum wined3d_cmp_func f) } }
-static void state_zfunc(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) -{ - GLenum depth_func = wined3d_gl_compare_func(state->render_states[WINED3D_RS_ZFUNC]); - const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info; - - if (!depth_func) return; - - gl_info->gl_ops.gl.p_glDepthFunc(depth_func); - checkGLcall("glDepthFunc"); -} - static void state_ambient(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; @@ -1161,6 +1150,7 @@ static void depth(struct wined3d_context *context, const struct wined3d_state *s const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info; const struct wined3d_depth_stencil_state *d = state->depth_stencil_state; BOOL enable_depth = d ? d->desc.depth : TRUE; + GLenum depth_func = GL_LESS;
if (!state->fb.depth_stencil) { @@ -1190,6 +1180,14 @@ static void depth(struct wined3d_context *context, const struct wined3d_state *s checkGLcall("glDepthMask(GL_FALSE)"); }
+ if (d) + depth_func = wined3d_gl_compare_func(d->desc.depth_func); + if (depth_func) + { + gl_info->gl_ops.gl.p_glDepthFunc(depth_func); + checkGLcall("glDepthFunc"); + } + if (context->last_was_rhw && !isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION))) context_apply_state(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION)); } @@ -4754,7 +4752,6 @@ const struct wined3d_state_entry_template misc_state_template_gl[] = { STATE_RENDER(WINED3D_RS_ROP2), { STATE_RENDER(WINED3D_RS_ROP2), state_rop2 }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_PLANEMASK), { STATE_RENDER(WINED3D_RS_PLANEMASK), state_planemask }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_LASTPIXEL), { STATE_RENDER(WINED3D_RS_LASTPIXEL), state_lastpixel }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_ZFUNC), { STATE_RENDER(WINED3D_RS_ZFUNC), state_zfunc }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_DITHERENABLE), { STATE_RENDER(WINED3D_RS_DITHERENABLE), state_ditherenable }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_SUBPIXEL), { STATE_RENDER(WINED3D_RS_SUBPIXEL), state_subpixel }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_SUBPIXELX), { STATE_RENDER(WINED3D_RS_SUBPIXELX), state_subpixelx }, WINED3D_GL_EXT_NONE }, @@ -5558,7 +5555,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) { 3, 3}, { 7, 8}, { 14, 14}, - { 17, 22}, + { 17, 23}, { 27, 27}, { 40, 40}, { 42, 45}, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 225ce14e70b..3535a69bacb 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2048,6 +2048,7 @@ struct wined3d_depth_stencil_state_desc { BOOL depth; BOOL depth_write; + enum wined3d_cmp_func depth_func; BOOL stencil; unsigned int stencil_read_mask; unsigned int stencil_write_mask;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com