Add MetalCmdBufferStatus enum

This commit is contained in:
Jake Turner
2022-06-28 20:29:50 +01:00
committed by Baldur Karlsson
parent 4d69962397
commit ee82cf1476
2 changed files with 25 additions and 0 deletions
+11
View File
@@ -124,6 +124,17 @@ inline MTL::Resource *Unwrap(WrappedMTLResource *obj)
return Unwrap<MTL::Resource *>((WrappedMTLObject *)obj);
}
enum class MetalCmdBufferStatus : uint32_t
{
NoFlags = 0,
Enqueued = 1 << 0,
Committed = 1 << 1,
Submitted = 1 << 2,
Presented = 1 << 3,
};
BITMASK_OPERATORS(MetalCmdBufferStatus);
struct MetalCmdBufferRecordingInfo
{
MetalCmdBufferRecordingInfo(WrappedMTLCommandQueue *parentQueue)
@@ -1145,3 +1145,17 @@ rdcstr DoStringise(const MetalResourceType &el)
}
END_ENUM_STRINGISE();
}
template <>
rdcstr DoStringise(const MetalCmdBufferStatus &el)
{
BEGIN_BITFIELD_STRINGISE(MetalCmdBufferStatus)
{
STRINGISE_BITFIELD_CLASS_VALUE(NoFlags);
STRINGISE_BITFIELD_CLASS_BIT(Enqueued);
STRINGISE_BITFIELD_CLASS_BIT(Committed);
STRINGISE_BITFIELD_CLASS_BIT(Submitted);
STRINGISE_BITFIELD_CLASS_BIT(Presented);
}
END_BITFIELD_STRINGISE()
}