From 894c74b62d97a8cb569f98a5542d40a25f7f05f9 Mon Sep 17 00:00:00 2001 From: Dominik Dabek Date: Mon, 9 Dec 2024 13:53:23 +0000 Subject: [PATCH] fix: disable indirects detection on non-PVC Also add ULTs for getting indirect detection version product helper methods. Related-To: GSD-10453 Signed-off-by: Dominik Dabek --- shared/source/os_interface/product_helper.inl | 2 +- .../test/unit_test/os_interface/product_helper_tests.cpp | 5 +++++ .../unit_test/xe_hpc_core/pvc/test_product_helper_pvc.cpp | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/shared/source/os_interface/product_helper.inl b/shared/source/os_interface/product_helper.inl index 4404e6ff7a..626850086c 100644 --- a/shared/source/os_interface/product_helper.inl +++ b/shared/source/os_interface/product_helper.inl @@ -118,7 +118,7 @@ bool ProductHelperHw::isDetectIndirectAccessInKernelSupported(const template uint32_t ProductHelperHw::getRequiredDetectIndirectVersion() const { - return IndirectDetectionVersions::requiredDetectIndirectVersionBindless; + return IndirectDetectionVersions::disabled; } template diff --git a/shared/test/unit_test/os_interface/product_helper_tests.cpp b/shared/test/unit_test/os_interface/product_helper_tests.cpp index ce31e772c0..b1c8a110f8 100644 --- a/shared/test/unit_test/os_interface/product_helper_tests.cpp +++ b/shared/test/unit_test/os_interface/product_helper_tests.cpp @@ -1093,3 +1093,8 @@ HWTEST2_F(ProductHelperTest, givenProductHelperWhenQuery2DBlockStoreThenReturnTr EXPECT_TRUE(productHelper->supports2DBlockStore()); } + +HWTEST2_F(ProductHelperTest, givenProductHelperWhenGetRequiredDetectIndirectVersionCalledThenReturnCorrectVersion, IsNotPVC) { + EXPECT_EQ(IndirectDetectionVersions::disabled, productHelper->getRequiredDetectIndirectVersion()); + EXPECT_EQ(IndirectDetectionVersions::requiredDetectIndirectVersionVectorCompiler, productHelper->getRequiredDetectIndirectVersionVC()); +} diff --git a/shared/test/unit_test/xe_hpc_core/pvc/test_product_helper_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/test_product_helper_pvc.cpp index dbc4f1b75f..f017711bab 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/test_product_helper_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/test_product_helper_pvc.cpp @@ -7,6 +7,7 @@ #include "shared/source/command_stream/stream_properties.h" #include "shared/source/helpers/constants.h" +#include "shared/source/helpers/definitions/indirect_detection_versions.h" #include "shared/source/kernel/kernel_descriptor.h" #include "shared/source/os_interface/product_helper.h" #include "shared/source/xe_hpc_core/hw_cmds_pvc.h" @@ -291,4 +292,9 @@ PVCTEST_F(PvcProductHelper, whenQueryingMaxNumSamplersThenReturnZero) { PVCTEST_F(PvcProductHelper, givenProductHelperWhenAskingForReadOnlyResourceSupportThenTrueReturned) { EXPECT_TRUE(productHelper->supportReadOnlyAllocations()); -} \ No newline at end of file +} + +PVCTEST_F(PvcProductHelper, givenProductHelperWhenGetRequiredDetectIndirectVersionCalledThenReturnCorrectVersion) { + EXPECT_EQ(IndirectDetectionVersions::requiredDetectIndirectVersionPVC, productHelper->getRequiredDetectIndirectVersion()); + EXPECT_EQ(IndirectDetectionVersions::requiredDetectIndirectVersionPVCVectorCompiler, productHelper->getRequiredDetectIndirectVersionVC()); +}