[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] ANGLE_instanced_arrays extension proposal
This thread has moved a bit off topic, but I'd just like to point out that native games have been dealing with context lost events for a decade or so in the same way: reload everything from storage (which in the web could be a remote host). A context loss should never happen when the user is interacting with the content (unless the rendering system crashes, which should be rare), and if the user puts the device to sleep/switches out and back a few hours/days later/etc it's acceptable to reload content. Ideally, people are building things that load progressively instead of taking 5 minutes displaying a progress bar to get into the game, in which case it's not really that bad of a situation -- certainly not bad enough to warrant doubling your memory usage keeping buffers around!
On Wed, Mar 7, 2012 at 7:17 AM, Benoit Jacob <email@example.com>
On Wed, Mar 7, 2012 at 4:03 PM, Benoit Jacob <firstname.lastname@example.org> wrote:
The only solution is to periodically read back and save (to main memory, or disk storage) the contents of the buffers that you don't want to lose. You'll still lose the last N seconds of computation, but that's better than losing everything.
Readback will be pretty slow, and I don't think that for a majority of realtime GPGPU applications it would be a feasible choice.
I agree that letting the script do periodical readback of important buffers is not a great solution, but I don't see another. Having the WebGL implementation cache all the buffers would be a lot slower, as it would have to read back stuff all the time, and would use too much memory too, so it's definitely a worse solution.