2009/1/13 Stefan Dösinger stefan@codeweavers.com:
- This->baseShader.is_compiled = TRUE;
This changes code in pixelshader.c, looks unrelated.
+void find_vs_compile_args(IWineD3DVertexShaderImpl *shader, IWineD3DStateBlockImpl *stateblock, struct vs_compile_args *args) {
- args->fog_src = stateblock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE ? VS_FOG_COORD : VS_FOG_Z;
- args->swizzle_map = ((IWineD3DDeviceImpl *)shader->baseShader.device)->strided_streams.swizzle_map;
+}
You need to mask swizzle_map with use_map like in the original code, or you'll end up creating new shaders if an attribute that was previously swizzled is undefined now.
shader->gl_shaders = HeapReAlloc(GetProcessHeap(), 0, old_array,
(shader->num_gl_shaders + 1) * sizeof(*shader->gl_shaders));
Please don't grow arrays by a single element like that. I noticed find_gl_pshader() does that as well, please fix.
You're adding a trailing space here.