Module: wine Branch: master Commit: 141f31f05dff3405f26f3b7a29c943ecab866c68 URL: http://source.winehq.org/git/wine.git/?a=commit;h=141f31f05dff3405f26f3b7a29...
Author: Stefan Dösinger stefan@codeweavers.com Date: Wed Jul 2 10:02:19 2008 -0500
wined3d: Move stream source and vshader to misc and vertex pipeline tables.
---
dlls/wined3d/directx.c | 2 +- dlls/wined3d/state.c | 18 ++++++++++++------ dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 7f77604..c1f68f8 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3447,7 +3447,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, object->shader_backend = select_shader_backend(Adapter, DeviceType);
compile_state_table(object->StateTable, object->multistate_funcs, - NULL, NULL, misc_state_template, + ffp_vertexstate_template, NULL, misc_state_template, object->shader_backend->StateTable_remove);
/* Prefer the vtable with functions optimized for single dirtifyable objects if the shader diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index c8bbc14..47fb87f 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -3381,7 +3381,7 @@ static inline void drawPrimitiveTraceDataLocations( return; }
-static void handleStreams(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { +static void streamsrc(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { IWineD3DDeviceImpl *device = stateblock->wineD3DDevice; BOOL fixup = FALSE; WineDirect3DVertexStridedData *dataLocations = &device->strided_streams; @@ -3478,8 +3478,6 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, W IWineD3DDeviceImpl *device = stateblock->wineD3DDevice; BOOL wasrhw = context->last_was_rhw;
- handleStreams(state, stateblock, context); - /* Shaders can be implemented using ARB_PROGRAM, GLSL, or software - * here simply check whether a shader was set, or the user disabled shaders */ @@ -4837,10 +4835,10 @@ const struct StateEntry FFPStateTable[] = { /*510, WINED3DTS_WORLDMATRIX(254) */ STATE_TRANSFORM(WINED3DTS_WORLDMATRIX(254)), transform_worldex }, { /*511, WINED3DTS_WORLDMATRIX(255) */ STATE_TRANSFORM(WINED3DTS_WORLDMATRIX(255)), transform_worldex }, /* Various Vertex states follow */ - { /* , STATE_STREAMSRC */ STATE_VDECL, vertexdeclaration }, + { /* , STATE_STREAMSRC */ STATE_VDECL, NULL }, { /* , STATE_INDEXBUFFER */ STATE_INDEXBUFFER, indexbuffer }, - { /* , STATE_VDECL */ STATE_VDECL, vertexdeclaration }, - { /* , STATE_VSHADER */ STATE_VDECL, vertexdeclaration }, + { /* , STATE_VDECL */ STATE_VDECL, NULL }, + { /* , STATE_VSHADER */ STATE_VDECL, NULL }, { /* , STATE_VIEWPORT */ STATE_VIEWPORT, viewport }, { /* , STATE_VERTEXSHADERCONSTANT */ STATE_VERTEXSHADERCONSTANT, shaderconstant }, { /* , STATE_PIXELSHADERCONSTANT */ STATE_VERTEXSHADERCONSTANT, shaderconstant }, @@ -4904,6 +4902,14 @@ const struct StateEntryTemplate misc_state_template[] = { { STATE_RENDER(WINED3DRS_DESTBLENDALPHA), { STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_blend }}, { STATE_RENDER(WINED3DRS_DESTBLENDALPHA), { STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_blend }}, { STATE_RENDER(WINED3DRS_BLENDOPALPHA), { STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_blend }}, + { STATE_STREAMSRC, { STATE_VDECL, streamsrc }}, + { STATE_VDECL, { STATE_VDECL, streamsrc }}, + {0 /* Terminate */, { 0, 0 }}, +}; + +const struct StateEntryTemplate ffp_vertexstate_template[] = { + { STATE_VDECL, { STATE_VDECL, vertexdeclaration }}, + { STATE_VSHADER, { STATE_VDECL, vertexdeclaration }}, {0 /* Terminate */, { 0, 0 }}, };
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 90f89fe..35b096b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -593,6 +593,7 @@ struct StateEntryTemplate };
extern const struct StateEntryTemplate misc_state_template[]; +extern const struct StateEntryTemplate ffp_vertexstate_template[];
/* "Base" state table */ extern const struct StateEntry FFPStateTable[];