Program Listing for File metadata-extractor.h
↰ Return to documentation for file (include\playback\metadata-extraction\metadata-extractor.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 "introspection/instance.h"
#include "introspection/shader-interface.h"
#include "playback/callable-broadcaster.h"
#include "playback/callable-receiver.h"
#include "playback/resource-info/detail/resource-info-registry.h"
#include "playback/resource-info/enumerator.h"
#include "playback/resource-info/resource-info-types.h"
#include "reflection/struct-data-manager.h"
namespace gpa {
namespace playback {
class MetadataExtractor
: public CallableBroadcaster,
public CallableReceiver
{
public:
MetadataExtractor() = default;
virtual ~MetadataExtractor() = 0;
// NOTE : MetadataExtractor is temporarily a CallableBroadcaster so that
// both extractors can be fed during one repeat cycle.
void ConnectExecutionCallbacks(ExecutionCallbacks const& callbacks) override final;
void DisconnectExecutionCallbacks() override final;
virtual void PostSetupRange(CallableCache* range) override;
virtual void PreExecuteRange(CallableCache* range) override;
virtual void PreExecuteCall(Callable* callable, uint64_t callIndex) override;
virtual void PostExecuteRange(CallableCache* range) override;
virtual void PostExecuteCall(Callable* callable, uint64_t callIndex) override;
uint64_t GetCallCount() const;
ResourceInfo const* GetResourceInfo(ResourceId resourceId) const;
virtual ResourceInfo const* GetResourceInfoByGPUAddress(GPUAddress const& gpuAddress) const;
Enumerator<ResourceInfo> GetResourceInfos() const;
Enumerator<ResourceInfo> GetResourceInfos(ResourceInfo::Usage usage, uint64_t callIndex) const;
introspection::ShaderInterface GetShaderInterface(ShaderInfo const& shaderInfo) const;
virtual bool GetShaderSource(ShaderInfo const& shaderInfo, api_types::ShaderLanguage language, gpa::api_types::ShaderSource& source) const;
virtual serialization::StructDataManager GetResourceStructDataManager(ResourceInfo const* pResourceInfo) const;
virtual void GetResourceStructJson(ResourceInfo const* pResourceInfo, size_t* pJsonSize, char* pJson) const;
protected:
detail::ResourceInfoRegistry mRegistry;
mutable std::vector<api_types::ManagedShaderSource> mShaderSources;
ExecutionCallbacks mExecutionCallbacks;
MetadataExtractor(MetadataExtractor const&) = delete;
MetadataExtractor& operator=(MetadataExtractor const&) = delete;
};
} // namespace playback
} // namespace gpa