2019-09-18 19:32:33 +02:00
|
|
|
/*
|
2024-03-07 15:03:13 +00:00
|
|
|
* Copyright (C) 2019-2024 Intel Corporation
|
2019-09-18 19:32:33 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/commands/bxml_generator_glue.h"
|
|
|
|
|
#include "shared/source/helpers/debug_helpers.h"
|
2019-09-18 19:32:33 +02:00
|
|
|
|
2022-11-28 19:00:39 +00:00
|
|
|
#include <cstring>
|
2023-02-08 10:14:15 +00:00
|
|
|
#include <igfxfmid.h>
|
2023-02-07 12:53:53 +00:00
|
|
|
#include <type_traits>
|
2022-11-28 19:00:39 +00:00
|
|
|
|
2019-09-18 19:32:33 +02:00
|
|
|
template <class T>
|
|
|
|
|
struct CmdParse;
|
|
|
|
|
|
2022-06-21 10:28:33 +00:00
|
|
|
namespace NEO {
|
2022-07-25 15:30:11 +00:00
|
|
|
struct Gen12Lp {
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/generated/gen12lp/hw_cmds_generated_gen12lp.inl"
|
2021-05-24 11:44:03 +00:00
|
|
|
|
2022-01-13 23:57:00 +00:00
|
|
|
static constexpr bool supportsSampler = true;
|
2022-01-17 12:54:53 +00:00
|
|
|
static constexpr bool isUsingGenericMediaStateClear = true;
|
2021-05-24 11:44:03 +00:00
|
|
|
static constexpr uint32_t stateComputeModeForceNonCoherentMask = (0b11u << 3);
|
2022-03-30 14:11:26 +00:00
|
|
|
static constexpr bool isUsingMiMemFence = false;
|
2022-11-08 11:05:43 +00:00
|
|
|
static constexpr bool isUsingMiSetPredicate = false;
|
2023-02-27 16:21:40 +00:00
|
|
|
static constexpr bool isUsingMiMathMocs = false;
|
2023-09-14 07:35:58 +00:00
|
|
|
static constexpr uint32_t bcsEngineCount = 1u;
|
2023-09-25 07:45:36 +00:00
|
|
|
static constexpr uint32_t timestampPacketCount = 1u;
|
2020-04-27 15:40:12 +02:00
|
|
|
|
2022-08-23 04:02:33 +00:00
|
|
|
struct FrontEndStateSupport {
|
|
|
|
|
static constexpr bool scratchSize = true;
|
|
|
|
|
static constexpr bool privateScratchSize = false;
|
2022-08-29 20:06:04 +00:00
|
|
|
static constexpr bool computeDispatchAllWalker = false;
|
|
|
|
|
static constexpr bool disableEuFusion = true;
|
|
|
|
|
static constexpr bool disableOverdispatch = false;
|
|
|
|
|
static constexpr bool singleSliceDispatchCcsMode = false;
|
2022-08-23 04:02:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct StateComputeModeStateSupport {
|
|
|
|
|
static constexpr bool threadArbitrationPolicy = false;
|
|
|
|
|
static constexpr bool coherencyRequired = true;
|
|
|
|
|
static constexpr bool largeGrfMode = false;
|
|
|
|
|
static constexpr bool zPassAsyncComputeThreadLimit = false;
|
|
|
|
|
static constexpr bool pixelAsyncComputeThreadLimit = false;
|
|
|
|
|
static constexpr bool devicePreemptionMode = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct StateBaseAddressStateSupport {
|
2022-11-22 17:17:04 +00:00
|
|
|
static constexpr bool bindingTablePoolBaseAddress = false;
|
2022-08-23 04:02:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct PipelineSelectStateSupport {
|
2022-09-12 19:11:56 +00:00
|
|
|
static constexpr bool mediaSamplerDopClockGate = true;
|
|
|
|
|
static constexpr bool systolicMode = false;
|
2022-08-23 04:02:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct PreemptionDebugSupport {
|
|
|
|
|
static constexpr bool preemptionMode = true;
|
|
|
|
|
static constexpr bool stateSip = true;
|
|
|
|
|
static constexpr bool csrSurface = true;
|
|
|
|
|
};
|
|
|
|
|
|
2020-04-27 15:40:12 +02:00
|
|
|
struct DataPortBindlessSurfaceExtendedMessageDescriptor {
|
|
|
|
|
union {
|
|
|
|
|
struct {
|
|
|
|
|
uint32_t bindlessSurfaceOffset : 20;
|
|
|
|
|
uint32_t reserved : 1;
|
|
|
|
|
uint32_t executionUnitExtendedMessageDescriptorDefinition : 11;
|
|
|
|
|
};
|
|
|
|
|
uint32_t packed;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
DataPortBindlessSurfaceExtendedMessageDescriptor() {
|
|
|
|
|
packed = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void setBindlessSurfaceOffset(uint32_t offsetInBindlessSurfaceHeapInBytes) {
|
|
|
|
|
bindlessSurfaceOffset = offsetInBindlessSurfaceHeapInBytes >> 6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint32_t getBindlessSurfaceOffsetToPatch() {
|
|
|
|
|
return bindlessSurfaceOffset << 12;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2024-03-14 10:15:48 +00:00
|
|
|
static constexpr bool isDcFlushAllowed = true;
|
|
|
|
|
|
2020-04-27 15:40:12 +02:00
|
|
|
static_assert(sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor) == sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor::packed), "");
|
2019-09-18 19:32:33 +02:00
|
|
|
};
|
2022-07-25 15:30:11 +00:00
|
|
|
struct Gen12LpFamily : public Gen12Lp {
|
2023-12-21 11:57:35 +00:00
|
|
|
using Parse = CmdParse<Gen12LpFamily>;
|
2022-07-25 15:30:11 +00:00
|
|
|
using GfxFamily = Gen12LpFamily;
|
2023-12-04 12:20:54 +00:00
|
|
|
using DefaultWalkerType = GPGPU_WALKER;
|
2023-12-05 12:44:46 +00:00
|
|
|
using FrontEndStateCommand = MEDIA_VFE_STATE;
|
2020-05-04 16:34:13 +02:00
|
|
|
using XY_COPY_BLT = typename GfxFamily::XY_BLOCK_COPY_BLT;
|
2020-06-17 08:30:10 +02:00
|
|
|
using XY_COLOR_BLT = typename GfxFamily::XY_FAST_COLOR_BLT;
|
2019-09-18 19:32:33 +02:00
|
|
|
using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM;
|
2021-03-29 14:46:41 +00:00
|
|
|
using TimestampPacketType = uint32_t;
|
2019-09-18 19:32:33 +02:00
|
|
|
static const GPGPU_WALKER cmdInitGpgpuWalker;
|
|
|
|
|
static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData;
|
|
|
|
|
static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad;
|
|
|
|
|
static const MEDIA_STATE_FLUSH cmdInitMediaStateFlush;
|
|
|
|
|
static const MI_BATCH_BUFFER_END cmdInitBatchBufferEnd;
|
|
|
|
|
static const MI_BATCH_BUFFER_START cmdInitBatchBufferStart;
|
|
|
|
|
static const PIPE_CONTROL cmdInitPipeControl;
|
|
|
|
|
static const STATE_COMPUTE_MODE cmdInitStateComputeMode;
|
|
|
|
|
static const MI_SEMAPHORE_WAIT cmdInitMiSemaphoreWait;
|
|
|
|
|
static const RENDER_SURFACE_STATE cmdInitRenderSurfaceState;
|
|
|
|
|
static const MI_LOAD_REGISTER_IMM cmdInitLoadRegisterImm;
|
|
|
|
|
static const MI_LOAD_REGISTER_REG cmdInitLoadRegisterReg;
|
|
|
|
|
static const MI_LOAD_REGISTER_MEM cmdInitLoadRegisterMem;
|
|
|
|
|
static const MI_STORE_DATA_IMM cmdInitStoreDataImm;
|
|
|
|
|
static const MI_STORE_REGISTER_MEM cmdInitStoreRegisterMem;
|
|
|
|
|
static const MI_NOOP cmdInitNoop;
|
|
|
|
|
static const MI_REPORT_PERF_COUNT cmdInitReportPerfCount;
|
|
|
|
|
static const MI_ATOMIC cmdInitAtomic;
|
|
|
|
|
static const PIPELINE_SELECT cmdInitPipelineSelect;
|
|
|
|
|
static const MI_ARB_CHECK cmdInitArbCheck;
|
|
|
|
|
static const MEDIA_VFE_STATE cmdInitMediaVfeState;
|
|
|
|
|
static const STATE_BASE_ADDRESS cmdInitStateBaseAddress;
|
|
|
|
|
static const MEDIA_SURFACE_STATE cmdInitMediaSurfaceState;
|
|
|
|
|
static const SAMPLER_STATE cmdInitSamplerState;
|
|
|
|
|
static const GPGPU_CSR_BASE_ADDRESS cmdInitGpgpuCsrBaseAddress;
|
|
|
|
|
static const STATE_SIP cmdInitStateSip;
|
|
|
|
|
static const BINDING_TABLE_STATE cmdInitBindingTableState;
|
|
|
|
|
static const MI_USER_INTERRUPT cmdInitUserInterrupt;
|
2020-07-17 06:54:45 -07:00
|
|
|
static const L3_CONTROL cmdInitL3ControlWithoutPostSync;
|
|
|
|
|
static const L3_CONTROL cmdInitL3ControlWithPostSync;
|
2022-01-14 01:12:12 +00:00
|
|
|
static const XY_BLOCK_COPY_BLT cmdInitXyBlockCopyBlt;
|
2020-05-04 16:34:13 +02:00
|
|
|
static const XY_COPY_BLT cmdInitXyCopyBlt;
|
2019-09-18 19:32:33 +02:00
|
|
|
static const MI_FLUSH_DW cmdInitMiFlushDw;
|
2020-06-17 08:30:10 +02:00
|
|
|
static const XY_FAST_COLOR_BLT cmdInitXyColorBlt;
|
2023-09-19 11:40:49 +00:00
|
|
|
static constexpr bool isQwordInOrderCounter = false;
|
2023-09-22 11:18:43 +00:00
|
|
|
static constexpr bool walkerPostSyncSupport = false;
|
2024-06-25 16:29:31 +00:00
|
|
|
static constexpr size_t indirectDataAlignment = GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE;
|
2019-09-18 19:32:33 +02:00
|
|
|
|
|
|
|
|
static constexpr bool supportsCmdSet(GFXCORE_FAMILY cmdSetBaseFamily) {
|
|
|
|
|
return cmdSetBaseFamily == IGFX_GEN8_CORE;
|
|
|
|
|
}
|
2023-11-23 13:58:58 +00:00
|
|
|
|
|
|
|
|
template <typename WalkerType>
|
|
|
|
|
static constexpr size_t getInterfaceDescriptorSize() {
|
|
|
|
|
return sizeof(INTERFACE_DESCRIPTOR_DATA);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename InterfaceDescriptorType>
|
|
|
|
|
static InterfaceDescriptorType getInitInterfaceDescriptor() {
|
|
|
|
|
return cmdInitInterfaceDescriptorData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename WalkerType>
|
|
|
|
|
static constexpr bool isHeaplessMode() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2019-09-18 19:32:33 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace NEO
|