Program Listing for File playback-support.h

Return to documentation for file (include\playback-support\playback-support.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 "igpa-config.h"
#include <memory>

namespace gpa {

namespace serialization {
class MemoryBackedSerializer;
}  // namespace serialization

namespace stream {
class View;
}  // namespace stream

namespace capture_support {
class DataManager;
}  // namespace capture_support

namespace cross_gpu {
struct HeapPlacementManager;
}  // namespace cross_gpu

namespace playback {

class D3D12PlaybackSupport;
class IPlaybackListener;
class ObjectMap;

GPA_EXPORT ObjectMap* GetObjectMap();

GPA_EXPORT capture_support::DataManager* GetDataManager();

#if HAVE_DIRECTX
GPA_EXPORT D3D12PlaybackSupport* GetD3D12PlaybackSupport();
#endif

// use this key for setting and getting device memory types on DataManager
GPA_EXPORT void* GetDeviceMemoryTypeKey();

// use this key for setting and getting the default shader library (Metal) data on DataManager
GPA_EXPORT void* GetDefaultLibraryDataKey();

// use this key for setting and getting the mtlbuffer entry data on DataManager
GPA_EXPORT void* GetMTLBufferDataKey();

// use this key for setting and getting the object replacement key in object map
// Used for back buffer object replacement during playback
GPA_EXPORT void* GetObjectReplacementKey();

// use this key for setting and getting the d3d11 shader create info
GPA_EXPORT void* GetID3D11ShaderCreateInfoKey();

// use this key for setting and getting the d3d11 input layout create info
GPA_EXPORT void* GetID3D11InputLayoutCreateInfoKey();

struct Context
{
    playback::ObjectMap* objMap = nullptr;
    capture_support::DataManager* dataManager = nullptr;
    stream::View* view = nullptr;
    serialization::MemoryBackedSerializer* resourceSerializer = nullptr;
    playback::IPlaybackListener* playbackListener;
    bool repeating = false;
    uint64_t repeatPass = 0;
    playback::D3D12PlaybackSupport* d3d12Support = nullptr;
    bool shouldExecute = true;
};

}  // namespace playback
}  // namespace gpa