https://bugs.winehq.org/show_bug.cgi?id=45468
--- Comment #7 from Andy Clayton q3aiml+wine@gmail.com --- (In reply to Henri Verbeet from comment #6)
ffp_material.diffuse ultimately comes from the current material, set by wined3d_device_set_material()
Do you think somehow WINED3D_RS_DIFFUSEMATERIALSOURCE = WINED3D_MCS_COLOR1 could be getting ignored? In the logs I see DIFFUSEMATERIALSOURCE set to COLOR1:
0009:trace:d3d:wined3d_device_set_render_state device 0xd0fae0, state WINED3D_RS_DIFFUSEMATERIALSOURCE (0x91), value 0x1.
And with fixed-function vertex processing wine issues glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE) prior to the relevant glDrawArrays().
Based on shader_glsl_ffp_mcs() it seems like if WINED3D_MCS_COLOR1 is applied then the GLSL vertex shader would be
ffp_varying_diffuse.xyz = ffp_material.ambient.xyz * ambient + ffp_attrib_diffuse.xyz * diffuse + ffp_material.emissive.xyz; ffp_varying_diffuse.w = ffp_attrib_diffuse.w;
rather than the WINED3D_MCS_MATERIAL/ffp_material.diffuse variant being used.
Changing the shader to use ffp_attrib_diffuse does result in the tails appearing.
With GLSL there is a glVertexAttribPointer() call for location 5, which the shader assigns to ffp_attrib_diffuse, so there are unused values being passed. I did a little looking at the condition in wined3d_ffp_get_vs_settings(), but I do see a trace from wined3d_stream_info_from_declaration() which seems to say that the use_map flag FFP_DIFFUSE = 5 is getting flipped:
0009:trace:d3d:wined3d_stream_info_from_declaration Load fixed function array 5 [usage WINED3D_DECL_USAGE_COLOR, usage_idx 0, input_slot 0, offset 24, stride 36, format WINED3DFMT_B8G8R8A8_UNORM, class WINED3D_INPUT_PER_VERTEX_DATA, step_rate 0].