Program Listing for File serialization/common.h
↰ Return to documentation for file (include\serialization\common.h
)
/******************************************************************************
© Intel Corporation.
This software and the related documents are Intel copyrighted materials,
and your use of them is governed by the express license under which they
were provided to you ("License"). Unless the License provides otherwise,
you may not use, modify, copy, publish, distribute, disclose or transmit
this software or the related documents without Intel's prior written
permission.
This software and the related documents are provided as is, with no express
or implied warranties, other than those that are expressly stated in the
License.
******************************************************************************/
#pragma once
#include <cstdint>
#include <cstddef>
#include <limits>
namespace gpa {
namespace serialization {
using GPATimestamp = uint64_t;
struct GPAToken;
struct StreamPacketHeader;
class MemoryBackedSerializer;
struct APICallLocation
{
uint64_t storageID;
uint64_t offset;
MemoryBackedSerializer const* temporarySerializer;
bool operator<(APICallLocation const& other) const;
bool operator==(APICallLocation const& other) const;
bool operator!=(APICallLocation const& other) const;
uint64_t user;
uint64_t unused;
};
struct APICallLocationHash
{
size_t operator()(APICallLocation const& location) const;
};
enum PacketType : uint8_t {
kMetal = 0,
kDirectX,
kVulkan,
kObjCPathApi,
kCPathApi,
kCOMPathApi,
kCopyData = 0x20,
kReleaseObject,
kCreateSurface,
kExecuteCall,
kResourceUpdate,
kThreadRestart,
kAdjustRefCount,
kWaitForHandle,
kMarker,
kResetD3D12Counter,
kRestorePoint,
kOpenHeap,
kInvalid = 0xFF,
};
constexpr uint8_t kInvalidPacketType = PacketType::kInvalid;
constexpr uint16_t kInvalidClassType = 0xFFFF;
enum ClassToken : uint16_t {
kFunction = 0,
};
enum OperationType : uint8_t {
};
constexpr uint32_t kInvalidFunctionType = 0xFFFFFFFF;
extern GPAToken const kInvalidToken;
extern StreamPacketHeader const kInvalidApiCallContext;
extern StreamPacketHeader const kNullApiCallContext;
using ArgsLenType = uint64_t;
#pragma push_macro("max")
#undef max
ArgsLenType constexpr kInvalidArgsLen = std::numeric_limits<ArgsLenType>::max();
#pragma pop_macro("max")
} // namespace serialization
} // namespace gpa