Commit 5c61a9c3 authored by Max Figura's avatar Max Figura Committed by Alexandre Julliard

wined3d: Move the WINED3D_RS_PATCHSEGMENTS stub to wined3d_device_apply_stateblock.

parent 0076908b
......@@ -98,7 +98,6 @@ static const struct wined3d_state_entry_template misc_state_template_vk[] =
{STATE_INDEXBUFFER, {STATE_INDEXBUFFER, state_nop}},
{STATE_RENDER(WINED3D_RS_LINEPATTERN), {STATE_RENDER(WINED3D_RS_LINEPATTERN), state_nop}},
{STATE_RENDER(WINED3D_RS_DITHERENABLE), {STATE_RENDER(WINED3D_RS_DITHERENABLE), state_nop}},
{STATE_RENDER(WINED3D_RS_PATCHSEGMENTS), {STATE_RENDER(WINED3D_RS_PATCHSEGMENTS), state_nop}},
{STATE_RENDER(WINED3D_RS_POSITIONDEGREE), {STATE_RENDER(WINED3D_RS_POSITIONDEGREE), state_nop}},
{STATE_RENDER(WINED3D_RS_NORMALDEGREE), {STATE_RENDER(WINED3D_RS_NORMALDEGREE), state_nop}},
{STATE_RENDER(WINED3D_RS_MINTESSELLATIONLEVEL), {STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION)}},
......
......@@ -4178,6 +4178,28 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
state->rs[WINED3D_RS_PATCHEDGESTYLE]);
break;
case WINED3D_RS_PATCHSEGMENTS:
{
union
{
DWORD d;
float f;
} tmpvalue;
tmpvalue.f = 1.0f;
if (state->rs[WINED3D_RS_PATCHSEGMENTS] != tmpvalue.d)
{
static bool displayed = false;
tmpvalue.d = state->rs[WINED3D_RS_PATCHSEGMENTS];
if(!displayed)
FIXME("(WINED3D_RS_PATCHSEGMENTS,%f) not yet implemented.\n", tmpvalue.f);
displayed = true;
}
break;
}
default:
wined3d_device_set_render_state(device, idx, state->rs[idx]);
break;
......
......@@ -2811,7 +2811,6 @@ static const struct wined3d_state_entry_template misc_state_template_no3d[] =
{STATE_RENDER(WINED3D_RS_LINEPATTERN), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_ZFUNC), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_DITHERENABLE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_PATCHSEGMENTS), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_POSITIONDEGREE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_NORMALDEGREE), {STATE_VDECL}},
{STATE_RENDER(WINED3D_RS_MINTESSELLATIONLEVEL), {STATE_VDECL}},
......
......@@ -1970,26 +1970,6 @@ static void state_sample_mask_w(struct wined3d_context *context, const struct wi
WARN("Unsupported in local OpenGL implementation: glSampleMaski.\n");
}
static void state_patchsegments(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
union {
DWORD d;
float f;
} tmpvalue;
tmpvalue.f = 1.0f;
if (state->render_states[WINED3D_RS_PATCHSEGMENTS] != tmpvalue.d)
{
static BOOL displayed = FALSE;
tmpvalue.d = state->render_states[WINED3D_RS_PATCHSEGMENTS];
if(!displayed)
FIXME("(WINED3D_RS_PATCHSEGMENTS,%f) not yet implemented\n", tmpvalue.f);
displayed = TRUE;
}
}
static void state_positiondegree(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
if (state->render_states[WINED3D_RS_POSITIONDEGREE] != WINED3D_DEGREE_CUBIC)
......@@ -4628,7 +4608,6 @@ const struct wined3d_state_entry_template misc_state_template_gl[] =
{ STATE_RENDER(WINED3D_RS_LINEPATTERN), { STATE_RENDER(WINED3D_RS_LINEPATTERN), state_linepattern }, WINED3D_GL_LEGACY_CONTEXT },
{ STATE_RENDER(WINED3D_RS_LINEPATTERN), { STATE_RENDER(WINED3D_RS_LINEPATTERN), state_linepattern_w }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_DITHERENABLE), { STATE_RENDER(WINED3D_RS_DITHERENABLE), state_ditherenable }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_PATCHSEGMENTS), { STATE_RENDER(WINED3D_RS_PATCHSEGMENTS), state_patchsegments }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_POSITIONDEGREE), { STATE_RENDER(WINED3D_RS_POSITIONDEGREE), state_positiondegree}, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_NORMALDEGREE), { STATE_RENDER(WINED3D_RS_NORMALDEGREE), state_normaldegree }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_MINTESSELLATIONLEVEL), { STATE_RENDER(WINED3D_RS_ENABLEADAPTIVETESSELLATION),NULL }, WINED3D_GL_EXT_NONE },
......@@ -5408,7 +5387,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table)
{144, 144},
{149, 150},
{153, 153},
{162, 163},
{162, 164},
{168, 169},
{171, 171},
{174, 177},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment