- if (use_vs(stateblock->wineD3DDevice) && stateblock->wineD3DDevice->vs_selected_mode == SHADER_ARB)
GLSL specific logic should go in glsl_shader.c.
Please try to get away from writing code in terms of flags and if statements - use the OOP model. Backend-specific logic should be removed from pixelshader and vertexshader too...