http://bugs.winehq.org/show_bug.cgi?id=8051
--- Comment #89 from Andy Clayton clayt055@umn.edu 2009-01-22 17:22:46 --- Regarding a software implementation: what if we did like OS X and compile GLSL to i386 (or what you will)?
Maybe this does not seem like less work, but I think a lot of it has already been done for us. Zack Rusin who works on Mesa has been using LLVM to do this [1] (as OS X does [2]). What's more, the GLSL parser for LLVM is already (at least partially) written. The repository that had the original code mentioned in [1] appears to be down now, but I believe its merged in to Gallium3D [3].
I've looked through wined3d in an attempt to figure out if this could be easily done, ignoring the issue for now that the referenced GLSL parser is in C++, but as I have no prior experience I am afraid I have little to show for my efforts. There was at one point a software renderer [3], though unfinished, so perhaps putting in another could follow that as an example? Yet that was relatively long ago, and the code has changed. Unfortunately, I also have little experience with gl, so I am a bit unsure of the if/how for getting at the data needed when mixing software processing with the gl processing on hardware like this.
Could Stefan or someone else who knows better comment?
[1] http://zrusin.blogspot.com/2007/05/mesa-and-llvm.html [2] http://lists.cs.uiuc.edu/pipermail/llvmdev/2006-August/006492.html http://llvm.org/pubs/2007-03-12-BossaLLVMIntro.pdf [3] http://dri.freedesktop.org/doxygen/gallium/gallivm_8h-source.html [4] http://wiki.winehq.org/DirectX-Shaders