You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
The hierarchy now uses a request barrier after the first synchronous request completion. Async requests could occasionally complete fast enough that DispatchRequests would be left to handle the completion. In that scenario, there would not be a barrier in place when beginning any subsequent requests, which would lead to a failed assertion in the request owner. #preflight 63ceb5c63a03cb0bbff95362 #rb Zousar.Shaker [CL 23848713 by Devin Doucette in ue5-main branch]
54 lines
1.7 KiB
C++
54 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#if WITH_LOW_LEVEL_TESTS
|
|
|
|
#include "DerivedDataLegacyCacheStore.h"
|
|
#include "Misc/EnumClassFlags.h"
|
|
|
|
namespace UE::DerivedData
|
|
{
|
|
|
|
class ITestCacheStore : public ILegacyCacheStore
|
|
{
|
|
public:
|
|
virtual ECacheStoreFlags GetFlags() const = 0;
|
|
virtual uint32 GetTotalRequestCount() const = 0;
|
|
virtual uint32 GetCanceledRequestCount() const = 0;
|
|
|
|
virtual void AddRecord(const FCacheKey& Key, TConstArrayView<FValueWithId> Values, const FCbObject* Meta = nullptr) = 0;
|
|
virtual TConstArrayView<FValueWithId> FindRecord(const FCacheKey& Key, FCbObject* OutMeta = nullptr) const = 0;
|
|
|
|
virtual void AddValue(const FCacheKey& Key, const FValue& Value) = 0;
|
|
virtual FValue FindValue(const FCacheKey& Key) const = 0;
|
|
|
|
virtual void AddContent(const FCompressedBuffer& Content) = 0;
|
|
virtual FCompressedBuffer FindContent(const FIoHash& RawHash, uint64 RawSize) const = 0;
|
|
|
|
virtual TConstArrayView<FCachePutRequest> GetPutRequests() const = 0;
|
|
virtual TConstArrayView<FCacheGetRequest> GetGetRequests() const = 0;
|
|
virtual TConstArrayView<FCachePutValueRequest> GetPutValueRequests() const = 0;
|
|
virtual TConstArrayView<FCacheGetValueRequest> GetGetValueRequests() const = 0;
|
|
virtual TConstArrayView<FCacheGetChunkRequest> GetGetChunkRequests() const = 0;
|
|
|
|
virtual void ExecuteAsync() = 0;
|
|
};
|
|
|
|
enum class ETestCacheStoreFlags : uint32
|
|
{
|
|
None = 0,
|
|
/** Async execution of requests. */
|
|
Async = 1 << 0,
|
|
/** Waits on async execution of requests. */
|
|
Wait = 1 << 1,
|
|
};
|
|
|
|
ENUM_CLASS_FLAGS(ETestCacheStoreFlags);
|
|
|
|
ITestCacheStore* CreateTestCacheStore(ECacheStoreFlags Flags, ETestCacheStoreFlags TestFlags);
|
|
|
|
} // UE::DerivedData
|
|
|
|
#endif // WITH_LOW_LEVEL_TESTS
|