Fixing some mac stuff

This commit is contained in:
Dynamitos committed 2024-05-17 18:08:11 +02:00
1 parent 5fd41b8388
commit 2b27ddd134
23 files changed
+747 -539

No files matched your search

+21
View File
@@ -10,6 +10,27 @@
namespace Seele {
namespace Metal {
DECLARE_REF(Graphics);
class CommandBoundResource
{
public:
CommandBoundResource(PGraphics graphics)
: graphics(graphics)
{
}
virtual ~CommandBoundResource()
{
if (isCurrentlyBound())
abort();
}
constexpr bool isCurrentlyBound() const { return bindCount > 0; }
constexpr void bind() { bindCount++; }
constexpr void unbind() { bindCount--; }
protected:
PGraphics graphics;
uint64 bindCount = 0;
};
DEFINE_REF(CommandBoundResource)
class Fence {
public:
Fence(PGraphics graphics);