If we've given up on fixed-function hardware, as we seem to have, is there any reason we shouldn't just construct fixed-function shaders in wined3d_device_apply_stateblock(), and avoid having to worry about fixed-function at all in core wined3d?
I considered that, but shader compilation is a relatively heavy operation, and I wasn't sure that it would be a good idea to have it on that side of the CS. Maybe that's not something we need to worry about?
I think there are different ways to structure things, but one option would be to create a wined3d_shader with "source_type" set to VKD3D_SHADER_SOURCE_HLSL, and then let the shader_precompile() from wined3d_shader_init_object() turn that into GLSL or SPIR-V. More generally, I don't think creating fixed-function shaders in wined3d_device_apply_stateblock() is necessarily incompatible with doing shader compilation on the CS thread or some other thread. But yes, ultimately we could get there incrementally, if desired.