wined3d: Rename WINED3D_RS_CCW_STENCIL* render states to WINED3D_RS_BACK_STENCIL*.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
81e50b6d41
commit
4972cc89ce
|
@ -799,11 +799,11 @@ 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_CCW_STENCILFAIL, back->StencilFailOp);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_CCW_STENCILZFAIL,
|
||||
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_CCW_STENCILPASS, back->StencilPassOp);
|
||||
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_CCW_STENCILFUNC, back->StencilFunc);
|
||||
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
|
||||
{
|
||||
|
|
|
@ -838,15 +838,15 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
|
|||
DWORD onesided_enable;
|
||||
DWORD twosided_enable;
|
||||
GLint func;
|
||||
GLint func_ccw;
|
||||
GLint func_back;
|
||||
GLint ref;
|
||||
GLuint mask;
|
||||
GLint stencilFail;
|
||||
GLint stencilFail_ccw;
|
||||
GLint stencilFail_back;
|
||||
GLint stencilPass;
|
||||
GLint stencilPass_ccw;
|
||||
GLint stencilPass_back;
|
||||
GLint depthFail;
|
||||
GLint depthFail_ccw;
|
||||
GLint depthFail_back;
|
||||
|
||||
/* No stencil test without a stencil buffer. */
|
||||
if (!state->fb->depth_stencil)
|
||||
|
@ -860,23 +860,23 @@ 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])))
|
||||
func = GL_ALWAYS;
|
||||
if (!(func_ccw = wined3d_gl_compare_func(state->render_states[WINED3D_RS_CCW_STENCILFUNC])))
|
||||
func_ccw = GL_ALWAYS;
|
||||
if (!(func_back = wined3d_gl_compare_func(state->render_states[WINED3D_RS_BACK_STENCILFUNC])))
|
||||
func_back = GL_ALWAYS;
|
||||
ref = state->render_states[WINED3D_RS_STENCILREF];
|
||||
mask = state->render_states[WINED3D_RS_STENCILMASK];
|
||||
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]);
|
||||
stencilFail_ccw = gl_stencil_op(state->render_states[WINED3D_RS_CCW_STENCILFAIL]);
|
||||
depthFail_ccw = gl_stencil_op(state->render_states[WINED3D_RS_CCW_STENCILZFAIL]);
|
||||
stencilPass_ccw = gl_stencil_op(state->render_states[WINED3D_RS_CCW_STENCILPASS]);
|
||||
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]);
|
||||
|
||||
TRACE("(onesided %d, twosided %d, 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",
|
||||
onesided_enable, twosided_enable, ref, mask,
|
||||
func, stencilFail, depthFail, stencilPass,
|
||||
func_ccw, stencilFail_ccw, depthFail_ccw, stencilPass_ccw);
|
||||
"GL_FRONT: func: %x, fail %x, zfail %x, zpass %x "
|
||||
"GL_BACK: func: %x, fail %x, zfail %x, zpass %x)\n",
|
||||
onesided_enable, twosided_enable, ref, mask,
|
||||
func, stencilFail, depthFail, stencilPass,
|
||||
func_back, stencilFail_back, depthFail_back, stencilPass_back);
|
||||
|
||||
if (twosided_enable && onesided_enable)
|
||||
{
|
||||
|
@ -887,8 +887,8 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
|
|||
{
|
||||
GL_EXTCALL(glStencilFuncSeparate(GL_FRONT, func, ref, mask));
|
||||
GL_EXTCALL(glStencilOpSeparate(GL_FRONT, stencilFail, depthFail, stencilPass));
|
||||
GL_EXTCALL(glStencilFuncSeparate(GL_BACK, func_ccw, ref, mask));
|
||||
GL_EXTCALL(glStencilOpSeparate(GL_BACK, stencilFail_ccw, depthFail_ccw, stencilPass_ccw));
|
||||
GL_EXTCALL(glStencilFuncSeparate(GL_BACK, func_back, ref, mask));
|
||||
GL_EXTCALL(glStencilOpSeparate(GL_BACK, stencilFail_back, depthFail_back, stencilPass_back));
|
||||
checkGLcall("setting two sided stencil state");
|
||||
}
|
||||
else if (gl_info->supported[EXT_STENCIL_TWO_SIDE])
|
||||
|
@ -900,22 +900,22 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
|
|||
* to set it back
|
||||
*/
|
||||
renderstate_stencil_twosided(context, GL_BACK,
|
||||
func_ccw, ref, mask, stencilFail_ccw, depthFail_ccw, stencilPass_ccw);
|
||||
func_back, ref, mask, stencilFail_back, depthFail_back, stencilPass_back);
|
||||
renderstate_stencil_twosided(context, GL_FRONT,
|
||||
func, ref, mask, stencilFail, depthFail, stencilPass);
|
||||
}
|
||||
else if (gl_info->supported[ATI_SEPARATE_STENCIL])
|
||||
{
|
||||
GL_EXTCALL(glStencilFuncSeparateATI(func, func_ccw, ref, mask));
|
||||
GL_EXTCALL(glStencilFuncSeparateATI(func, func_back, ref, mask));
|
||||
checkGLcall("glStencilFuncSeparateATI(...)");
|
||||
GL_EXTCALL(glStencilOpSeparateATI(GL_FRONT, stencilFail, depthFail, stencilPass));
|
||||
checkGLcall("glStencilOpSeparateATI(GL_FRONT, ...)");
|
||||
GL_EXTCALL(glStencilOpSeparateATI(GL_BACK, stencilFail_ccw, depthFail_ccw, stencilPass_ccw));
|
||||
GL_EXTCALL(glStencilOpSeparateATI(GL_BACK, stencilFail_back, depthFail_back, stencilPass_back));
|
||||
checkGLcall("glStencilOpSeparateATI(GL_BACK, ...)");
|
||||
}
|
||||
else
|
||||
{
|
||||
ERR("Separate (two sided) stencil not supported on this version of opengl. Caps weren't honored?\n");
|
||||
FIXME("Separate (two sided) stencil not supported on this version of OpenGL. Caps weren't honored?\n");
|
||||
}
|
||||
}
|
||||
else if(onesided_enable)
|
||||
|
@ -5096,10 +5096,10 @@ const struct StateEntryTemplate misc_state_template[] =
|
|||
{ STATE_RENDER(WINED3D_RS_STENCILWRITEMASK), { STATE_RENDER(WINED3D_RS_STENCILWRITEMASK), state_stencilwrite2s}, EXT_STENCIL_TWO_SIDE },
|
||||
{ STATE_RENDER(WINED3D_RS_STENCILWRITEMASK), { STATE_RENDER(WINED3D_RS_STENCILWRITEMASK), state_stencilwrite }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE), { STATE_RENDER(WINED3D_RS_STENCILENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_CCW_STENCILFAIL), { STATE_RENDER(WINED3D_RS_STENCILENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_CCW_STENCILZFAIL), { STATE_RENDER(WINED3D_RS_STENCILENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_CCW_STENCILPASS), { STATE_RENDER(WINED3D_RS_STENCILENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_CCW_STENCILFUNC), { STATE_RENDER(WINED3D_RS_STENCILENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_BACK_STENCILFAIL), { STATE_RENDER(WINED3D_RS_STENCILENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_BACK_STENCILZFAIL), { STATE_RENDER(WINED3D_RS_STENCILENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_BACK_STENCILPASS), { STATE_RENDER(WINED3D_RS_STENCILENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_BACK_STENCILFUNC), { STATE_RENDER(WINED3D_RS_STENCILENABLE), 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 },
|
||||
|
|
|
@ -38,9 +38,9 @@ static const DWORD pixel_states_render[] =
|
|||
WINED3D_RS_BLENDFACTOR,
|
||||
WINED3D_RS_BLENDOP,
|
||||
WINED3D_RS_BLENDOPALPHA,
|
||||
WINED3D_RS_CCW_STENCILFAIL,
|
||||
WINED3D_RS_CCW_STENCILPASS,
|
||||
WINED3D_RS_CCW_STENCILZFAIL,
|
||||
WINED3D_RS_BACK_STENCILFAIL,
|
||||
WINED3D_RS_BACK_STENCILPASS,
|
||||
WINED3D_RS_BACK_STENCILZFAIL,
|
||||
WINED3D_RS_COLORWRITEENABLE,
|
||||
WINED3D_RS_COLORWRITEENABLE1,
|
||||
WINED3D_RS_COLORWRITEENABLE2,
|
||||
|
@ -1186,10 +1186,10 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
|
|||
state->render_states[WINED3D_RS_ADAPTIVETESS_W] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_ENABLEADAPTIVETESSELLATION] = FALSE;
|
||||
state->render_states[WINED3D_RS_TWOSIDEDSTENCILMODE] = FALSE;
|
||||
state->render_states[WINED3D_RS_CCW_STENCILFAIL] = WINED3D_STENCIL_OP_KEEP;
|
||||
state->render_states[WINED3D_RS_CCW_STENCILZFAIL] = WINED3D_STENCIL_OP_KEEP;
|
||||
state->render_states[WINED3D_RS_CCW_STENCILPASS] = WINED3D_STENCIL_OP_KEEP;
|
||||
state->render_states[WINED3D_RS_CCW_STENCILFUNC] = WINED3D_CMP_ALWAYS;
|
||||
state->render_states[WINED3D_RS_BACK_STENCILFAIL] = WINED3D_STENCIL_OP_KEEP;
|
||||
state->render_states[WINED3D_RS_BACK_STENCILZFAIL] = WINED3D_STENCIL_OP_KEEP;
|
||||
state->render_states[WINED3D_RS_BACK_STENCILPASS] = WINED3D_STENCIL_OP_KEEP;
|
||||
state->render_states[WINED3D_RS_BACK_STENCILFUNC] = WINED3D_CMP_ALWAYS;
|
||||
state->render_states[WINED3D_RS_COLORWRITEENABLE1] = 0x0000000f;
|
||||
state->render_states[WINED3D_RS_COLORWRITEENABLE2] = 0x0000000f;
|
||||
state->render_states[WINED3D_RS_COLORWRITEENABLE3] = 0x0000000f;
|
||||
|
|
|
@ -4115,10 +4115,10 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
|
|||
D3DSTATE_TO_STR(WINED3D_RS_ADAPTIVETESS_W);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ENABLEADAPTIVETESSELLATION);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_TWOSIDEDSTENCILMODE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_CCW_STENCILFAIL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_CCW_STENCILZFAIL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_CCW_STENCILPASS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_CCW_STENCILFUNC);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILFAIL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILZFAIL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILPASS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILFUNC);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_COLORWRITEENABLE1);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_COLORWRITEENABLE2);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_COLORWRITEENABLE3);
|
||||
|
|
|
@ -358,10 +358,10 @@ enum wined3d_render_state
|
|||
WINED3D_RS_ADAPTIVETESS_W = 183,
|
||||
WINED3D_RS_ENABLEADAPTIVETESSELLATION = 184,
|
||||
WINED3D_RS_TWOSIDEDSTENCILMODE = 185,
|
||||
WINED3D_RS_CCW_STENCILFAIL = 186,
|
||||
WINED3D_RS_CCW_STENCILZFAIL = 187,
|
||||
WINED3D_RS_CCW_STENCILPASS = 188,
|
||||
WINED3D_RS_CCW_STENCILFUNC = 189,
|
||||
WINED3D_RS_BACK_STENCILFAIL = 186,
|
||||
WINED3D_RS_BACK_STENCILZFAIL = 187,
|
||||
WINED3D_RS_BACK_STENCILPASS = 188,
|
||||
WINED3D_RS_BACK_STENCILFUNC = 189,
|
||||
WINED3D_RS_COLORWRITEENABLE1 = 190,
|
||||
WINED3D_RS_COLORWRITEENABLE2 = 191,
|
||||
WINED3D_RS_COLORWRITEENABLE3 = 192,
|
||||
|
|
Loading…
Reference in New Issue