wined3d: Move the shader backend selection into a separate function.