<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 1, 2016 at 4:58 PM, Eero Tamminen <span dir="ltr"><<a href="mailto:eero.t.tamminen@intel.com" target="_blank">eero.t.tamminen@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<span class=""><br>
<br>
On 01.06.2016 16:53, Marek Olšák wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Jun 1, 2016 at 3:02 PM, ⚛ <<a href="mailto:0xe2.0x9a.0x9b@gmail.com" target="_blank">0xe2.0x9a.0x9b@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Jun 1, 2016 at 2:19 PM, Marek Olšák <<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'll let you figure it out by yourself.<br>
</blockquote>
<br>
Why would you withhold information if you already have it? Are you a<br>
"bad person" or something?<br>
<br>
As far as my memory goes, I have never posted the sentence "I'll let<br>
you figure it out by yourself" to the Internet because I believe it is<br>
wrong.<br>
</blockquote>
<br>
:)<br>
<br>
Shader compilation at game loading time is never a problem, so we can<br>
ignore that.<br>
</blockquote>
<br></span>
Startup time may not be a problem for games (some gamers may disagree), but there are also devices which have legal / certification requirements for startup times, where shader compilation time could be a problem, especially as Mesa shader compilation tends to get slower over time (as compiler does more optimizations).<br>
<br>
Those devices have pretty static content (at least for startup), so their shaders could be pre-compiled if 3D driver supports that and has offline compiler. Many proprietary drivers do, Mesa doesn't, at least not yet.<span class=""><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Shader compilation right before draw calls is what's unpleasant and<br>
when people talk about it in the negative sense, they mean this.<br>
<br>
Because of external factors you can't predict, your driver suddenly<br>
receives a bunch of shaders that take 2000 ms to compile right before<br>
a draw call. Your budget is 16 ms per frame to get 30 fps, but you<br>
can't render the frame if you don't compile those shaders. The problem<br>
is how to fit the compilation that takes 2000 ms and is required<br>
render the frame into 16 ms. Can you see where I'm going?<br>
</blockquote>
<br></span>
Besides application itself compiling a shader, some state change done by application may also trigger shader recompile in Mesa. While for application requested compilation nothing can be done to squeeze it into 16ms, there are some chances of reducing need for state-change triggered recompiles (and these improvements have been done to Mesa during the years).</blockquote><div><br></div></div>radeonsi doesn't do state-change triggered recompiles since LLVM 3.8. I think nv50/nvc0 doesn't do that either, though I do understand this is a very serious issue with other drivers.<br><br></div><div class="gmail_extra">The real problem for us (radeonsi specifically) is that some apps really load shaders right before they wanna use them.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Marek<br><br></div><div class="gmail_extra">PS: My mistake, 16 ms is a requirement for 60 fps, not 30.<br></div></div>