attackgoat / screen-13

Screen 13 is an easy-to-use Vulkan rendering engine in the spirit of QBasic.
Apache License 2.0
252 stars 12 forks source link

Make ResolverPool send to allow for resolve/submit on a different thread. #79

Closed DGriffin91 closed 3 months ago

DGriffin91 commented 3 months ago

Would it be possible to allow for resolve/submit on a different thread?

I'm currently using this to get some initial pipelined rendering working where the graph is built on one thread and then resolved/submitted on another.

Here's a screenshot from tracy with before and after.

image

attackgoat commented 3 months ago

I think Send is a reasonable constraint here, and it looks like you're saving 3ms!

This could also be accomplished by just keeping a Pool type on the worker thread, it's safe to create and drop at any time.