xrtl icon indicating copy to clipboard operation
xrtl copied to clipboard

ES3: delay-create resources to avoid thread-locked contexts

Open benvanik opened this issue 8 years ago • 1 comments

Only need objects created when mapping, otherwise can be deferred until first use on the queue thread. Thinking:

  • context has a single platform context for resource stuff (this is the 'root' share group context)
  • queues have a context of their own
  • swap chains have a context of their own

The context could then have a small thread that listens for requests to map/unmap buffers and delete objects, and creations happen delayed on first execution.

benvanik avatar Jul 25 '17 17:07 benvanik

Pull #81 gets most of this done. Swiftshader has issues with multithreading (like, it has no thread safety at all >_>) so a mode that disables the present queue and does all GL actions on the primary queue would be a good workaround.

benvanik avatar Oct 16 '17 16:10 benvanik