[Bug 45468] Phase Shift: tails on sustain notes not visible unless GLSL is disabled

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jul 20 00:12:13 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=45468

--- Comment #7 from Andy Clayton <q3aiml+wine at 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].

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list