mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
fix: respect compression flag in capability table
Related-To: NEO-9465 Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f76b6af8d4
commit
c010d17842
@@ -45,6 +45,7 @@ set(NEO_CORE_OS_INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_helper.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_before_xe_hpg.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_before_xe2.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_hw.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_xe_hpc_and_later.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_xe2_and_later.inl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
|
||||
#include "shared/source/built_ins/sip_kernel_type.h"
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
@@ -45,6 +44,7 @@ void ProductHelper::setupKmdNotifyProperties(KmdNotifyProperties &kmdNotifyPrope
|
||||
|
||||
int ProductHelper::setupProductSpecificConfig(HardwareInfo &hwInfo, const RootDeviceEnvironment &rootDeviceEnvironment) const {
|
||||
auto osInterface = rootDeviceEnvironment.osInterface.get();
|
||||
setRenderCompressedFlags(hwInfo);
|
||||
int ret = configureHardwareCustom(&hwInfo, osInterface);
|
||||
if (ret != 0) {
|
||||
hwInfo = {};
|
||||
|
||||
@@ -268,6 +268,8 @@ class ProductHelper {
|
||||
virtual void overrideDirectSubmissionTimeouts(std::chrono::microseconds &timeout, std::chrono::microseconds &maxTimeout) const = 0;
|
||||
virtual bool isMisalignedUserPtr2WayCoherent() const = 0;
|
||||
virtual bool isSvmHeapReservationSupported() const = 0;
|
||||
virtual void setRenderCompressedFlags(HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isCompressionForbidden(const HardwareInfo &hwInfo) const = 0;
|
||||
|
||||
virtual ~ProductHelper() = default;
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ namespace NEO {
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||
enableCompression(hwInfo);
|
||||
enableBlitterOperationsSupport(hwInfo);
|
||||
|
||||
return 0;
|
||||
@@ -1105,4 +1104,21 @@ bool ProductHelperHw<gfxProduct>::isHostUsmAllocationReuseSupported() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::isCompressionForbiddenCommon(bool defaultValue) const {
|
||||
auto images = debugManager.flags.RenderCompressedImagesEnabled.get();
|
||||
auto buffers = debugManager.flags.RenderCompressedBuffersEnabled.get();
|
||||
|
||||
if (images == -1 && buffers == -1) {
|
||||
return defaultValue;
|
||||
} else {
|
||||
return (images == 0 && buffers == 0);
|
||||
}
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::isCompressionForbidden(const HardwareInfo &hwInfo) const {
|
||||
return isCompressionForbiddenCommon(false);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -9,12 +9,6 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void ProductHelperHw<gfxProduct>::enableCompression(HardwareInfo *hwInfo) const {
|
||||
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.flags.ftrE2ECompression;
|
||||
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.flags.ftrE2ECompression;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::useGemCreateExtInAllocateMemoryByKMD() const {
|
||||
return false;
|
||||
@@ -40,4 +34,10 @@ std::optional<bool> ProductHelperHw<gfxProduct>::isCoherentAllocation(uint64_t p
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void ProductHelperHw<gfxProduct>::setRenderCompressedFlags(HardwareInfo &hwInfo) const {
|
||||
hwInfo.capabilityTable.ftrRenderCompressedImages = hwInfo.featureTable.flags.ftrE2ECompression;
|
||||
hwInfo.capabilityTable.ftrRenderCompressedBuffers = hwInfo.featureTable.flags.ftrE2ECompression;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -205,19 +205,21 @@ class ProductHelperHw : public ProductHelper {
|
||||
void overrideDirectSubmissionTimeouts(std::chrono::microseconds &timeout, std::chrono::microseconds &maxTimeout) const override;
|
||||
bool isMisalignedUserPtr2WayCoherent() const override;
|
||||
bool isSvmHeapReservationSupported() const override;
|
||||
void setRenderCompressedFlags(HardwareInfo &hwInfo) const override;
|
||||
bool isCompressionForbidden(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
~ProductHelperHw() override = default;
|
||||
|
||||
protected:
|
||||
ProductHelperHw() = default;
|
||||
|
||||
void enableCompression(HardwareInfo *hwInfo) const;
|
||||
void enableBlitterOperationsSupport(HardwareInfo *hwInfo) const;
|
||||
bool getConcurrentAccessMemCapabilitiesSupported(UsmAccessCapabilities capability) const;
|
||||
uint64_t getHostMemCapabilitiesValue() const;
|
||||
bool getHostMemCapabilitiesSupported(const HardwareInfo *hwInfo) const;
|
||||
LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;
|
||||
void fillScmPropertiesSupportStructureBase(StateComputeModePropertiesSupport &propertiesSupport) const override;
|
||||
bool isCompressionForbiddenCommon(bool defaultValue) const;
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
|
||||
@@ -5,21 +5,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/os_interface/product_helper_hw.h"
|
||||
#include "shared/source/unified_memory/usm_memory_support.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void ProductHelperHw<gfxProduct>::enableCompression(HardwareInfo *hwInfo) const {
|
||||
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.flags.ftrXe2Compression;
|
||||
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.flags.ftrXe2Compression;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::useGemCreateExtInAllocateMemoryByKMD() const {
|
||||
return true;
|
||||
@@ -49,4 +38,10 @@ std::optional<bool> ProductHelperHw<gfxProduct>::isCoherentAllocation(uint64_t p
|
||||
return false;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void ProductHelperHw<gfxProduct>::setRenderCompressedFlags(HardwareInfo &hwInfo) const {
|
||||
hwInfo.capabilityTable.ftrRenderCompressedImages = hwInfo.featureTable.flags.ftrXe2Compression;
|
||||
hwInfo.capabilityTable.ftrRenderCompressedBuffers = hwInfo.featureTable.flags.ftrXe2Compression;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user