Commit Graph

788 Commits

Author SHA1 Message Date
Lioncash 63c89a0bbf GL: Use return value of emplace_back()
emplace_back() returns a reference to the emplaced element, so we can
just make use of it instead of repeatedly querying back().
2019-08-24 20:07:49 -04:00
Lioncash e3b44edd51 GL: Use std::array where applicable 2019-08-24 19:53:23 -04:00
Lioncash 07835b58fb GL: Make const char* pointers arrays
Same behavior, but only stores the string data within the executable as
opposed to the data and a pointer to it. Also makes for less reading.
2019-08-24 19:02:13 -04:00
Phillip Stephens b0c246abc7 Fix code standard violations 2019-08-20 06:57:10 -07:00
Phillip Stephens 241db19cfb Avoid using None in enums, fix compilation 2019-08-20 01:06:52 -07:00
Phillip Stephens 091371458d
Merge pull request #26 from lioncash/header
General: Tidy up includes
2019-08-20 00:32:07 -07:00
Lioncash baff71cdc3 General: Tidy up includes
Alphabetizes includes and resolves quite a few instances of indirect
inclusions, making the requirements of several interfaces explicit. This
also trims out includes that aren't actually necessary (likely due to
changes in the API over time).
2019-08-19 21:02:56 -04:00
Phillip Stephens fd503b4a11 Don't use template parameter in equality op 2019-08-18 12:45:58 -07:00
Phillip Stephens daca17e866 Add equality operators to ObjectToken 2019-08-18 12:36:56 -07:00
Phillip Stephens 1e67f49b0b
Merge pull request #25 from lioncash/finder
DeviceFinder: Move includes into cpp file where applicable
2019-08-18 12:09:06 -07:00
Phillip Stephens b67eb2ba06
Merge pull request #24 from lioncash/ctor
IGraphicsDataFactory: Default initialize semantic for VertexElementDescriptor
2019-08-18 12:08:56 -07:00
Phillip Stephens 6be2f7520e
Merge pull request #23 from lioncash/explicit
BooObject: Make ObjToken operator bool explicit
2019-08-18 12:08:47 -07:00
Lioncash 90485ac1b9 DeviceFinder: Make use of unordered_map's emplace within _insertToken
Same thing, but less reading.
2019-08-18 05:50:37 -04:00
Lioncash 6cc5b30127 DeviceFinder: Invert conditionals within _insertToken and _removeToken
By converting the conditions into guard clauses, we can eliminate some
code nesting.
2019-08-18 05:48:57 -04:00
Lioncash 9853a97dd2 DeviceFinder: Move includes into cpp file where applicable
Avoids over-exposing inclusions that don't need to be propagated across
headers.
2019-08-18 05:45:13 -04:00
Lioncash 3ea95d9483 IGraphicsDataFactory: Default initialize semantic for VertexElementDescriptor
Makes initialization deterministic for the default constructor.
2019-08-18 03:53:41 -04:00
Lioncash d973b12dcd BooObject: Make ObjToken operator bool explicit
Makes explicit conversions to bool necessary to prevent error-prone
conversions to bool.
2019-08-18 03:19:53 -04:00
Phillip Stephens 2b63413369 Update logvisor 2019-08-17 22:58:48 -07:00
Phillip Stephens f3585c7660
Merge pull request #21 from lioncash/cmake
CMakeLists: Migrate off variables where applicable
2019-08-17 22:56:37 -07:00
Phillip Stephens 8114361966
Merge pull request #20 from lioncash/move
BooObject: Make ObjToken interface noexcept where applicable
2019-08-17 22:56:26 -07:00
Phillip Stephens 9c210e5989
Merge pull request #22 from lioncash/constexpr
System: Make operator|= and operator&= for enums constexpr
2019-08-17 22:56:17 -07:00
Lioncash 6289583b36 System: Take input parameter for operator|= and &= by value
These are just trivial enum values, so they can be passed by value to
avoid unnecessary dereferencing.
2019-08-17 20:40:47 -04:00
Lioncash ff0b3eb2b1 System: Make operator|= and operator&= for enums constexpr
It's valid to allow these to be used within a constexpr context. Makes
the enum functions more consistent.
2019-08-17 20:36:42 -04:00
Lioncash 0e08493596 CMakeLists: Migrate off variables where applicable
Avoids the use of individual variables and instead appends directly to
the target where necessary.
2019-08-17 19:10:51 -04:00
Lioncash 37670dca2c BooObject: Make SObjToken interface noexcept where applicable
Now that decrement() doesn't lock a mutex every time its executed, we
can mark it as noexcept. This allows us to make most of the interface
noexcept. In particular, the move constructor and move assignment
operator can now be noexcept. This allows all Boo objects to play nicely
with interfaces that may make use of std::move_if_noexcept, like some of
the standard library facilities, without always taking the copy
constructor/copy assignment.
2019-08-17 14:12:47 -04:00
Lioncash 84f62a0f2c BooObject: Remove destructorLock()
Now that we have the fencing and atomic operations in place to ensure
access to data on other threads will always occur before the use of
delete, we can remove the destructor lock. This will be useful for
making ObjToken's move assignment operator noexcept.
2019-08-17 14:12:23 -04:00
Lioncash 4d91a1b3c3 BooObject: Make atomic ordering constraints less strict
Increasing a reference count is able to always be relaxed. New
references to an object can only be formed from an existing reference.
The passing of an existing reference from one thread to another will
already necessitate the use of synchronization primitives, so this is a
safe change to make. Regardless, nothing other than the object itself
directly relies on the reference count, so this will always be a
suitably atomic operation, even in the face of no synchronization
primitives.

In the case of decrementing the reference count, it's sufficient to
treat it with release semantics and follow it up with an atomic thread
fence. This ensures that all accesses to the object in one thread will
occur before the delete occurs in another thread (if the situation ever
occurs).

This should make for a slightly more efficient increment and decrement.
2019-08-17 13:08:10 -04:00
Phillip Stephens c33604b8cb
Merge pull request #19 from lioncash/move
DeviceToken: Amend move constructor
2019-08-16 18:34:22 -07:00
Lioncash 88355ada5f General: Convert typedefs into using aliases 2019-08-16 18:27:23 -07:00
Lioncash 78ce16aa9f General: Make use of nullptr where applicable 2019-08-16 18:27:23 -07:00
Lioncash 386ec8e6cc General: Add missing override specifiers
Adds override specifiers that I missed for other platforms when
initially applying them to the codebase.
2019-08-16 18:27:23 -07:00
Lioncash 80c1103b44 General: Make member functions const where applicable
These functions don't modify instance state, so they can be marked
const.
2019-08-16 18:27:23 -07:00
Phillip Stephens 1822b555fa Fix missed override declarations 2019-08-16 18:27:23 -07:00
Lioncash 3c9866d697 DeviceToken: Amend move constructor
The default move constructor isn't const qualified. The copy assignment
operator wasn't deleted either which is somewhat dangerous. We can also
opt for simply defaulting the move constructor and assignment operators
instead of defining the move constructor like a copy constructor.
2019-08-16 04:49:48 -04:00
Phillip Stephens 0121d355c4 Fix missed override declarations 2019-08-13 14:39:45 -07:00
Phillip Stephens 5cff0c19bd
Merge pull request #17 from lioncash/override
General: Make use of override where applicable
2019-08-13 14:29:47 -07:00
Lioncash d4cd2b4dce General: Make use of override where applicable
Continues the override modernizations, but now targeting boo.
2019-08-12 22:44:45 -04:00
Jack Andersen af50bc0bc2 Windows build fixes 2019-07-27 15:19:25 -10:00
Jack Andersen ae5d7e5131 Add support for debug groups in OpenGL and Vulkan 2019-07-20 22:41:07 -10:00
Jack Andersen deefc8e995 Massive fmtlib refactor 2019-07-19 18:22:36 -10:00
Jack Andersen b2bf7549f5 Use Vulkan API version 1.1 2019-07-06 22:20:41 -10:00
Phillip Stephens 56439646b2 Proper macOS fixes >.< 2019-06-30 21:02:19 -07:00
Phillip Stephens 8523fcbb78 Actually fix Metal compiling 2019-06-30 20:40:03 -07:00
Phillip Stephens 35732d33f5 Fix macOS and Windows builds 2019-06-30 20:13:12 -07:00
Jack Andersen c5f8a11850 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/boo 2019-06-20 20:01:43 -10:00
Jack Andersen 8a181b96ce Add areShadersReady poll function 2019-06-20 20:01:27 -10:00
Phillip Stephens 6d3e97e959 Merge commit '87138bb' 2019-06-20 15:43:45 -07:00
Phillip Stephens 87138bbe0e Compile fixes 2019-06-20 15:43:27 -07:00
Jack Andersen e0674ff957 Made two variables atomic to be safe 2019-06-15 21:12:50 -10:00
Jack Andersen 7eda81e55e Initial support for asyncronous shader pipeline compilation 2019-06-15 20:24:28 -10:00