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