What's the most efficient way to do redundancy checking (to avoid extraneous Direct3D API function calls for binding pipeline resources) ?
my goal is to minimize the low-level graphics wrapper overhead as much as possible.
(i use small integer handles everywhere instead of pointers. i decided to use 8-bit handles for all immutable render states (DepthStencil, Rasterizer, Sampler and Blend - they are created at the start) and all constant buffers (i have a fixed pool of CBs). i can only have 8 CBs/samplers bound simultaneously so i can concatenate the whole pipeline state into a few 64-bit integers and use bitwise instructions to calculate 'delta' and issue the corresponding Set* calls if needed.)
1) I need to block only in the editor mode, because the resulting code is simpler in my (small) experience:
I get a pointer and start manipulating the created mesh instance (e.g. move, rotate) or get an error screen.
2) Where can I find out more about efficient implementation of such a system (load request queue with fast access by request ids and minimum allocations) ?
Right now my queues are dynamic arrays and I perform a linear search to find requests by their ids.
3) So, your advice would be to delegate the task of managing temporary memory to the client?
(Then I'll have to think about fighting fragmentation on the client side.)
(In the background thread I'll be doing reading, decompression, pointer patching, setting external references (dependencies) to proxy objects and issuing requests to load them later.)