refactor: add kernel properties and move implementations to imp class

Related-To: NEO-15374

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2025-07-15 13:12:06 +00:00
committed by Compute-Runtime-Automation
parent 377b99e741
commit ef5efeac0c
9 changed files with 98 additions and 38 deletions

View File

@@ -216,6 +216,9 @@ class GfxCoreHelper {
virtual bool isCacheFlushPriorImageReadRequired() const = 0;
virtual uint32_t getQueuePriorityLevels() const = 0;
virtual uint32_t getDefaultWalkerInlineDataSize() const = 0;
virtual uintptr_t getSurfaceBaseAddressAlignmentMask() const = 0;
virtual uintptr_t getSurfaceBaseAddressAlignment() const = 0;
virtual ~GfxCoreHelper() = default;
@@ -270,6 +273,13 @@ class GfxCoreHelperHw : public GfxCoreHelper {
return GfxFamily::template getInitInterfaceDescriptor<InterfaceDescriptorType>().KERNELSTARTPOINTER_ALIGN_SIZE;
}
uint32_t getDefaultWalkerInlineDataSize() const override {
using DefaultWalkerType = typename GfxFamily::DefaultWalkerType;
return DefaultWalkerType::getInlineDataSize();
}
uintptr_t getSurfaceBaseAddressAlignmentMask() const override;
uintptr_t getSurfaceBaseAddressAlignment() const override;
uint32_t getComputeUnitsUsedForScratch(const RootDeviceEnvironment &rootDeviceEnvironment) const override;
uint32_t getPitchAlignmentForImage(const RootDeviceEnvironment &rootDeviceEnvironment) const override;

View File

@@ -928,4 +928,14 @@ uint32_t GfxCoreHelperHw<Family>::getQueuePriorityLevels() const {
return 2;
}
template <typename Family>
uintptr_t GfxCoreHelperHw<Family>::getSurfaceBaseAddressAlignmentMask() const {
return EncodeSurfaceState<Family>::getSurfaceBaseAddressAlignmentMask();
}
template <typename Family>
uintptr_t GfxCoreHelperHw<Family>::getSurfaceBaseAddressAlignment() const {
return EncodeSurfaceState<Family>::getSurfaceBaseAddressAlignment();
}
} // namespace NEO