2018-11-22 22:16:20 +08:00
|
|
|
/*
|
2019-03-26 18:59:46 +08:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-11-22 22:16:20 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "runtime/command_stream/scratch_space_controller.h"
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-11-22 22:16:20 +08:00
|
|
|
|
|
|
|
class ScratchSpaceControllerBase : public ScratchSpaceController {
|
|
|
|
public:
|
2019-03-29 07:49:23 +08:00
|
|
|
ScratchSpaceControllerBase(ExecutionEnvironment &environment, InternalAllocationStorage &allocationStorage);
|
2018-11-22 22:16:20 +08:00
|
|
|
|
|
|
|
void setRequiredScratchSpace(void *sshBaseAddress,
|
|
|
|
uint32_t requiredPerThreadScratchSize,
|
2019-06-27 18:59:27 +08:00
|
|
|
uint32_t requiredPerThreadPrivateScratchSize,
|
2018-11-22 22:16:20 +08:00
|
|
|
uint32_t currentTaskCount,
|
2019-09-16 20:59:54 +08:00
|
|
|
OsContext &osContext,
|
2018-11-22 22:16:20 +08:00
|
|
|
bool &stateBaseAddressDirty,
|
|
|
|
bool &vfeStateDirty) override;
|
|
|
|
uint64_t calculateNewGSH() override;
|
|
|
|
uint64_t getScratchPatchAddress() override;
|
|
|
|
|
|
|
|
void reserveHeap(IndirectHeap::Type heapType, IndirectHeap *&indirectHeap) override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void createScratchSpaceAllocation();
|
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|