zink: cache/reuse more resources
We can do a lot more caching to (probably) improve performance:
- also only performing on-demand descriptor updates instead of forcing it
- (not in scope for this ticket but something to consider) also potentially reordering draws based on resource r/w usage (i.e., avoiding barriers) and some kind of runtime render graph which would be feasible if we can thread up batch usage to be actively sequencing multiple batches
Ideally we should only have to call
update_descriptors() when an change is actually required instead of every time.
Now that we have in-memory pipeline caching, it might be worthwhile to see what kinds of increases this mechanism might yield.
- backing resource caching (for invalidates)
Thinking that to start with a
zink_resource can just cache a couple extra backing images/mems any time invalidates occur on the basis that if an app is invalidating once, it's probably going to do it again.
- shader caching?
Not sure what kind of performance change this would yield, but it seems like not running ntv at all and just grabbing the spirv from a mmapped cached should be some kind of win.