2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2020-01-09 16:10:48 +01:00
|
|
|
* Copyright (C) 2019-2020 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2020-02-25 13:32:27 +01:00
|
|
|
#include "shared/source/execution_environment/root_device_environment.h"
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/gmm_helper/gmm.h"
|
|
|
|
|
#include "shared/source/gmm_helper/gmm_helper.h"
|
|
|
|
|
#include "shared/source/helpers/aligned_memory.h"
|
|
|
|
|
#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/memory_manager/memory_constants.h"
|
|
|
|
|
#include "shared/source/os_interface/os_interface.h"
|
2020-02-24 10:22:30 +01:00
|
|
|
|
2020-02-22 22:50:57 +01: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 00:45:38 +01:00
|
|
|
|
2020-01-27 13:59:19 +01:00
|
|
|
#include "instrumentation.h"
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2018-11-22 15:16:20 +01:00
|
|
|
|
2019-08-27 10:15:03 +02:00
|
|
|
template <typename Family>
|
|
|
|
|
const aub_stream::EngineType HwHelperHw<Family>::lowPriorityEngineType = aub_stream::EngineType::ENGINE_RCS;
|
|
|
|
|
|
2019-11-21 21:32:16 +01:00
|
|
|
template <typename Family>
|
|
|
|
|
const AuxTranslationMode HwHelperHw<Family>::defaultAuxTranslationMode = AuxTranslationMode::Builtin;
|
|
|
|
|
|
2019-03-19 12:57:47 +01:00
|
|
|
template <typename Family>
|
2019-10-09 17:32:35 +02:00
|
|
|
bool HwHelperHw<Family>::obtainRenderBufferCompressionPreference(const HardwareInfo &hwInfo, const size_t size) const {
|
2019-04-17 12:56:54 +02:00
|
|
|
return size > KB;
|
2019-03-19 12:57:47 +01:00
|
|
|
}
|
|
|
|
|
|
2018-02-19 09:50:17 +01:00
|
|
|
template <typename Family>
|
2018-08-23 17:42:35 +02:00
|
|
|
void HwHelperHw<Family>::setupHardwareCapabilities(HardwareCapabilities *caps, const HardwareInfo &hwInfo) {
|
2018-02-19 09:50:17 +01:00
|
|
|
caps->image3DMaxHeight = 16384;
|
|
|
|
|
caps->image3DMaxWidth = 16384;
|
2018-06-08 16:42:29 +02: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 13:22:11 +02:00
|
|
|
caps->isStatelesToStatefullWithOffsetSupported = true;
|
2018-02-19 09:50:17 +01:00
|
|
|
}
|
|
|
|
|
|
2019-08-28 20:46:37 -07:00
|
|
|
template <typename Family>
|
|
|
|
|
bool HwHelperHw<Family>::isL3Configurable(const HardwareInfo &hwInfo) {
|
|
|
|
|
return PreambleHelper<Family>::isL3Configurable(hwInfo);
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-06 14:25:22 +02:00
|
|
|
template <typename Family>
|
|
|
|
|
SipKernelType HwHelperHw<Family>::getSipKernelType(bool debuggingActive) {
|
|
|
|
|
if (!debuggingActive) {
|
|
|
|
|
return SipKernelType::Csr;
|
|
|
|
|
}
|
|
|
|
|
return SipKernelType::DbgCsr;
|
|
|
|
|
}
|
2018-07-10 13:22:11 +02:00
|
|
|
|
2018-09-06 16:41:50 +02:00
|
|
|
template <typename Family>
|
|
|
|
|
size_t HwHelperHw<Family>::getMaxBarrierRegisterPerSlice() const {
|
|
|
|
|
return 32;
|
|
|
|
|
}
|
2018-09-25 12:44:36 -07:00
|
|
|
|
2019-08-23 00:23:10 +02:00
|
|
|
template <typename Family>
|
|
|
|
|
uint32_t HwHelperHw<Family>::getPitchAlignmentForImage(const HardwareInfo *hwInfo) {
|
|
|
|
|
return 4u;
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-25 12:44:36 -07:00
|
|
|
template <typename Family>
|
2019-03-27 10:06:29 +01:00
|
|
|
const AubMemDump::LrcaHelper &HwHelperHw<Family>::getCsTraits(aub_stream::EngineType engineType) const {
|
2019-03-20 10:56:22 +01:00
|
|
|
return *AUBFamilyMapper<Family>::csTraits[engineType];
|
2018-09-25 12:44:36 -07:00
|
|
|
}
|
2018-10-02 10:10:29 -07:00
|
|
|
|
|
|
|
|
template <typename Family>
|
|
|
|
|
bool HwHelperHw<Family>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2018-09-24 10:36:29 +02:00
|
|
|
|
2020-02-13 13:28:21 +01:00
|
|
|
template <typename Family>
|
|
|
|
|
bool HwHelperHw<Family>::isFenceAllocationRequired(const HardwareInfo &hwInfo) const {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-29 11:48:32 +01:00
|
|
|
template <typename GfxFamily>
|
2019-11-14 14:34:34 +01:00
|
|
|
inline bool HwHelperHw<GfxFamily>::checkResourceCompatibility(GraphicsAllocation &graphicsAllocation) {
|
|
|
|
|
return true;
|
2019-03-29 11:48:32 +01:00
|
|
|
}
|
|
|
|
|
|
2018-11-22 15:16:20 +01:00
|
|
|
template <typename Family>
|
2020-02-25 13:32:27 +01:00
|
|
|
void HwHelperHw<Family>::setRenderSurfaceStateForBuffer(const RootDeviceEnvironment &rootDeviceEnvironment,
|
2018-11-22 15:16:20 +01:00
|
|
|
void *surfaceStateBuffer,
|
|
|
|
|
size_t bufferSize,
|
|
|
|
|
uint64_t gpuVa,
|
|
|
|
|
size_t offset,
|
|
|
|
|
uint32_t pitch,
|
|
|
|
|
GraphicsAllocation *gfxAlloc,
|
2019-11-14 14:34:34 +01:00
|
|
|
bool isReadOnly,
|
2018-11-22 15:16:20 +01: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 13:32:27 +01:00
|
|
|
auto gmmHelper = rootDeviceEnvironment.getGmmHelper();
|
2018-11-22 15:16:20 +01:00
|
|
|
auto surfaceState = reinterpret_cast<RENDER_SURFACE_STATE *>(surfaceStateBuffer);
|
2019-01-17 17:10:12 +01:00
|
|
|
*surfaceState = Family::cmdInitRenderSurfaceState;
|
2018-11-22 15:16:20 +01: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 14:34:34 +01:00
|
|
|
isReadOnly) {
|
2018-11-22 15:16:20 +01: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 13:24:58 +01:00
|
|
|
Gmm *gmm = gfxAlloc ? gfxAlloc->getDefaultGmm() : nullptr;
|
2018-11-22 15:16:20 +01: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 10:56:27 +01: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 13:57:40 +01:00
|
|
|
|
2019-10-31 10:19:52 +01:00
|
|
|
template <typename Family>
|
|
|
|
|
AuxTranslationMode HwHelperHw<Family>::getAuxTranslationMode() {
|
|
|
|
|
if (DebugManager.flags.ForceAuxTranslationMode.get() != -1) {
|
|
|
|
|
return static_cast<AuxTranslationMode>(DebugManager.flags.ForceAuxTranslationMode.get());
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-21 21:32:16 +01:00
|
|
|
return HwHelperHw<Family>::defaultAuxTranslationMode;
|
2019-10-31 10:19:52 +01:00
|
|
|
}
|
|
|
|
|
|
2019-11-09 19:02:25 +01:00
|
|
|
template <typename Family>
|
2019-11-25 09:18:26 +01:00
|
|
|
bool HwHelperHw<Family>::isBlitAuxTranslationRequired(const HardwareInfo &hwInfo, const MultiDispatchInfo &multiDispatchInfo) {
|
2019-11-09 19:02:25 +01:00
|
|
|
return (HwHelperHw<Family>::getAuxTranslationMode() == AuxTranslationMode::Blit) &&
|
2019-11-25 09:18:26 +01:00
|
|
|
hwInfo.capabilityTable.blitterOperationsSupported &&
|
2019-11-09 19:02:25 +01:00
|
|
|
multiDispatchInfo.getMemObjsForAuxTranslation() &&
|
|
|
|
|
(multiDispatchInfo.getMemObjsForAuxTranslation()->size() > 0);
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-20 17:08:05 +01:00
|
|
|
template <typename Family>
|
2020-02-17 12:45:24 +01: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-02-07 22:48:09 +01:00
|
|
|
addPipeControlWA(commandStream, gpuAddress, hwInfo);
|
2019-07-11 14:35:40 +02:00
|
|
|
|
|
|
|
|
auto pipeControl = obtainPipeControl(commandStream, dcFlush);
|
2019-03-20 17:08:05 +01:00
|
|
|
pipeControl->setPostSyncOperation(operation);
|
|
|
|
|
pipeControl->setAddress(static_cast<uint32_t>(gpuAddress & 0x0000FFFFFFFFULL));
|
|
|
|
|
pipeControl->setAddressHigh(static_cast<uint32_t>(gpuAddress >> 32));
|
2019-07-11 10:43:11 +02:00
|
|
|
pipeControl->setDcFlushEnable(dcFlush);
|
2019-03-20 17:08:05 +01:00
|
|
|
if (operation == POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA) {
|
|
|
|
|
pipeControl->setImmediateData(immediateData);
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-07 22:48:09 +01:00
|
|
|
setExtraPipeControlProperties(*pipeControl, hwInfo);
|
|
|
|
|
|
2020-02-17 12:45:24 +01:00
|
|
|
MemorySynchronizationCommands<Family>::addAdditionalSynchronization(commandStream, gpuAddress, hwInfo);
|
2020-02-11 18:25:21 +01:00
|
|
|
|
2020-02-07 22:48:09 +01:00
|
|
|
return pipeControl;
|
2020-01-31 08:16:58 +01:00
|
|
|
}
|
|
|
|
|
|
2019-03-28 14:15:51 +01:00
|
|
|
template <typename GfxFamily>
|
2020-02-17 12:45:24 +01:00
|
|
|
typename GfxFamily::PIPE_CONTROL *MemorySynchronizationCommands<GfxFamily>::obtainPipeControl(LinearStream &commandStream, bool dcFlush) {
|
2019-03-28 14:15:51 +01:00
|
|
|
auto pCmd = reinterpret_cast<PIPE_CONTROL *>(commandStream.getSpace(sizeof(PIPE_CONTROL)));
|
|
|
|
|
*pCmd = GfxFamily::cmdInitPipeControl;
|
|
|
|
|
pCmd->setCommandStreamerStallEnable(true);
|
|
|
|
|
pCmd->setDcFlushEnable(dcFlush);
|
|
|
|
|
|
|
|
|
|
if (DebugManager.flags.FlushAllCaches.get()) {
|
|
|
|
|
pCmd->setDcFlushEnable(true);
|
|
|
|
|
pCmd->setRenderTargetCacheFlushEnable(true);
|
|
|
|
|
pCmd->setInstructionCacheInvalidateEnable(true);
|
|
|
|
|
pCmd->setTextureCacheInvalidationEnable(true);
|
|
|
|
|
pCmd->setPipeControlFlushEnable(true);
|
|
|
|
|
pCmd->setVfCacheInvalidationEnable(true);
|
|
|
|
|
pCmd->setConstantCacheInvalidationEnable(true);
|
|
|
|
|
pCmd->setStateCacheInvalidationEnable(true);
|
|
|
|
|
}
|
|
|
|
|
return pCmd;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-17 12:45:24 +01:00
|
|
|
typename GfxFamily::PIPE_CONTROL *MemorySynchronizationCommands<GfxFamily>::addPipeControl(LinearStream &commandStream, bool dcFlush) {
|
|
|
|
|
return MemorySynchronizationCommands<GfxFamily>::obtainPipeControl(commandStream, dcFlush);
|
2019-07-11 14:35:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-17 12:45:24 +01:00
|
|
|
size_t MemorySynchronizationCommands<GfxFamily>::getSizeForSinglePipeControl() {
|
2019-07-11 14:35:40 +02:00
|
|
|
return sizeof(typename GfxFamily::PIPE_CONTROL);
|
2019-03-28 14:15:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-17 12:45:24 +01:00
|
|
|
size_t MemorySynchronizationCommands<GfxFamily>::getSizeForPipeControlWithPostSyncOperation(const HardwareInfo &hwInfo) {
|
2019-08-14 09:33:51 +02:00
|
|
|
const auto pipeControlCount = HardwareCommandsHelper<GfxFamily>::isPipeControlWArequired(hwInfo) ? 2u : 1u;
|
2020-02-07 22:48:09 +01:00
|
|
|
return pipeControlCount * getSizeForSinglePipeControl() + getSizeForAdditonalSynchronization(hwInfo);
|
2019-03-28 14:15:51 +01:00
|
|
|
}
|
|
|
|
|
|
2020-03-11 11:27:19 +01: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 11:19:27 +02:00
|
|
|
template <typename GfxFamily>
|
|
|
|
|
uint32_t HwHelperHw<GfxFamily>::getMetricsLibraryGenId() const {
|
|
|
|
|
return static_cast<uint32_t>(MetricsLibraryApi::ClientGen::Gen9);
|
|
|
|
|
}
|
2019-09-05 08:24:22 +02:00
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
|
inline bool HwHelperHw<GfxFamily>::requiresAuxResolves() const {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2019-09-06 10:25:14 +02:00
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2019-11-14 14:34:34 +01:00
|
|
|
bool HwHelperHw<GfxFamily>::tilingAllowed(bool isSharedContext, bool isImage1d, bool forceLinearStorage) {
|
2019-09-06 10:25:14 +02:00
|
|
|
if (DebugManager.flags.ForceLinearImages.get() || forceLinearStorage || isSharedContext) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2019-11-14 14:34:34 +01:00
|
|
|
return !isImage1d;
|
2019-09-06 10:25:14 +02:00
|
|
|
}
|
2019-11-07 18:49:46 +01: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 16:31:09 +01:00
|
|
|
template <typename GfxFamily>
|
2020-01-23 15:52:49 +01:00
|
|
|
bool HwHelperHw<GfxFamily>::isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) const {
|
2019-12-13 16:31:09 +01:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
|
bool HwHelperHw<GfxFamily>::isForceDefaultRCSEngineWARequired(const HardwareInfo &hwInfo) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-19 14:26:29 +01:00
|
|
|
template <typename GfxFamily>
|
|
|
|
|
bool HwHelperHw<GfxFamily>::isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-27 18:02:27 +01:00
|
|
|
template <typename GfxFamily>
|
|
|
|
|
inline uint32_t HwHelperHw<GfxFamily>::getMinimalSIMDSize() {
|
|
|
|
|
return 8u;
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-17 20:45:48 +01:00
|
|
|
template <typename GfxFamily>
|
|
|
|
|
uint32_t HwHelperHw<GfxFamily>::getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const {
|
|
|
|
|
return HwHelper::getMaxThreadsForWorkgroup(hwInfo, maxNumEUsPerSubSlice);
|
|
|
|
|
}
|
2020-02-10 11:02:21 +01:00
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-17 12:45:24 +01:00
|
|
|
size_t MemorySynchronizationCommands<GfxFamily>::getSizeForFullCacheFlush() {
|
2020-02-10 11:02:21 +01:00
|
|
|
return sizeof(typename GfxFamily::PIPE_CONTROL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
2020-02-17 12:45:24 +01:00
|
|
|
typename GfxFamily::PIPE_CONTROL *MemorySynchronizationCommands<GfxFamily>::addFullCacheFlush(LinearStream &commandStream) {
|
|
|
|
|
auto pipeControl = MemorySynchronizationCommands<GfxFamily>::obtainPipeControl(commandStream, true);
|
2020-02-10 11:02:21 +01:00
|
|
|
|
|
|
|
|
pipeControl->setRenderTargetCacheFlushEnable(true);
|
|
|
|
|
pipeControl->setInstructionCacheInvalidateEnable(true);
|
|
|
|
|
pipeControl->setTextureCacheInvalidationEnable(true);
|
|
|
|
|
pipeControl->setPipeControlFlushEnable(true);
|
|
|
|
|
pipeControl->setConstantCacheInvalidationEnable(true);
|
|
|
|
|
pipeControl->setStateCacheInvalidationEnable(true);
|
|
|
|
|
|
2020-02-17 12:45:24 +01:00
|
|
|
MemorySynchronizationCommands<GfxFamily>::setExtraCacheFlushFields(pipeControl);
|
2020-02-10 11:02:21 +01:00
|
|
|
|
|
|
|
|
return pipeControl;
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-20 09:20:33 +01:00
|
|
|
template <typename GfxFamily>
|
|
|
|
|
const StackVec<size_t, 3> HwHelperHw<GfxFamily>::getDeviceSubGroupSizes() const {
|
|
|
|
|
return {8, 16, 32};
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|