wined3d: Move WINED3DRS_PATCHSEGMENTS to the state table.
This commit is contained in:
parent
e498a16124
commit
8197470d67
|
@ -3316,12 +3316,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
|
|||
|
||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||
|
||||
/* Simple way of referring to either a DWORD or a 4 byte float */
|
||||
union {
|
||||
DWORD d;
|
||||
float f;
|
||||
} tmpvalue;
|
||||
|
||||
TRACE("(%p)->state = %s(%d), value = %d\n", This, debug_d3drenderstate(State), State, Value);
|
||||
This->updateStateBlock->changed.renderState[State] = TRUE;
|
||||
This->updateStateBlock->set.renderState[State] = TRUE;
|
||||
|
@ -3432,6 +3426,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
|
|||
case WINED3DRS_ANTIALIAS :
|
||||
case WINED3DRS_MULTISAMPLEMASK :
|
||||
case WINED3DRS_PATCHEDGESTYLE :
|
||||
case WINED3DRS_PATCHSEGMENTS :
|
||||
StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock);
|
||||
break;
|
||||
|
||||
|
@ -3442,15 +3437,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
|
|||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
case WINED3DRS_PATCHSEGMENTS :
|
||||
{
|
||||
/* available in d3d8 but in d3d9 it was replaced by IDirect3DDevice9::SetNPatchMode */
|
||||
tmpvalue.f = 1.0f;
|
||||
if(tmpvalue.d != Value)
|
||||
ERR("(%p)->(%s,%d) not yet implemented\n", This, debug_d3drenderstate(State), Value);
|
||||
break;
|
||||
}
|
||||
|
||||
case WINED3DRS_DEBUGMONITORTOKEN :
|
||||
{
|
||||
/* Only useful for "debug builds". */
|
||||
|
|
|
@ -1178,6 +1178,18 @@ static void state_patchededge(DWORD state, IWineD3DStateBlockImpl *stateblock) {
|
|||
ERR("(WINED3DRS_PATCHEDGESTYLE,%d) not yet implemented\n", stateblock->renderState[WINED3DRS_PATCHEDGESTYLE]);
|
||||
}
|
||||
|
||||
static void state_patchsegments(DWORD state, IWineD3DStateBlockImpl *stateblock) {
|
||||
union {
|
||||
DWORD d;
|
||||
float f;
|
||||
} tmpvalue;
|
||||
tmpvalue.f = 1.0f;
|
||||
|
||||
TRACE("Stub\n");
|
||||
if (stateblock->renderState[WINED3DRS_PATCHSEGMENTS] != tmpvalue.d)
|
||||
ERR("(WINED3DRS_PATCHSEGMENTS,%d) not yet implemented\n", tmpvalue.d);
|
||||
}
|
||||
|
||||
const struct StateEntry StateTable[] =
|
||||
{
|
||||
/* State name representative, apply function */
|
||||
|
@ -1347,7 +1359,7 @@ const struct StateEntry StateTable[] =
|
|||
{ /*161, WINED3DRS_MULTISAMPLEANTIALIAS */ STATE_RENDER(WINED3DRS_MULTISAMPLEANTIALIAS), state_multisampleaa },
|
||||
{ /*162, WINED3DRS_MULTISAMPLEMASK */ STATE_RENDER(WINED3DRS_MULTISAMPLEMASK), state_multisampmask },
|
||||
{ /*163, WINED3DRS_PATCHEDGESTYLE */ STATE_RENDER(WINED3DRS_PATCHEDGESTYLE), state_patchededge },
|
||||
{ /*164, WINED3DRS_PATCHSEGMENTS */ STATE_RENDER(WINED3DRS_PATCHSEGMENTS), state_unknown },
|
||||
{ /*164, WINED3DRS_PATCHSEGMENTS */ STATE_RENDER(WINED3DRS_PATCHSEGMENTS), state_patchsegments },
|
||||
{ /*165, WINED3DRS_DEBUGMONITORTOKEN */ STATE_RENDER(WINED3DRS_DEBUGMONITORTOKEN), state_unknown },
|
||||
{ /*166, WINED3DRS_POINTSIZE_MAX */ STATE_RENDER(WINED3DRS_POINTSIZE_MAX), state_psizemax },
|
||||
{ /*167, WINED3DRS_INDEXEDVERTEXBLENDENABLE */ 0, state_nogl },
|
||||
|
|
Loading…
Reference in New Issue