wined3d: Move tesselation to the state table.

This commit is contained in:
Stefan Dösinger 2006-12-10 23:21:27 +01:00 committed by Alexandre Julliard
parent 3bb41771ad
commit cd0d0a7041
2 changed files with 20 additions and 28 deletions

View File

@ -3430,6 +3430,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
case WINED3DRS_DEBUGMONITORTOKEN :
case WINED3DRS_POSITIONDEGREE :
case WINED3DRS_NORMALDEGREE :
case WINED3DRS_MINTESSELLATIONLEVEL :
case WINED3DRS_MAXTESSELLATIONLEVEL :
case WINED3DRS_ADAPTIVETESS_X :
case WINED3DRS_ADAPTIVETESS_Y :
case WINED3DRS_ADAPTIVETESS_Z :
case WINED3DRS_ADAPTIVETESS_W :
case WINED3DRS_ENABLEADAPTIVETESSELLATION:
StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock);
break;
@ -3440,27 +3447,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
return WINED3DERR_INVALIDCALL;
}
case WINED3DRS_MINTESSELLATIONLEVEL :
case WINED3DRS_MAXTESSELLATIONLEVEL :
case WINED3DRS_ADAPTIVETESS_X :
case WINED3DRS_ADAPTIVETESS_Y :
case WINED3DRS_ADAPTIVETESS_Z :
case WINED3DRS_ADAPTIVETESS_W :
{
if(This->stateBlock->renderState[WINED3DRS_ENABLEADAPTIVETESSELLATION])
FIXME("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
else
TRACE("(%p)->(%s,%d): recording state but WINED3DRS_ENABLEADAPTIVETESSELLATION is not enabled\n", This, debug_d3drenderstate(State), Value);
break;
}
case WINED3DRS_ENABLEADAPTIVETESSELLATION:
{
if(Value)
ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
break;
}
case WINED3DRS_SRGBWRITEENABLE :
{
if(Value)

View File

@ -1202,6 +1202,12 @@ static void state_normaldegree(DWORD state, IWineD3DStateBlockImpl *stateblock)
ERR("(WINED3DRS_NORMALDEGREE,%d) not yet implemented\n", stateblock->renderState[WINED3DRS_NORMALDEGREE]);
}
static void state_tessellation(DWORD state, IWineD3DStateBlockImpl *stateblock) {
TRACE("Stub\n");
if(stateblock->renderState[WINED3DRS_ENABLEADAPTIVETESSELLATION])
FIXME("(WINED3DRS_ENABLEADAPTIVETESSELLATION,%d) not yet implemented\n", stateblock->renderState[WINED3DRS_ENABLEADAPTIVETESSELLATION]);
}
const struct StateEntry StateTable[] =
{
/* State name representative, apply function */
@ -1387,13 +1393,13 @@ const struct StateEntry StateTable[] =
{ /*175, WINED3DRS_SLOPESCALEDEPTHBIAS */ STATE_RENDER(WINED3DRS_DEPTHBIAS), state_depthbias },
{ /*176, WINED3DRS_ANTIALIASEDLINEENABLE */ STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_blend },
{ /*177, undefined */ 0, state_undefined },
{ /*178, WINED3DRS_MINTESSELLATIONLEVEL */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown },
{ /*179, WINED3DRS_MAXTESSELLATIONLEVEL */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown },
{ /*180, WINED3DRS_ADAPTIVETESS_X */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown },
{ /*181, WINED3DRS_ADAPTIVETESS_Y */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown },
{ /*182, WINED3DRS_ADAPTIVETESS_Z */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown },
{ /*183, WINED3DRS_ADAPTIVETESS_W */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown },
{ /*184, WINED3DRS_ENABLEADAPTIVETESSELLATION */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_unknown },
{ /*178, WINED3DRS_MINTESSELLATIONLEVEL */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation },
{ /*179, WINED3DRS_MAXTESSELLATIONLEVEL */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation },
{ /*180, WINED3DRS_ADAPTIVETESS_X */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation },
{ /*181, WINED3DRS_ADAPTIVETESS_Y */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation },
{ /*182, WINED3DRS_ADAPTIVETESS_Z */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation },
{ /*183, WINED3DRS_ADAPTIVETESS_W */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation },
{ /*184, WINED3DRS_ENABLEADAPTIVETESSELLATION */ STATE_RENDER(WINED3DRS_ENABLEADAPTIVETESSELLATION), state_tessellation },
{ /*185, WINED3DRS_TWOSIDEDSTENCILMODE */ STATE_RENDER(WINED3DRS_STENCILENABLE), state_stencil },
{ /*186, WINED3DRS_CCW_STENCILFAIL */ STATE_RENDER(WINED3DRS_STENCILENABLE), state_stencil },
{ /*187, WINED3DRS_CCW_STENCILZFAIL */ STATE_RENDER(WINED3DRS_STENCILENABLE), state_stencil },