You never did any 3D programming right? You have actually any idea what goes into a full fledged GPU driver? Guess not. And by the way, raytracing is bad for real-time graphics. There are lab-condition test-cases but it simply can’t keep up with a HW Rasterizer. There’s a reason Tri-based rendering won over ray-tracing in real-time. It’s non-branching, non-correlated, deterministic and scale well with many pipes.
EDIT: Besides. Mesa just sits “above” the driver. You need binary blobs (or the open source drivers of AMD) to get things working. Mesa alone gives SW Rendering. Granted you can produce like this a render speed comparable to an old aged 3D graphics card but you can hardly run anything “interesting” with it.