init_memory_hook() is no longer required, eliminating static initialization order issues
This required moving the DeletedBufferChain map elsewhere, which now also has a const-initialized array for relatively small allocations.
Also, deletedChain.T has been renamed to deletedChain.I
Fixes#539
This typedefs to std::atomic<> when building with true threading, and uses a dummy implementation without.
This lets us use the full range of atomic operations offered by C++11, including explicit specification of memory fences. Using barriers lets the compiler generate more optimal code since currently we are using the quite strict sequential-consistent memory ordering for all operations. ReferenceCount has been changed to use the correct barriers (I hope). This may especially make a difference on weak ordering systems such as ARM.
Over time we should gradually replace the use of AtomicAdjust with the new patomic file.
Previously it was only possible to set this in the default-loaded Config.prc file; now it is possible to set this at any time, though it can only be set once from its default value and not changed after it has already been set to something other than the default value.
* Allow arbitrary selection of optional keyword arguments in some cases
* Reduce code bloat of generated bindings
* Work around awkward resolution of set_shader_input overloads
* Document the code a bit better
* Make coercion a bit cleaner for reference counted types
* A few optimization tweaks
* Use generic errors in NDEBUG build to reduce size of string pool