Skip to content

Commit 5a6783d

Browse files
Merge pull request #640 from Devsh-Graphics-Programming/timeline_events
Timeline events
2 parents 7b6a5ef + 7c19d7f commit 5a6783d

31 files changed

+634
-1103
lines changed

include/IVideoCapabilityReporter.h

Lines changed: 0 additions & 67 deletions
This file was deleted.

include/IVideoDriver.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

include/nbl/asset/IAssetManager.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ std::function<void(SAssetBundle&)> makeAssetDisposeFunc(const IAssetManager* con
4545
@see IAsset
4646
4747
*/
48-
class NBL_API2 IAssetManager : public core::IReferenceCounted, public core::QuitSignalling
48+
class NBL_API2 IAssetManager : public core::IReferenceCounted
4949
{
5050
// the point of those functions is that lambdas returned by them "inherits" friendship
5151
friend std::function<void(SAssetBundle&)> makeAssetGreetFunc(const IAssetManager* const _mgr);
@@ -150,8 +150,6 @@ class NBL_API2 IAssetManager : public core::IReferenceCounted, public core::Quit
150150
protected:
151151
virtual ~IAssetManager()
152152
{
153-
quitEventHandler.execute();
154-
155153
for (size_t i = 0u; i < m_assetCache.size(); ++i)
156154
if (m_assetCache[i])
157155
delete m_assetCache[i];

include/nbl/builtin/hlsl/cpp_compat/intrinsics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ inline T determinant(const matrix<T,N,M>& m)
5353

5454
NBL_BIT_OP_GLM_PASSTHROUGH(findLSB,findLSB)
5555

56-
NBL_BIT_OP_GLM_PASSTHROUGH(findMSB,findLSB)
56+
NBL_BIT_OP_GLM_PASSTHROUGH(findMSB,findMSB)
5757

5858
// inverse not defined cause its implemented via hidden friend
5959
template<typename T, uint16_t N, uint16_t M>

include/nbl/core/SingleEventHandler.h

Lines changed: 0 additions & 189 deletions
This file was deleted.

include/nbl/core/declarations.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
#include "nbl/core/util/to_underlying.h"
6767

6868
// other useful things
69-
#include "nbl/core/SingleEventHandler.h"
7069
#include "nbl/core/EventDeferredHandler.h"
7170
#include "nbl/core/IBuffer.h"
7271
#include "nbl/core/IReferenceCounted.h"

include/nbl/video/ILogicalDevice.h

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -148,31 +148,19 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
148148

149149
//! Semaphore Stuff
150150
virtual core::smart_refctd_ptr<ISemaphore> createSemaphore(const uint64_t initialValue) = 0;
151-
//
152-
struct SSemaphoreWaitInfo
153-
{
154-
const ISemaphore* semaphore;
155-
uint64_t value;
156-
};
157-
enum class WAIT_RESULT : uint8_t
158-
{
159-
TIMEOUT,
160-
SUCCESS,
161-
DEVICE_LOST,
162-
_ERROR
163-
};
164-
virtual WAIT_RESULT waitForSemaphores(const std::span<const SSemaphoreWaitInfo> infos, const bool waitAll, const uint64_t timeout) = 0;
151+
virtual ISemaphore::WAIT_RESULT waitForSemaphores(const std::span<const ISemaphore::SWaitInfo> infos, const bool waitAll, const uint64_t timeout) = 0;
165152
// Forever waiting variant if you're confident that the fence will eventually be signalled
166-
inline WAIT_RESULT blockForSemaphores(const std::span<const SSemaphoreWaitInfo> infos, const bool waitAll=true)
153+
inline ISemaphore::WAIT_RESULT blockForSemaphores(const std::span<const ISemaphore::SWaitInfo> infos, const bool waitAll=true)
167154
{
155+
using retval_t = ISemaphore::WAIT_RESULT;
168156
if (!infos.empty())
169157
{
170-
auto waitStatus = WAIT_RESULT::TIMEOUT;
171-
while (waitStatus==WAIT_RESULT::TIMEOUT)
158+
auto waitStatus = retval_t::TIMEOUT;
159+
while (waitStatus== retval_t::TIMEOUT)
172160
waitStatus = waitForSemaphores(infos,waitAll,999999999ull);
173161
return waitStatus;
174162
}
175-
return WAIT_RESULT::SUCCESS;
163+
return retval_t::SUCCESS;
176164
}
177165

178166
//! Event Stuff

0 commit comments

Comments
 (0)