So when I implemented shader subroutines, I ignored part of the spec, because nobody really cares or uses this extension.
But since CTS has a test for this feature I thought I'd implement it a bit better now (still not perfect). So the spec says that the values in the subroutine uniforms are stored per context not per program. The first patch is enough to pass the CTS test which doesn't do any rendering checks, it just writes values from multiple contexts and reads them back. The second 4 tests, push the updating of the subroutines into the constant upload paths of the drivers, so it calls the API to update the subroutine constants just before it writes the constants to the hw. This might not be perfect in some threaded cases, but it's a lot better than nothing, and I don't think this API will see much use going forward. With these and the previous one liner, there is only one failing test in CTS for subroutines and it is due to program binary API. Dave. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev