mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-22 21:55:52 +00:00
Add serialization for FrameRefType
This commit is contained in:
committed by
Baldur Karlsson
parent
c289290ffa
commit
5e49b076b5
@@ -53,6 +53,20 @@ void SetReplayResourceIDs()
|
||||
|
||||
INSTANTIATE_SERIALISE_TYPE(ResourceManagerInternal::WrittenRecord);
|
||||
|
||||
template <>
|
||||
std::string DoStringise(const FrameRefType &el)
|
||||
{
|
||||
BEGIN_ENUM_STRINGISE(FrameRefType)
|
||||
{
|
||||
STRINGISE_ENUM_CLASS_NAMED(eFrameRef_None, "None");
|
||||
STRINGISE_ENUM_CLASS_NAMED(eFrameRef_PartialWrite, "Partial Write");
|
||||
STRINGISE_ENUM_CLASS_NAMED(eFrameRef_CompleteWrite, "Complete Write");
|
||||
STRINGISE_ENUM_CLASS_NAMED(eFrameRef_Read, "Read");
|
||||
STRINGISE_ENUM_CLASS_NAMED(eFrameRef_ReadBeforeWrite, "Read Before Write");
|
||||
}
|
||||
END_ENUM_STRINGISE()
|
||||
}
|
||||
|
||||
FrameRefType ComposeFrameRefs(FrameRefType first, FrameRefType second)
|
||||
{
|
||||
RDCASSERT(eFrameRef_Minimum <= first && first <= eFrameRef_Maximum);
|
||||
|
||||
@@ -100,6 +100,8 @@ enum FrameRefType
|
||||
const FrameRefType eFrameRef_Minimum = eFrameRef_None;
|
||||
const FrameRefType eFrameRef_Maximum = eFrameRef_ReadBeforeWrite;
|
||||
|
||||
DECLARE_REFLECTION_ENUM(FrameRefType);
|
||||
|
||||
// Compose frame refs that occur in a known order.
|
||||
// This can be thought of as a state (`first`) and a transition from that state
|
||||
// (`second`), returning the new state (see the state diagram for
|
||||
|
||||
Reference in New Issue
Block a user