cute_framework icon indicating copy to clipboard operation
cute_framework copied to clipboard

Dropping calls when sending too much drawable data to the GPU

Open RandyGaul opened this issue 3 years ago • 1 comments

Currently CF drops draw calls if too much data is requested to be sent to the GPU and issues a printed warning to stderr. This should work fairly well for development, but, an alternative may be much better.

Instead of dropping the draw call the vertices can be stored on the CPU in temporary memory, to be flushed to the GPU later. This would allow the entire system to handle temporary stalls in framerate, and simply render things a bit slower until the GPU catches up. The temporary overflow buffer can also fill up, at which point the entire CPU needs to hang and wait for the GPU, and a loud warning can be printed that to explain how the entire process is simply GPU bound.

RandyGaul avatar Jun 24 '22 18:06 RandyGaul

Related https://github.com/RandyGaul/cute_framework/issues/42

Relevant advice https://github.com/floooh/sokol/issues/681#issuecomment-1165835470

RandyGaul avatar Jun 24 '22 18:06 RandyGaul

I think this is acceptable default behavior as there's no simple and cross-platform way to block on GPU stalls

RandyGaul avatar Nov 01 '22 10:11 RandyGaul