mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Add aub_stream headers
Change-Id: I4d9420210e2a06d8a36abc0cf272901514ff3547
This commit is contained in:
committed by
sys_ocldev
parent
8504b37a08
commit
e6b93941ee
62
third_party/aub_stream/headers/aub_manager.h
vendored
Normal file
62
third_party/aub_stream/headers/aub_manager.h
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace AubDump {
|
||||
|
||||
class AubStreamer;
|
||||
struct AubFileStream;
|
||||
struct PhysicalAddressAllocator;
|
||||
struct GGTT;
|
||||
struct PML4;
|
||||
struct PDP4;
|
||||
using PPGTT = typename std::conditional<sizeof(void *) == 8, PML4, PDP4>::type;
|
||||
|
||||
class AubManager {
|
||||
public:
|
||||
AubManager(uint32_t devicesCount, bool localMemorySupported, std::string &aubFileName);
|
||||
virtual ~AubManager();
|
||||
|
||||
AubManager &operator=(const AubManager &) = delete;
|
||||
AubManager(const AubManager &) = delete;
|
||||
|
||||
GGTT *getGGTT(uint32_t index) {
|
||||
return ggtts.at(index).get();
|
||||
}
|
||||
|
||||
PPGTT *getPPGTT(uint32_t index) {
|
||||
return ppgtts.at(index).get();
|
||||
}
|
||||
|
||||
PhysicalAddressAllocator *getPysicalAddressAllocator() {
|
||||
return physicalAddressAllocator.get();
|
||||
}
|
||||
|
||||
AubFileStream *getAubFileStream() {
|
||||
return aubFileStream.get();
|
||||
}
|
||||
|
||||
AubStreamer *createAubStreamer(uint32_t gfxFamily, uint32_t device, uint32_t engine);
|
||||
|
||||
protected:
|
||||
void initialize(uint32_t devicesCount, bool localMemorySupported);
|
||||
|
||||
uint32_t devicesCount = 0;
|
||||
|
||||
std::unique_ptr<AubFileStream> aubFileStream;
|
||||
std::unique_ptr<PhysicalAddressAllocator> physicalAddressAllocator;
|
||||
|
||||
std::vector<std::unique_ptr<PPGTT>> ppgtts;
|
||||
std::vector<std::unique_ptr<GGTT>> ggtts;
|
||||
};
|
||||
|
||||
} // namespace AubDump
|
||||
29
third_party/aub_stream/headers/aub_streamer.h
vendored
Normal file
29
third_party/aub_stream/headers/aub_streamer.h
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
namespace AubDump {
|
||||
|
||||
class AubStreamer {
|
||||
public:
|
||||
void writeMemory(uint64_t gfxAddress, const void *memory, size_t size, uint32_t memoryBanks, size_t pageSize);
|
||||
void expectMemory(uint64_t gfxAddress, const void *memory, size_t size);
|
||||
void dumpBuffer(uint64_t gfxAddress, size_t size);
|
||||
void dumpImage(uint64_t gfxAddress, size_t size);
|
||||
|
||||
void submit(uint64_t batchBufferGfxAddress, const void *batchBuffer, size_t size, uint32_t memoryBank);
|
||||
void pollForCompletion();
|
||||
|
||||
class AubStreamerImpl;
|
||||
AubStreamerImpl *aubStreamerImpl;
|
||||
|
||||
~AubStreamer();
|
||||
};
|
||||
|
||||
} // namespace AubDump
|
||||
Reference in New Issue
Block a user