mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 02:18:05 +08:00
Add DG1 support to OpenCL and Level Zero (1/n)
Related-To: NEO-4744 Change-Id: I7e574d7cf003ed01467c72e797187c0717bb76f2 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
2500357ad5
commit
3029db07c3
69
shared/source/gen12lp/helpers_gen12lp_dg1.cpp
Normal file
69
shared/source/gen12lp/helpers_gen12lp_dg1.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/gen12lp/helpers_gen12lp.h"
|
||||
|
||||
#include "opencl/source/aub_mem_dump/page_table_entry_bits.h"
|
||||
#include "opencl/source/command_stream/command_stream_receiver_simulated_common_hw.h"
|
||||
|
||||
namespace NEO {
|
||||
namespace Gen12LPHelpers {
|
||||
|
||||
bool pipeControlWaRequired(PRODUCT_FAMILY productFamily) {
|
||||
return (productFamily == IGFX_TIGERLAKE_LP) || (productFamily == IGFX_DG1);
|
||||
}
|
||||
|
||||
bool imagePitchAlignmentWaRequired(PRODUCT_FAMILY productFamily) {
|
||||
return (productFamily == IGFX_TIGERLAKE_LP) || (productFamily == IGFX_DG1);
|
||||
}
|
||||
|
||||
void adjustCoherencyFlag(PRODUCT_FAMILY productFamily, bool &coherencyFlag) {
|
||||
if (productFamily == IGFX_DG1) {
|
||||
coherencyFlag = false;
|
||||
}
|
||||
}
|
||||
|
||||
bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) {
|
||||
return hwInfo.featureTable.ftrLocalMemory;
|
||||
}
|
||||
|
||||
void initAdditionalGlobalMMIO(const CommandStreamReceiver &commandStreamReceiver, AubMemDump::AubStream &stream) {}
|
||||
|
||||
uint64_t getPPGTTAdditionalBits(GraphicsAllocation *graphicsAllocation) {
|
||||
if (graphicsAllocation && graphicsAllocation->getMemoryPool() == MemoryPool::LocalMemory) {
|
||||
return BIT(PageTableEntry::localMemoryBit);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void adjustAubGTTData(const CommandStreamReceiver &commandStreamReceiver, AubGTTData &data) {
|
||||
data.localMemory = commandStreamReceiver.isLocalMemoryEnabled();
|
||||
}
|
||||
|
||||
void setAdditionalPipelineSelectFields(void *pipelineSelectCmd,
|
||||
const PipelineSelectArgs &pipelineSelectArgs,
|
||||
const HardwareInfo &hwInfo) {}
|
||||
|
||||
bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) {
|
||||
return (hwInfo.platform.usRevId == REVISION_A0);
|
||||
}
|
||||
|
||||
bool isForceDefaultRCSEngineWARequired(const HardwareInfo &hwInfo) {
|
||||
return ((hwInfo.platform.eProductFamily == IGFX_TIGERLAKE_LP) || (hwInfo.platform.eProductFamily == IGFX_DG1) & (hwInfo.platform.usRevId == REVISION_A0));
|
||||
}
|
||||
|
||||
bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) {
|
||||
return ((hwInfo.platform.eProductFamily == IGFX_TIGERLAKE_LP) & (hwInfo.platform.usRevId == REVISION_A0));
|
||||
}
|
||||
|
||||
bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) {
|
||||
return (hwInfo.platform.eProductFamily == IGFX_TIGERLAKE_LP || hwInfo.platform.eProductFamily == IGFX_DG1);
|
||||
}
|
||||
|
||||
} // namespace Gen12LPHelpers
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user