2018-11-22 15:16:20 +01:00
|
|
|
/*
|
2019-03-26 11:59:46 +01:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-11-22 15:16:20 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
#include "runtime/command_stream/scratch_space_controller.h"
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2018-11-22 15:16:20 +01:00
|
|
|
|
|
|
|
|
class ScratchSpaceControllerBase : public ScratchSpaceController {
|
|
|
|
|
public:
|
2019-03-29 00:49:23 +01:00
|
|
|
ScratchSpaceControllerBase(ExecutionEnvironment &environment, InternalAllocationStorage &allocationStorage);
|
2018-11-22 15:16:20 +01:00
|
|
|
|
|
|
|
|
void setRequiredScratchSpace(void *sshBaseAddress,
|
|
|
|
|
uint32_t requiredPerThreadScratchSize,
|
|
|
|
|
uint32_t currentTaskCount,
|
2018-12-03 10:05:36 +01:00
|
|
|
uint32_t contextId,
|
2018-11-22 15:16:20 +01: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 11:59:46 +01:00
|
|
|
} // namespace NEO
|