Stefan Dösinger wrote:
Now that the decoded vertex declaration is put into the device with baseVertexIndex = 0, vertex buffers can just memcpy it instead of decoding it
Here's an issue I see - isn't introduced by your patch, but I am just confused. In the vertex buffer code:
if(device->stateBlock->vertexShader != NULL && wined3d_settings.vs_mode != VS_NONE &&((IWineD3DVertexShaderImpl *)device->stateBlock->vertexShader)->baseShader.function != NULL && GL_SUPPORT(ARB_VERTEX_PROGRAM)) { /* Case 1: Vertex Shader: No conversion */ TRACE("Vertex Shader, no conversion needed\n"); } else if(device->stateBlock->vertexDecl || device->stateBlock->vertexShader) {
1) No code should be looking at wined3d_settings.vs_mode.
This is the user spec from winecfg, which is taken into account as one of the things that determines shader mode. There are a number of other things involved - use device->shader_mode instead.
2) GL_SUPPORT(ARB_VERTEX_PROGRAM) has already been accounted for when selecting the shader mode in the device
3) This if statement looks kind of like the "useVertexShaderFunction" variable in drawprim
4) Why is the "device->stateblock->vertexShader" case included in the else statement? You cannot use this function with a vertex shader - it would not work at all, as the strided data is formatted differently (same issue as the trace function discussed earlier).