This is another step towards getting render states out of wined3d_state.
The idea here is similar to the "push constant buffers" used for d3d8/9 flat constants, and reuses the same infrastructure. That is, we pack all of the constants directly into a wined3d_buffer which is bound directly to the wined3d_state as a normal constant buffer. For SPIR-V this buffer is placed in the GPU, and the shader can simply access it directly, with no renderer-specific changes needed other than to determine the buffer's location.
Currently this buffer is still stored on the CPU for GLSL, and the contents are pulled back from the sysmem resource pointer, instead of being pulled from state->render_states.
Eventually, at least for Vulkan, the idea will be to write a FFP replacement shader which takes structured data (which, given the constraints of SPIR-V, is broadly necessary; we cannot simply upload individual named uniforms as we can with GLSL). In fact this will take the form of an HLSL shader compiled to Shader Model 2 bytecode. This allows us to, once again, reuse pretty much all of the existing infrastructure and avoid writing more backend-specific code, and has the effect that this FFP replacement works not only with SPIR-V but also with GLSL, allowing us to eventually remove the existing GLSL FFP pipeline, and enabling me to develop the HLSL FFP pipeline mainly using the GL renderer [which is useful since the Vulkan renderer is still missing a few other features].
The full branch is available at [1], and passes all tests when using the GL renderer.