BuckeyeSoftware / rex

rex engine and game
MIT License
15 stars 0 forks source link

decouple static/dynamic state from buffer format #63

Closed graphitemaster closed 3 years ago

graphitemaster commented 3 years ago

Currently the notion of a dynamic or static buffer is part of the input assembly description when it really should be part of the buffer. We erroneously mark the format of blocks on the arena as static to coalesce similar vertex formats under one backing buffer allocation but such modifications to the underlying buffer implicitly make that buffer dynamic (otherwise how else would coalescing work?)

The arena system needs to learn static vs dynamic blocks so the frontend can flush staging memory of static blocks within the dynamic buffer. This limitation is why buffers are the only resource that the frontend does not flush staging memory of yet, since doing so would break buffer coalescing optimizations.

graphitemaster commented 3 years ago

Done in 8540ece