2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2020-01-09 23:10:48 +08:00
|
|
|
* Copyright (C) 2019-2020 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-25 20:32:27 +08:00
|
|
|
#include "shared/source/execution_environment/root_device_environment.h"
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/gmm_helper/gmm.h"
|
|
|
|
#include "shared/source/gmm_helper/gmm_helper.h"
|
|
|
|
#include "shared/source/helpers/aligned_memory.h"
|
2020-04-02 17:28:38 +08:00
|
|
|
#include "shared/source/helpers/constants.h"
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/helpers/hw_helper.h"
|
|
|
|
#include "shared/source/helpers/hw_info.h"
|
|
|
|
#include "shared/source/helpers/preamble.h"
|
|
|
|
#include "shared/source/memory_manager/graphics_allocation.h"
|
|
|
|
#include "shared/source/os_interface/os_interface.h"
|
2020-02-24 17:22:30 +08:00
|
|
|
|
2020-02-23 05:50:57 +08:00
|
|
|
#include "opencl/source/aub_mem_dump/aub_mem_dump.h"
|
|
|
|
#include "opencl/source/helpers/dispatch_info.h"
|
|
|
|
#include "opencl/source/helpers/hardware_commands_helper.h"
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-11-22 22:16:20 +08:00
|
|
|
|
2019-08-27 16:15:03 +08:00
|
|
|
template <typename Family>
|
|
|
|
const aub_stream::EngineType HwHelperHw<Family>::lowPriorityEngineType = aub_stream::EngineType::ENGINE_RCS;
|
|
|
|
|
2019-11-22 04:32:16 +08:00
|
|
|
template <typename Family>
|
|
|
|
const AuxTranslationMode HwHelperHw<Family>::defaultAuxTranslationMode = AuxTranslationMode::Builtin;
|
|
|
|
|
2019-03-19 19:57:47 +08:00
|
|
|
template <typename Family>
|
2019-10-09 23:32:35 +08:00
|
|
|
bool HwHelperHw<Family>::obtainRenderBufferCompressionPreference(const HardwareInfo &hwInfo, const size_t size) const {
|
2019-04-17 18:56:54 +08:00
|
|
|
return size > KB;
|
2019-03-19 19:57:47 +08:00
|
|
|
}
|
|
|
|
|
2018-02-19 16:50:17 +08:00
|
|
|
template <typename Family>
|
2018-08-23 23:42:35 +08:00
|
|
|
void HwHelperHw<Family>::setupHardwareCapabilities(HardwareCapabilities *caps, const HardwareInfo &hwInfo) {
|
2018-02-19 16:50:17 +08:00
|
|
|
caps->image3DMaxHeight = 16384;
|
|
|
|
caps->image3DMaxWidth = 16384;
|
2018-06-08 22:42:29 +08:00
|
|
|
//With statefull messages we have an allocation cap of 4GB
|
|
|
|
//Reason to subtract 8KB is that driver may pad the buffer with addition pages for over fetching..
|
|
|
|
caps->maxMemAllocSize = (4ULL * MemoryConstants::gigaByte) - (8ULL * MemoryConstants::kiloByte);
|
2018-07-10 19:22:11 +08:00
|
|
|
caps->isStatelesToStatefullWithOffsetSupported = true;
|
2018-02-19 16:50:17 +08:00
|
|
|
}
|
|
|
|
|
2019-08-29 11:46:37 +08:00
|
|
|
template <typename Family>
|
|
|
|
bool HwHelperHw<Family>::isL3Configurable(const HardwareInfo &hwInfo) {
|
|
|
|
return PreambleHelper<Family>::isL3Configurable(hwInfo);
|
|
|
|
}
|
|
|
|
|
2018-04-06 20:25:22 +08:00
|
|
|
template <typename Family>
|
|
|
|
SipKernelType HwHelperHw<Family>::getSipKernelType(bool debuggingActive) {
|
|
|
|
if (!debuggingActive) {
|
|
|
|
return SipKernelType::Csr;
|
|
|
|
}
|
|
|
|
return SipKernelType::DbgCsr;
|
|
|
|
}
|
2018-07-10 19:22:11 +08:00
|
|
|
|
2018-09-06 22:41:50 +08:00
|
|
|
template <typename Family>
|
|
|
|
size_t HwHelperHw<Family>::getMaxBarrierRegisterPerSlice() const {
|
|
|
|
return 32;
|
|
|
|
}
|
2018-09-26 03:44:36 +08:00
|
|
|
|
2019-08-23 06:23:10 +08:00
|
|
|
template <typename Family>
|
|
|
|
uint32_t HwHelperHw<Family>::getPitchAlignmentForImage(const HardwareInfo *hwInfo) {
|
|
|
|
return 4u;
|
|
|
|
}
|
|
|
|
|
2018-09-26 03:44:36 +08:00
|
|
|
template <typename Family>
|
2019-03-27 17:06:29 +08:00
|
|
|
const AubMemDump::LrcaHelper &HwHelperHw<Family>::getCsTraits(aub_stream::EngineType engineType) const {
|
2019-03-20 17:56:22 +08:00
|
|
|
return *AUBFamilyMapper<Family>::csTraits[engineType];
|
2018-09-26 03:44:36 +08:00
|
|
|
}
|
2018-10-03 01:10:29 +08:00
|
|
|
|
|
|
|
template <typename Family>
|
|
|
|
bool HwHelperHw<Family>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
|
|
|
return false;
|
|
|
|
}
|
2018-09-24 16:36:29 +08:00
|
|
|
|
2020-02-13 20:28:21 +08:00
|
|
|
template <typename Family>
|
|
|
|
bool HwHelperHw<Family>::isFenceAllocationRequired(const HardwareInfo &hwInfo) const {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-03-29 18:48:32 +08:00
|
|
|
template <typename GfxFamily>
|
2019-11-14 21:34:34 +08:00
|
|
|
inline bool HwHelperHw<GfxFamily>::checkResourceCompatibility(GraphicsAllocation &graphicsAllocation) {
|
|
|
|
return true;
|
2019-03-29 18:48:32 +08:00
|
|
|
}
|
|
|
|
|
2018-11-22 22:16:20 +08:00
|
|
|
template <typename Family>
|
2020-02-25 20:32:27 +08:00
|
|
|
void HwHelperHw<Family>::setRenderSurfaceStateForBuffer(const RootDeviceEnvironment &rootDeviceEnvironment,
|
2018-11-22 22:16:20 +08:00
|
|
|
void *surfaceStateBuffer,
|
|
|
|
size_t bufferSize,
|
|
|
|
uint64_t gpuVa,
|
|
|
|
size_t offset,
|
|
|
|
uint32_t pitch,
|
|
|
|
GraphicsAllocation *gfxAlloc,
|
2019-11-14 21:34:34 +08:00
|
|
|
bool isReadOnly,
|
2018-11-22 22:16:20 +08:00
|
|
|
uint32_t surfaceType,
|
|
|
|
bool forceNonAuxMode) {
|
|
|
|
using RENDER_SURFACE_STATE = typename Family::RENDER_SURFACE_STATE;
|
|
|
|
using SURFACE_FORMAT = typename RENDER_SURFACE_STATE::SURFACE_FORMAT;
|
|
|
|
using AUXILIARY_SURFACE_MODE = typename RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE;
|
|
|
|
|
2020-02-25 20:32:27 +08:00
|
|
|
auto gmmHelper = rootDeviceEnvironment.getGmmHelper();
|
2018-11-22 22:16:20 +08:00
|
|
|
auto surfaceState = reinterpret_cast<RENDER_SURFACE_STATE *>(surfaceStateBuffer);
|
2019-01-18 00:10:12 +08:00
|
|
|
*surfaceState = Family::cmdInitRenderSurfaceState;
|
2018-11-22 22:16:20 +08:00
|
|
|
auto surfaceSize = alignUp(bufferSize, 4);
|
|
|
|
|
|
|
|
SURFACE_STATE_BUFFER_LENGTH Length = {0};
|
|
|
|
Length.Length = static_cast<uint32_t>(surfaceSize - 1);
|
|
|
|
|
|
|
|
surfaceState->setWidth(Length.SurfaceState.Width + 1);
|
|
|
|
surfaceState->setHeight(Length.SurfaceState.Height + 1);
|
|
|
|
surfaceState->setDepth(Length.SurfaceState.Depth + 1);
|
|
|
|
if (pitch) {
|
|
|
|
surfaceState->setSurfacePitch(pitch);
|
|
|
|
}
|
|
|
|
|
|
|
|
// The graphics allocation for Host Ptr surface will be created in makeResident call and GPU address is expected to be the same as CPU address
|
|
|
|
auto bufferStateAddress = (gfxAlloc != nullptr) ? gfxAlloc->getGpuAddress() : gpuVa;
|
|
|
|
bufferStateAddress += offset;
|
|
|
|
|
|
|
|
auto bufferStateSize = (gfxAlloc != nullptr) ? gfxAlloc->getUnderlyingBufferSize() : bufferSize;
|
|
|
|
|
|
|
|
surfaceState->setSurfaceType(static_cast<typename RENDER_SURFACE_STATE::SURFACE_TYPE>(surfaceType));
|
|
|
|
|
|
|
|
surfaceState->setSurfaceFormat(SURFACE_FORMAT::SURFACE_FORMAT_RAW);
|
|
|
|
surfaceState->setSurfaceVerticalAlignment(RENDER_SURFACE_STATE::SURFACE_VERTICAL_ALIGNMENT_VALIGN_4);
|
|
|
|
surfaceState->setSurfaceHorizontalAlignment(RENDER_SURFACE_STATE::SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_4);
|
|
|
|
|
|
|
|
surfaceState->setTileMode(RENDER_SURFACE_STATE::TILE_MODE_LINEAR);
|
|
|
|
surfaceState->setVerticalLineStride(0);
|
|
|
|
surfaceState->setVerticalLineStrideOffset(0);
|
|
|
|
if ((isAligned<MemoryConstants::cacheLineSize>(bufferStateAddress) && isAligned<MemoryConstants::cacheLineSize>(bufferStateSize)) ||
|
2019-11-14 21:34:34 +08:00
|
|
|
isReadOnly) {
|
2018-11-22 22:16:20 +08:00
|
|
|
surfaceState->setMemoryObjectControlState(gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER));
|
|
|
|
} else {
|
|
|
|
surfaceState->setMemoryObjectControlState(gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED));
|
|
|
|
}
|
|
|
|
|
|
|
|
surfaceState->setSurfaceBaseAddress(bufferStateAddress);
|
|
|
|
|
2019-03-12 20:24:58 +08:00
|
|
|
Gmm *gmm = gfxAlloc ? gfxAlloc->getDefaultGmm() : nullptr;
|
2018-11-22 22:16:20 +08:00
|
|
|
if (gmm && gmm->isRenderCompressed && !forceNonAuxMode &&
|
|
|
|
GraphicsAllocation::AllocationType::BUFFER_COMPRESSED == gfxAlloc->getAllocationType()) {
|
|
|
|
// Its expected to not program pitch/qpitch/baseAddress for Aux surface in CCS scenarios
|
|
|
|
surfaceState->setCoherencyType(RENDER_SURFACE_STATE::COHERENCY_TYPE_GPU_COHERENT);
|
|
|
|
surfaceState->setAuxiliarySurfaceMode(AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_CCS_E);
|
|
|
|
} else {
|
|
|
|
surfaceState->setCoherencyType(RENDER_SURFACE_STATE::COHERENCY_TYPE_IA_COHERENT);
|
|
|
|
surfaceState->setAuxiliarySurfaceMode(AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_NONE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-12 17:56:27 +08:00
|
|
|
template <typename Family>
|
|
|
|
bool HwHelperHw<Family>::getEnableLocalMemory(const HardwareInfo &hwInfo) const {
|
|
|
|
if (DebugManager.flags.EnableLocalMemory.get() != -1) {
|
|
|
|
return DebugManager.flags.EnableLocalMemory.get();
|
|
|
|
} else if (DebugManager.flags.AUBDumpForceAllToLocalMemory.get()) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return OSInterface::osEnableLocalMemory && isLocalMemoryEnabled(hwInfo);
|
|
|
|
}
|
2019-01-10 20:57:40 +08:00
|
|
|
|
2019-10-31 17:19:52 +08:00
|
|
|
template <typename Family>
|
|
|
|
AuxTranslationMode HwHelperHw<Family>::getAuxTranslationMode() {
|
|
|
|
if (DebugManager.flags.ForceAuxTranslationMode.get() != -1) {
|
|
|
|
return static_cast<AuxTranslationMode>(DebugManager.flags.ForceAuxTranslationMode.get());
|
|
|
|
}
|
|
|
|
|
2019-11-22 04:32:16 +08:00
|
|
|
return HwHelperHw<Family>::defaultAuxTranslationMode;
|
2019-10-31 17:19:52 +08:00
|
|
|
}
|
|
|
|
|
2019-11-10 02:02:25 +08:00
|
|
|
template <typename Family>
|
2019-11-25 16:18:26 +08:00
|
|
|
bool HwHelperHw<Family>::isBlitAuxTranslationRequired(const HardwareInfo &hwInfo, const MultiDispatchInfo &multiDispatchInfo) {
|
2019-11-10 02:02:25 +08:00
|
|
|
return (HwHelperHw<Family>::getAuxTranslationMode() == AuxTranslationMode::Blit) &&
|
2019-11-25 16:18:26 +08:00
|
|
|
hwInfo.capabilityTable.blitterOperationsSupported &&
|
2019-11-10 02:02:25 +08:00
|
|
|
multiDispatchInfo.getMemObjsForAuxTranslation() &&
|
|
|
|
(multiDispatchInfo.getMemObjsForAuxTranslation()->size() > 0);
|
|
|
|
}
|
|
|
|
|
2019-03-21 00:08:05 +08:00
|
|
|
template <typename Family>
|
2020-02-17 19:45:24 +08:00
|
|
|
typename Family::PIPE_CONTROL *MemorySynchronizationCommands<Family>::obtainPipeControlAndProgramPostSyncOperation(
|
|
|
|
LinearStream &commandStream, POST_SYNC_OPERATION operation, uint64_t gpuAddress, uint64_t immediateData, bool dcFlush, const HardwareInfo &hwInfo) {
|
2020-04-09 00:33:03 +08:00
|
|
|
using PIPE_CONTROL = typename Family::PIPE_CONTROL;
|
2020-02-08 05:48:09 +08:00
|
|
|
addPipeControlWA(commandStream, gpuAddress, hwInfo);
|
2019-07-11 20:35:40 +08:00
|
|
|
|
2020-04-09 00:33:03 +08:00
|
|
|
PIPE_CONTROL *pipeControl = commandStream.getSpaceForCmd<PIPE_CONTROL>();
|
|
|
|
PIPE_CONTROL cmd = Family::cmdInitPipeControl;
|
|
|
|
setPipeControl(cmd, dcFlush);
|
|
|
|
cmd.setPostSyncOperation(operation);
|
|
|
|
cmd.setAddress(static_cast<uint32_t>(gpuAddress & 0x0000FFFFFFFFULL));
|
|
|
|
cmd.setAddressHigh(static_cast<uint32_t>(gpuAddress >> 32));
|
|
|
|
cmd.setDcFlushEnable(dcFlush);
|
2019-03-21 00:08:05 +08:00
|
|
|
if (operation == POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA) {
|
2020-04-09 00:33:03 +08:00
|
|
|
cmd.setImmediateData(immediateData);
|
2019-03-21 00:08:05 +08:00
|
|
|
}
|
|
|
|
|
2020-04-09 00:33:03 +08:00
|
|
|
setExtraPipeControlProperties(cmd, hwInfo);
|
|
|
|
*pipeControl = cmd;
|
2020-02-08 05:48:09 +08:00
|
|
|
|
2020-02-17 19:45:24 +08:00
|
|
|
MemorySynchronizationCommands<Family>::addAdditionalSynchronization(commandStream, gpuAddress, hwInfo);
|
2020-02-12 01:25:21 +08:00
|
|
|
|
2020-02-08 05:48:09 +08:00
|
|
|
return pipeControl;
|
2020-01-31 15:16:58 +08:00
|
|
|
}
|
|
|
|
|
2019-03-28 21:15:51 +08:00
|
|
|
template <typename GfxFamily>
|
2020-04-09 00:33:03 +08:00
|
|
|
void MemorySynchronizationCommands<GfxFamily>::setPipeControl(typename GfxFamily::PIPE_CONTROL &pipeControl, bool dcFlush) {
|
|
|
|
pipeControl.setCommandStreamerStallEnable(true);
|
|
|
|
pipeControl.setDcFlushEnable(dcFlush);
|
2019-03-28 21:15:51 +08:00
|
|
|
|
|
|
|
if (DebugManager.flags.FlushAllCaches.get()) {
|
2020-04-09 00:33:03 +08:00
|
|
|
pipeControl.setDcFlushEnable(true);
|
|
|
|
pipeControl.setRenderTargetCacheFlushEnable(true);
|
|
|
|
pipeControl.setInstructionCacheInvalidateEnable(true);
|
|
|
|
pipeControl.setTextureCacheInvalidationEnable(true);
|
|
|
|
pipeControl.setPipeControlFlushEnable(true);
|
|
|
|
pipeControl.setVfCacheInvalidationEnable(true);
|
|
|
|
pipeControl.setConstantCacheInvalidationEnable(true);
|
|
|
|
pipeControl.setStateCacheInvalidationEnable(true);
|
2019-03-28 21:15:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-17 19:45:24 +08:00
|
|
|
typename GfxFamily::PIPE_CONTROL *MemorySynchronizationCommands<GfxFamily>::addPipeControl(LinearStream &commandStream, bool dcFlush) {
|
2020-04-09 00:33:03 +08:00
|
|
|
using PIPE_CONTROL = typename GfxFamily::PIPE_CONTROL;
|
|
|
|
PIPE_CONTROL cmd = GfxFamily::cmdInitPipeControl;
|
|
|
|
MemorySynchronizationCommands<GfxFamily>::setPipeControl(cmd, dcFlush);
|
|
|
|
auto pipeControl = commandStream.getSpaceForCmd<PIPE_CONTROL>();
|
|
|
|
*pipeControl = cmd;
|
|
|
|
|
|
|
|
return pipeControl;
|
2019-07-11 20:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-17 19:45:24 +08:00
|
|
|
size_t MemorySynchronizationCommands<GfxFamily>::getSizeForSinglePipeControl() {
|
2019-07-11 20:35:40 +08:00
|
|
|
return sizeof(typename GfxFamily::PIPE_CONTROL);
|
2019-03-28 21:15:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-17 19:45:24 +08:00
|
|
|
size_t MemorySynchronizationCommands<GfxFamily>::getSizeForPipeControlWithPostSyncOperation(const HardwareInfo &hwInfo) {
|
2019-08-14 15:33:51 +08:00
|
|
|
const auto pipeControlCount = HardwareCommandsHelper<GfxFamily>::isPipeControlWArequired(hwInfo) ? 2u : 1u;
|
2020-02-08 05:48:09 +08:00
|
|
|
return pipeControlCount * getSizeForSinglePipeControl() + getSizeForAdditonalSynchronization(hwInfo);
|
2019-03-28 21:15:51 +08:00
|
|
|
}
|
|
|
|
|
2020-03-11 18:27:19 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
void MemorySynchronizationCommands<GfxFamily>::addAdditionalSynchronization(LinearStream &commandStream, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
inline size_t MemorySynchronizationCommands<GfxFamily>::getSizeForSingleSynchronization(const HardwareInfo &hwInfo) {
|
|
|
|
return 0u;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
inline size_t MemorySynchronizationCommands<GfxFamily>::getSizeForAdditonalSynchronization(const HardwareInfo &hwInfo) {
|
|
|
|
return 0u;
|
|
|
|
}
|
|
|
|
|
2019-05-20 17:19:27 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
uint32_t HwHelperHw<GfxFamily>::getMetricsLibraryGenId() const {
|
|
|
|
return static_cast<uint32_t>(MetricsLibraryApi::ClientGen::Gen9);
|
|
|
|
}
|
2019-09-05 14:24:22 +08:00
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
inline bool HwHelperHw<GfxFamily>::requiresAuxResolves() const {
|
|
|
|
return true;
|
|
|
|
}
|
2019-09-06 16:25:14 +08:00
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2019-11-14 21:34:34 +08:00
|
|
|
bool HwHelperHw<GfxFamily>::tilingAllowed(bool isSharedContext, bool isImage1d, bool forceLinearStorage) {
|
2019-09-06 16:25:14 +08:00
|
|
|
if (DebugManager.flags.ForceLinearImages.get() || forceLinearStorage || isSharedContext) {
|
|
|
|
return false;
|
|
|
|
}
|
2019-11-14 21:34:34 +08:00
|
|
|
return !isImage1d;
|
2019-09-06 16:25:14 +08:00
|
|
|
}
|
2019-11-08 01:49:46 +08:00
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
uint32_t HwHelperHw<GfxFamily>::alignSlmSize(uint32_t slmSize) {
|
|
|
|
return HardwareCommandsHelper<GfxFamily>::alignSlmSize(slmSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
uint32_t HwHelperHw<GfxFamily>::getBarriersCountFromHasBarriers(uint32_t hasBarriers) {
|
|
|
|
return hasBarriers;
|
|
|
|
}
|
|
|
|
|
2019-12-13 23:31:09 +08:00
|
|
|
template <typename GfxFamily>
|
2020-03-19 22:15:51 +08:00
|
|
|
inline bool HwHelperHw<GfxFamily>::isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) const {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
bool HwHelperHw<GfxFamily>::is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) const {
|
2019-12-13 23:31:09 +08:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
bool HwHelperHw<GfxFamily>::isForceDefaultRCSEngineWARequired(const HardwareInfo &hwInfo) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-12-19 21:26:29 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
bool HwHelperHw<GfxFamily>::isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2020-01-28 01:02:27 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
inline uint32_t HwHelperHw<GfxFamily>::getMinimalSIMDSize() {
|
|
|
|
return 8u;
|
|
|
|
}
|
|
|
|
|
2020-01-18 03:45:48 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
uint32_t HwHelperHw<GfxFamily>::getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const {
|
|
|
|
return HwHelper::getMaxThreadsForWorkgroup(hwInfo, maxNumEUsPerSubSlice);
|
|
|
|
}
|
2020-02-10 18:02:21 +08:00
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-03-13 20:14:28 +08:00
|
|
|
inline bool HwHelperHw<GfxFamily>::isFusedEuDispatchEnabled(const HardwareInfo &hwInfo) const {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-17 19:45:24 +08:00
|
|
|
size_t MemorySynchronizationCommands<GfxFamily>::getSizeForFullCacheFlush() {
|
2020-02-10 18:02:21 +08:00
|
|
|
return sizeof(typename GfxFamily::PIPE_CONTROL);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-17 19:45:24 +08:00
|
|
|
typename GfxFamily::PIPE_CONTROL *MemorySynchronizationCommands<GfxFamily>::addFullCacheFlush(LinearStream &commandStream) {
|
2020-04-09 00:33:03 +08:00
|
|
|
using PIPE_CONTROL = typename GfxFamily::PIPE_CONTROL;
|
|
|
|
|
|
|
|
PIPE_CONTROL *pipeControl = commandStream.getSpaceForCmd<PIPE_CONTROL>();
|
|
|
|
PIPE_CONTROL cmd = GfxFamily::cmdInitPipeControl;
|
|
|
|
MemorySynchronizationCommands<GfxFamily>::setPipeControl(cmd, true);
|
2020-02-10 18:02:21 +08:00
|
|
|
|
2020-04-09 00:33:03 +08:00
|
|
|
cmd.setRenderTargetCacheFlushEnable(true);
|
|
|
|
cmd.setInstructionCacheInvalidateEnable(true);
|
|
|
|
cmd.setTextureCacheInvalidationEnable(true);
|
|
|
|
cmd.setPipeControlFlushEnable(true);
|
|
|
|
cmd.setConstantCacheInvalidationEnable(true);
|
|
|
|
cmd.setStateCacheInvalidationEnable(true);
|
2020-02-10 18:02:21 +08:00
|
|
|
|
2020-04-09 00:33:03 +08:00
|
|
|
MemorySynchronizationCommands<GfxFamily>::setExtraCacheFlushFields(cmd);
|
|
|
|
*pipeControl = cmd;
|
2020-02-10 18:02:21 +08:00
|
|
|
|
|
|
|
return pipeControl;
|
|
|
|
}
|
|
|
|
|
2020-02-20 16:20:33 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
const StackVec<size_t, 3> HwHelperHw<GfxFamily>::getDeviceSubGroupSizes() const {
|
|
|
|
return {8, 16, 32};
|
|
|
|
}
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|