[Mesa-dev] Discussion: C++11 std::future in Mesa

0xe2.0x9a.0x9b at gmail.com
Wed Jun 1 16:06:09 UTC 2016


On Wed, Jun 1, 2016 at 3:53 PM, Marek Olšák <maraeo at gmail.com> wrote:
> Because of external factors you can't predict, your driver suddenly
> receives a bunch of shaders that take 2000 ms to compile right before
> a draw call. Your budget is 16 ms per frame to get 30 fps, but you
> can't render the frame if you don't compile those shaders. The problem
> is how to fit the compilation that takes 2000 ms and is required
> render the frame into 16 ms. Can you see where I'm going?

I don't understand why transforming parts of shader compilation into
asynchronous code isn't the right way to go. Async parts of
compilation can potentially run on other CPU cores, maybe lowering
those 2000ms down to 750ms.


More information about the mesa-dev mailing list