https://bugs.winehq.org/show_bug.cgi?id=45468
--- Comment #5 from Andy Clayton q3aiml+wine@gmail.com --- Henri: thanks so much for reading and helping.
You are absolutely right about the discard being valid. I messed up. Even without the discard nothing is rendered since ret.w always equals 0 and blending is enabled with glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA).
It then makes sense that removing the alpha-test shader code does not help. Setting MaxVersionGL while leaving GLSL enabled does remove the alpha-test code but also does not help. You are correct that the value of WINED3D_RS_ALPHAREF is 3.
It does help to change the ret.w assign from `ret.w = tex0.w * ffp_varying_diffuse.w;` to `ret.w = tex0.w;`.
I am just picking gl and d3d up again so I have to do some more reading and experiments to have a guess at what is going on with ffp_varying_diffuse's alpha. Or if you have any more insights to share that would also be great. I have been meaning to attach logs but need to cut them down to a reasonable size without losing anything important.
Thanks again for looking and sorry for my confusion.