mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
added support for 2 stages write memory of aub_manager
1. write ppgtt pages only by calling write memory with pagesOnly set to true 2. write the actual memory pages by calling writePhysicalMemoryPages Change-Id: Id3766704e4b8f84f77336f78da6b9270bfd44b70
This commit is contained in:
8
third_party/aub_stream/headers/aub_manager.h
vendored
8
third_party/aub_stream/headers/aub_manager.h
vendored
@ -8,6 +8,8 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "page_info.h"
|
||||
|
||||
namespace aub_stream {
|
||||
|
||||
@ -26,7 +28,11 @@ class AubManager {
|
||||
virtual void pause(bool onoff) = 0;
|
||||
|
||||
virtual void addComment(const char *message) = 0;
|
||||
virtual void writeMemory(uint64_t gfxAddress, const void *memory, size_t size, uint32_t memoryBanks, int hint, size_t pageSize) = 0;
|
||||
virtual void writeMemory(uint64_t gfxAddress, const void *memory, size_t size, uint32_t memoryBanks,int hint, size_t pageSize) = 0;
|
||||
virtual void writePageTableEntries(uint64_t gfxAddress, const void *memory, size_t size, uint32_t memoryBanks, int hint,
|
||||
std::vector<PageInfo> &lastLevelPages, size_t pageSize) = 0;
|
||||
|
||||
virtual void writePhysicalMemoryPages(const void *memory, std::vector<PageInfo> &pages, size_t size, int hint) = 0;
|
||||
virtual void freeMemory(uint64_t gfxAddress, size_t size) = 0;
|
||||
|
||||
static AubManager *create(uint32_t productFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, uint32_t streamMode);
|
||||
|
16
third_party/aub_stream/headers/page_info.h
vendored
Normal file
16
third_party/aub_stream/headers/page_info.h
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
namespace aub_stream {
|
||||
|
||||
struct PageInfo {
|
||||
uint64_t physicalAddress;
|
||||
size_t size;
|
||||
bool isLocalMemory;
|
||||
uint32_t memoryBank;
|
||||
};
|
||||
} // namespace aub_stream
|
Reference in New Issue
Block a user