Add a new Uuid type to store unique identifiers.

This commit is contained in:
Matthäus G. Chajdas
2017-08-21 11:27:57 +02:00
committed by baldurk
parent b39844bb59
commit 72ef43b969
2 changed files with 24 additions and 0 deletions
+16
View File
@@ -878,6 +878,22 @@ with software rendering, or with some functionality disabled due to lack of supp
DECLARE_REFLECTION_STRUCT(APIProperties);
DOCUMENT("A 128-bit Uuid.")
struct Uuid
{
Uuid(uint32_t a, uint32_t b, uint32_t c, uint32_t d)
{
bytes[0] = a;
bytes[1] = b;
bytes[2] = c;
bytes[3] = d;
}
Uuid() { bytes[0] = bytes[1] = bytes[2] = bytes[3] = 0; }
DOCUMENT("The Uuid bytes.")
uint32_t bytes[4];
};
DOCUMENT("Describes a GPU counter's purpose and result value.");
struct CounterDescription
{
+8
View File
@@ -1584,6 +1584,14 @@ void Serialiser::Serialise(const char *name, MeshFormat &el)
SIZE_CHECK(88);
}
template <>
void Serialiser::Serialise(const char *name, Uuid &el)
{
SerialisePODArray<4>("", el.bytes);
SIZE_CHECK(16);
}
template <>
void Serialiser::Serialise(const char *name, CounterDescription &el)
{