Files
compute-runtime/opencl/source/helpers/hardware_context_controller.h
Slawomir Milczarek 905ed9e5bf Extended AUB fixtures with expect compressed memory
Related-To: NEO-5577

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2021-03-04 18:39:44 +01:00

38 lines
1.3 KiB
C++

/*
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "third_party/aub_stream/headers/aub_manager.h"
#include "third_party/aub_stream/headers/hardware_context.h"
#include <memory>
#include <vector>
namespace NEO {
struct AllocationParams;
class OsContext;
class HardwareContextController {
public:
HardwareContextController() = delete;
HardwareContextController(aub_stream::AubManager &aubManager, OsContext &osContext, uint32_t flags);
void initialize();
void pollForCompletion();
void expectMemory(uint64_t gfxAddress, const void *srcAddress, size_t length, uint32_t compareOperation);
void submit(uint64_t batchBufferGpuAddress, const void *batchBuffer, size_t batchBufferSize, uint32_t memoryBank, uint64_t entryBits, bool overrideRingHead);
void writeMemory(aub_stream::AllocationParams &allocationParams);
void writeMMIO(uint32_t offset, uint32_t value);
void dumpBufferBIN(uint64_t gfxAddress, size_t size);
void dumpSurface(const aub_stream::SurfaceInfo &surfaceInfo);
void readMemory(uint64_t gfxAddress, void *memory, size_t size, uint32_t memoryBanks, size_t pageSize);
std::vector<std::unique_ptr<aub_stream::HardwareContext>> hardwareContexts;
};
} // namespace NEO