Program additional VFE_STATE instructions when needed

Additonal VFE_STATEs may be programmed when appending kernels to a
command list and when the command list is executed.

Related-To: NEO-4940, NEO-4574

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2021-04-23 17:27:40 +00:00
committed by Compute-Runtime-Automation
parent 9b12dc4390
commit 3a2281bf77
13 changed files with 200 additions and 11 deletions

View File

@@ -924,7 +924,7 @@ inline void CommandStreamReceiverHw<GfxFamily>::programVFEState(LinearStream &cs
auto engineGroupType = hwHelper.getEngineGroupType(getOsContext().getEngineType(), hwInfo);
auto pVfeState = PreambleHelper<GfxFamily>::getSpaceForVfeState(&csr, hwInfo, engineGroupType);
StreamProperties streamProperties{};
streamProperties.setCooperativeKernelProperties(lastKernelExecutionType == KernelExecutionType::Concurrent);
streamProperties.setCooperativeKernelProperties(lastKernelExecutionType == KernelExecutionType::Concurrent, hwInfo);
PreambleHelper<GfxFamily>::programVfeState(
pVfeState, hwInfo, requiredScratchSize, getScratchPatchAddress(),
maxFrontEndThreads, lastAdditionalKernelExecInfo, streamProperties);

View File

@@ -10,9 +10,13 @@
namespace NEO {
struct StreamProperties {
bool setCooperativeKernelProperties(bool isCooperative) {
bool setCooperativeKernelProperties(int32_t cooperativeKernelProperties, const HardwareInfo &hwInfo) {
return false;
}
int32_t getCooperativeKernelProperties() const {
return -1;
}
};
} // namespace NEO

View File

@@ -65,6 +65,7 @@ class HwHelper {
virtual bool hvAlign4Required() const = 0;
virtual bool isBufferSizeSuitableForRenderCompression(const size_t size) const = 0;
virtual bool obtainBlitterPreference(const HardwareInfo &hwInfo) const = 0;
virtual bool isRegularVfeUsed(const HardwareInfo &hwInfo) const = 0;
virtual bool checkResourceCompatibility(GraphicsAllocation &graphicsAllocation) = 0;
virtual bool allowRenderCompression(const HardwareInfo &hwInfo) const = 0;
virtual bool isBlitCopyRequiredForLocalMemory(const HardwareInfo &hwInfo, const GraphicsAllocation &allocation) const = 0;
@@ -228,6 +229,8 @@ class HwHelperHw : public HwHelper {
bool obtainBlitterPreference(const HardwareInfo &hwInfo) const override;
bool isRegularVfeUsed(const HardwareInfo &hwInfo) const override;
bool checkResourceCompatibility(GraphicsAllocation &graphicsAllocation) override;
bool timestampPacketWriteSupported() const override;

View File

@@ -55,6 +55,11 @@ bool HwHelperHw<Family>::obtainBlitterPreference(const HardwareInfo &hwInfo) con
return false;
}
template <typename Family>
bool HwHelperHw<Family>::isRegularVfeUsed(const HardwareInfo &hwInfo) const {
return true;
}
template <typename GfxFamily>
const HwHelper::EngineInstancesContainer HwHelperHw<GfxFamily>::getGpgpuEngineInstances(const HardwareInfo &hwInfo) const {
return {