2018-09-05 21:17:52 +08:00
|
|
|
/*
|
2020-01-30 16:24:03 +08:00
|
|
|
* Copyright (C) 2017-2020 Intel Corporation
|
2018-09-18 15:11:08 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
2018-09-05 21:17:52 +08:00
|
|
|
|
|
|
|
#pragma once
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/utilities/stackvec.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2019-12-17 15:11:16 +08:00
|
|
|
#include <vector>
|
2019-03-04 21:50:26 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-09-07 13:18:38 +08:00
|
|
|
|
2018-09-05 21:17:52 +08:00
|
|
|
struct ResidencyData {
|
2020-08-17 22:38:21 +08:00
|
|
|
ResidencyData(size_t maxOsContextCount) : resident(maxOsContextCount, 0), lastFenceValues(static_cast<size_t>(maxOsContextCount)) {}
|
|
|
|
std::vector<bool> resident;
|
2018-09-07 13:18:38 +08:00
|
|
|
|
2018-10-22 22:43:20 +08:00
|
|
|
void updateCompletionData(uint64_t newFenceValue, uint32_t contextId);
|
2018-09-07 13:18:38 +08:00
|
|
|
uint64_t getFenceValueForContextId(uint32_t contextId);
|
|
|
|
|
|
|
|
protected:
|
2020-01-30 16:24:03 +08:00
|
|
|
StackVec<uint64_t, 32> lastFenceValues;
|
2018-09-05 21:17:52 +08:00
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|