From c5344709b19cf2f0c26d9b19670ae25c83811264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sun, 10 Dec 2006 23:20:29 +0100 Subject: [PATCH] wined3d: Move WINED3DRS_LASTPIXEL to the state table. --- dlls/wined3d/device.c | 11 +---------- dlls/wined3d/state.c | 10 +++++++++- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 9bf2a74b9d9..44ea2cf1d96 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3404,19 +3404,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W case WINED3DRS_COLORWRITEENABLE2 : case WINED3DRS_COLORWRITEENABLE3 : case WINED3DRS_LOCALVIEWER : + case WINED3DRS_LASTPIXEL : StateTable[STATE_RENDER(State)].apply(STATE_RENDER(State), This->stateBlock); break; - case WINED3DRS_LASTPIXEL : - { - if (Value) { - TRACE("Last Pixel Drawing Enabled\n"); - } else { - FIXME("Last Pixel Drawing Disabled, not handled yet\n"); - } - } - break; - case WINED3DRS_SOFTWAREVERTEXPROCESSING : { if (Value) { diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index f640743f055..01dbc0c3da3 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1036,6 +1036,14 @@ static void state_localviewer(DWORD state, IWineD3DStateBlockImpl *stateblock) { } } +static void state_lastpixel(DWORD state, IWineD3DStateBlockImpl *stateblock) { + if(stateblock->renderState[WINED3DRS_LASTPIXEL]) { + TRACE("Last Pixel Drawing Enabled\n"); + } else { + FIXME("Last Pixel Drawing Disabled, not handled yet\n"); + } +} + const struct StateEntry StateTable[] = { /* State name representative, apply function */ @@ -1055,7 +1063,7 @@ const struct StateEntry StateTable[] = { /* 13, WINED3DRS_PLANEMASK */ STATE_RENDER(WINED3DRS_PLANEMASK), state_unknown }, { /* 14, WINED3DRS_ZWRITEENABLE */ STATE_RENDER(WINED3DRS_ZWRITEENABLE), state_zwritenable }, { /* 15, WINED3DRS_ALPHATESTENABLE */ STATE_RENDER(WINED3DRS_ALPHATESTENABLE), state_alpha }, - { /* 16, WINED3DRS_LASTPIXEL */ STATE_RENDER(WINED3DRS_LASTPIXEL), state_unknown }, + { /* 16, WINED3DRS_LASTPIXEL */ STATE_RENDER(WINED3DRS_LASTPIXEL), state_lastpixel }, { /* 17, WINED3DRS_TEXTUREMAG */ 0 /* Handled in ddraw */, state_undefined }, { /* 18, WINED3DRS_TEXTUREMIN */ 0 /* Handled in ddraw */, state_undefined }, { /* 19, WINED3DRS_SRCBLEND */ STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_blend },