mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
refactor: Move isDummyBlitWaRequired function to release helper
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d526dc9223
commit
8797c326b6
@@ -10,6 +10,7 @@
|
||||
#include "shared/source/gmm_helper/resource_info.h"
|
||||
#include "shared/source/helpers/blit_commands_helper_base.inl"
|
||||
#include "shared/source/helpers/local_memory_access_modes.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -363,8 +364,9 @@ bool BlitCommandsHelper<GfxFamily>::isDummyBlitWaNeeded(const EncodeDummyBlitWaA
|
||||
if (debugManager.flags.ForceDummyBlitWa.get() != -1) {
|
||||
return debugManager.flags.ForceDummyBlitWa.get();
|
||||
}
|
||||
auto &productHelper = waArgs.rootDeviceEnvironment->getProductHelper();
|
||||
return productHelper.isDummyBlitWaRequired();
|
||||
auto releaseHelper = waArgs.rootDeviceEnvironment->getReleaseHelper();
|
||||
UNRECOVERABLE_IF(!releaseHelper);
|
||||
return releaseHelper->isDummyBlitWaRequired();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,6 @@ class ProductHelper {
|
||||
virtual bool useLocalPreferredForCacheableBuffers() const = 0;
|
||||
virtual bool useGemCreateExtInAllocateMemoryByKMD() const = 0;
|
||||
virtual bool isTlbFlushRequired() const = 0;
|
||||
virtual bool isDummyBlitWaRequired() const = 0;
|
||||
virtual bool isDetectIndirectAccessInKernelSupported(const KernelDescriptor &kernelDescriptor, const bool isPrecompiled, const uint32_t precompiledKernelIndirectDetectionVersion) const = 0;
|
||||
virtual uint32_t getRequiredDetectIndirectVersion() const = 0;
|
||||
virtual uint32_t getRequiredDetectIndirectVersionVC() const = 0;
|
||||
|
||||
@@ -809,11 +809,6 @@ bool ProductHelperHw<gfxProduct>::isCalculationForDisablingEuFusionWithDpasNeede
|
||||
return false;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::isDummyBlitWaRequired() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::is48bResourceNeededForRayTracing() const {
|
||||
return true;
|
||||
|
||||
@@ -124,7 +124,6 @@ class ProductHelperHw : public ProductHelper {
|
||||
bool useLocalPreferredForCacheableBuffers() const override;
|
||||
bool useGemCreateExtInAllocateMemoryByKMD() const override;
|
||||
bool isTlbFlushRequired() const override;
|
||||
bool isDummyBlitWaRequired() const override;
|
||||
bool isDetectIndirectAccessInKernelSupported(const KernelDescriptor &kernelDescriptor, const bool isPrecompiled, const uint32_t precompiledKernelIndirectDetectionVersion) const override;
|
||||
uint32_t getRequiredDetectIndirectVersion() const override;
|
||||
uint32_t getRequiredDetectIndirectVersionVC() const override;
|
||||
|
||||
@@ -60,6 +60,7 @@ class ReleaseHelper {
|
||||
virtual uint32_t getStackSizePerRay() const = 0;
|
||||
virtual bool isLocalOnlyAllowed() const = 0;
|
||||
virtual bool isDisablingMsaaRequired() const = 0;
|
||||
virtual bool isDummyBlitWaRequired() const = 0;
|
||||
virtual const SizeToPreferredSlmValueArray &getSizeToPreferredSlmValue(bool isHeapless) const = 0;
|
||||
|
||||
protected:
|
||||
@@ -100,6 +101,7 @@ class ReleaseHelperHw : public ReleaseHelper {
|
||||
uint32_t getStackSizePerRay() const override;
|
||||
bool isLocalOnlyAllowed() const override;
|
||||
bool isDisablingMsaaRequired() const override;
|
||||
bool isDummyBlitWaRequired() const override;
|
||||
const SizeToPreferredSlmValueArray &getSizeToPreferredSlmValue(bool isHeapless) const override;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -34,6 +34,11 @@ const SizeToPreferredSlmValueArray &ReleaseHelperHw<release>::getSizeToPreferred
|
||||
return sizeToPreferredSlmValue;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ReleaseHelperHw<release>::isDummyBlitWaRequired() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
template class NEO::ReleaseHelperHw<NEO::release>;
|
||||
|
||||
@@ -44,6 +44,11 @@ const SizeToPreferredSlmValueArray &ReleaseHelperHw<release>::getSizeToPreferred
|
||||
return sizeToPreferredSlmValue;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ReleaseHelperHw<release>::isDummyBlitWaRequired() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
template class NEO::ReleaseHelperHw<NEO::release>;
|
||||
|
||||
@@ -60,6 +60,11 @@ const SizeToPreferredSlmValueArray &ReleaseHelperHw<release>::getSizeToPreferred
|
||||
return sizeToPreferredSlmValue;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ReleaseHelperHw<release>::isDummyBlitWaRequired() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
#include "shared/source/release_helper/release_helper_common_xe_lpg.inl"
|
||||
|
||||
|
||||
@@ -60,6 +60,11 @@ const SizeToPreferredSlmValueArray &ReleaseHelperHw<release>::getSizeToPreferred
|
||||
return sizeToPreferredSlmValue;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ReleaseHelperHw<release>::isDummyBlitWaRequired() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
#include "shared/source/release_helper/release_helper_common_xe_lpg.inl"
|
||||
|
||||
@@ -48,6 +48,11 @@ const SizeToPreferredSlmValueArray &ReleaseHelperHw<release>::getSizeToPreferred
|
||||
return sizeToPreferredSlmValue;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ReleaseHelperHw<release>::isDummyBlitWaRequired() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
template class NEO::ReleaseHelperHw<NEO::release>;
|
||||
|
||||
@@ -147,6 +147,11 @@ bool ReleaseHelperHw<releaseType>::isDisablingMsaaRequired() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <ReleaseType releaseType>
|
||||
bool ReleaseHelperHw<releaseType>::isDummyBlitWaRequired() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <ReleaseType releaseType>
|
||||
const SizeToPreferredSlmValueArray &ReleaseHelperHw<releaseType>::getSizeToPreferredSlmValue(bool isHeapless) const {
|
||||
static const SizeToPreferredSlmValueArray sizeToPreferredSlmValue = {};
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
#include "aubstream/product_family.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isDummyBlitWaRequired() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isMaxThreadsForWorkgroupWARequired(const HardwareInfo &hwInfo) const {
|
||||
|
||||
@@ -46,11 +46,6 @@ bool ProductHelperHw<gfxProduct>::blitEnqueuePreferred(bool isWriteToImageFromBu
|
||||
template <>
|
||||
std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStreamProductFamily() const {
|
||||
return aub_stream::ProductFamily::Mtl;
|
||||
};
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isDummyBlitWaRequired() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/kernel/kernel_descriptor.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
|
||||
@@ -122,8 +123,8 @@ size_t UnitTestHelper<GfxFamily>::getAdditionalDshSize(uint32_t iddCount) {
|
||||
|
||||
template <typename GfxFamily>
|
||||
void UnitTestHelper<GfxFamily>::verifyDummyBlitWa(const RootDeviceEnvironment *rootDeviceEnvironment, GenCmdList::iterator &cmdIterator) {
|
||||
const auto &productHelper = rootDeviceEnvironment->getProductHelper();
|
||||
if (productHelper.isDummyBlitWaRequired()) {
|
||||
const auto releaseHelper = rootDeviceEnvironment->getReleaseHelper();
|
||||
if (releaseHelper->isDummyBlitWaRequired()) {
|
||||
using XY_COLOR_BLT = typename GfxFamily::XY_COLOR_BLT;
|
||||
auto dummyBltCmd = genCmdCast<XY_COLOR_BLT *>(*(cmdIterator++));
|
||||
EXPECT_NE(nullptr, dummyBltCmd);
|
||||
|
||||
@@ -40,6 +40,7 @@ class MockReleaseHelper : public ReleaseHelper {
|
||||
ADDMETHOD_CONST_NOBASE(getStackSizePerRay, uint32_t, {}, ());
|
||||
ADDMETHOD_CONST_NOBASE(isLocalOnlyAllowed, bool, {}, ());
|
||||
ADDMETHOD_CONST_NOBASE(isDisablingMsaaRequired, bool, false, ());
|
||||
ADDMETHOD_CONST_NOBASE(isDummyBlitWaRequired, bool, false, ());
|
||||
|
||||
const SizeToPreferredSlmValueArray &getSizeToPreferredSlmValue(bool isHeapless) const override {
|
||||
static SizeToPreferredSlmValueArray sizeToPreferredSlmValue = {};
|
||||
|
||||
@@ -44,8 +44,8 @@ bool UnitTestHelper<Family>::getComputeDispatchAllWalkerFromFrontEndCommand(cons
|
||||
|
||||
template <>
|
||||
void UnitTestHelper<Family>::verifyDummyBlitWa(const RootDeviceEnvironment *rootDeviceEnvironment, GenCmdList::iterator &cmdIterator) {
|
||||
const auto &productHelper = rootDeviceEnvironment->getProductHelper();
|
||||
if (productHelper.isDummyBlitWaRequired()) {
|
||||
const auto releaseHelper = rootDeviceEnvironment->getReleaseHelper();
|
||||
if (releaseHelper->isDummyBlitWaRequired()) {
|
||||
auto dummyBltCmd = genCmdCast<typename Family::MEM_SET *>(*(cmdIterator++));
|
||||
EXPECT_NE(nullptr, dummyBltCmd);
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "shared/test/common/mocks/mock_gmm.h"
|
||||
#include "shared/test/common/mocks/mock_gmm_client_context.h"
|
||||
#include "shared/test/common/mocks/mock_gmm_resource_info.h"
|
||||
#include "shared/test/common/mocks/mock_release_helper.h"
|
||||
#include "shared/test/common/mocks/ult_device_factory.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
#include "shared/test/unit_test/helpers/blit_commands_helper_tests.inl"
|
||||
@@ -503,25 +504,14 @@ HWTEST2_F(BlitTests, givenDebugVariableWhenDispatchBlitCommandsForImageRegionIsC
|
||||
EXPECT_EQ(expectedOutput.str(), output);
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
class TestDummyBlitMockProductHelper : public ProductHelperHw<gfxProduct> {
|
||||
public:
|
||||
bool isDummyBlitWaRequired() const override {
|
||||
return dummyBlitRequired;
|
||||
}
|
||||
uint32_t dummyBlitRequired = true;
|
||||
};
|
||||
|
||||
HWTEST2_F(BlitTests, givenDispatchDummyBlitWhenDummyBlitWaRequiredThenDummyBlitIsProgrammedCorrectly, IsXeHPOrAbove) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
debugManager.flags.ForceDummyBlitWa.set(-1);
|
||||
|
||||
auto &rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment &>(pDevice->getRootDeviceEnvironmentRef());
|
||||
|
||||
RAIIProductHelperFactory<TestDummyBlitMockProductHelper<productFamily>> raii{
|
||||
rootDeviceEnvironment};
|
||||
auto &productHelper = *raii.mockProductHelper;
|
||||
productHelper.dummyBlitRequired = true;
|
||||
auto releaseHelper = new MockReleaseHelper();
|
||||
releaseHelper->isDummyBlitWaRequiredResult = true;
|
||||
rootDeviceEnvironment.releaseHelper.reset(releaseHelper);
|
||||
|
||||
uint32_t streamBuffer[100] = {};
|
||||
LinearStream stream(streamBuffer, sizeof(streamBuffer));
|
||||
@@ -621,11 +611,7 @@ HWTEST2_F(BlitTests, givenDispatchDummyBlitWhenDummyBlitWaNotRequiredThenAdditio
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
debugManager.flags.ForceDummyBlitWa.set(-1);
|
||||
auto &rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment &>(pDevice->getRootDeviceEnvironmentRef());
|
||||
|
||||
RAIIProductHelperFactory<TestDummyBlitMockProductHelper<productFamily>> raii{
|
||||
rootDeviceEnvironment};
|
||||
auto &productHelper = *raii.mockProductHelper;
|
||||
productHelper.dummyBlitRequired = false;
|
||||
rootDeviceEnvironment.releaseHelper = std::make_unique<MockReleaseHelper>();
|
||||
|
||||
uint32_t streamBuffer[100] = {};
|
||||
LinearStream stream(streamBuffer, sizeof(streamBuffer));
|
||||
|
||||
@@ -841,10 +841,6 @@ HWTEST_F(ProductHelperTest, givenProductHelperWhenCheckingIsUnlockingLockedPtrNe
|
||||
EXPECT_FALSE(productHelper->isUnlockingLockedPtrNecessary(pInHwInfo));
|
||||
}
|
||||
|
||||
HWTEST_F(ProductHelperTest, givenProductHelperWhenCheckDummyBlitWaRequiredThenReturnFalse) {
|
||||
EXPECT_FALSE(productHelper->isDummyBlitWaRequired());
|
||||
}
|
||||
|
||||
HWTEST_F(ProductHelperTest, givenProductHelperAndKernelBinaryFormatsWhenCheckingIsDetectIndirectAccessInKernelSupportedThenCorrectValueIsReturned) {
|
||||
KernelDescriptor kernelDescriptor;
|
||||
const auto igcDetectIndirectVersion = INDIRECT_ACCESS_DETECTION_VERSION;
|
||||
|
||||
@@ -72,6 +72,10 @@ TEST_F(ReleaseHelper1255Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1255Tests, whenIsDummyBlitWaRequiredCalledThenFalseReturned) {
|
||||
whenIsDummyBlitWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1255Tests, whenGettingPreferredSlmSizeThenAllEntriesHaveCorrectValues) {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
|
||||
@@ -72,6 +72,10 @@ TEST_F(ReleaseHelper1256Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1256Tests, whenIsDummyBlitWaRequiredCalledThenFalseReturned) {
|
||||
whenIsDummyBlitWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1256Tests, whenGettingPreferredSlmSizeThenAllEntriesHaveCorrectValues) {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
|
||||
@@ -72,6 +72,10 @@ TEST_F(ReleaseHelper1257Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1257Tests, whenIsDummyBlitWaRequiredCalledThenFalseReturned) {
|
||||
whenIsDummyBlitWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1257Tests, whenGettingPreferredSlmSizeThenAllEntriesHaveCorrectValues) {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
|
||||
@@ -57,6 +57,10 @@ TEST_F(ReleaseHelper1260Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1260Tests, whenIsDummyBlitWaRequiredCalledThenTrueReturned) {
|
||||
whenIsDummyBlitWaRequiredCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1260Tests, whenGettingPreferredSlmSizeThenAllEntriesHaveCorrectValues) {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
|
||||
@@ -56,6 +56,10 @@ TEST_F(ReleaseHelper1261Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1261Tests, whenIsDummyBlitWaRequiredCalledThenTrueReturned) {
|
||||
whenIsDummyBlitWaRequiredCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1261Tests, whenGettingPreferredSlmSizeThenAllEntriesHaveCorrectValues) {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
|
||||
@@ -69,6 +69,10 @@ TEST_F(ReleaseHelper1270Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1270Tests, whenIsDummyBlitWaRequiredCalledThenTrueReturned) {
|
||||
whenIsDummyBlitWaRequiredCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1270Tests, whenGettingPreferredSlmSizeThenAllEntriesHaveCorrectValues) {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
|
||||
@@ -69,6 +69,10 @@ TEST_F(ReleaseHelper1271Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1271Tests, whenIsDummyBlitWaRequiredCalledThenTrueReturned) {
|
||||
whenIsDummyBlitWaRequiredCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1271Tests, whenGettingPreferredSlmSizeThenAllEntriesHaveCorrectValues) {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
|
||||
@@ -71,6 +71,10 @@ TEST_F(ReleaseHelper1274Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1274Tests, whenIsDummyBlitWaRequiredCalledThenTrueReturned) {
|
||||
whenIsDummyBlitWaRequiredCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1274Tests, whenGettingPreferredSlmSizeThenAllEntriesHaveCorrectValues) {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
|
||||
@@ -72,6 +72,10 @@ TEST_F(ReleaseHelper2001Tests, whenIsLocalOnlyAllowedCalledThenFalseReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper2001Tests, whenIsDummyBlitWaRequiredCalledThenFalseReturned) {
|
||||
whenIsDummyBlitWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper2001Tests, whenGettingPreferredSlmSizeThenAllEntriesHaveCorrectValues) {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
|
||||
@@ -72,6 +72,10 @@ TEST_F(ReleaseHelper2004Tests, whenIsLocalOnlyAllowedCalledThenFalseReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper2004Tests, whenIsDummyBlitWaRequiredCalledThenFalseReturned) {
|
||||
whenIsDummyBlitWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper2004Tests, whenGettingPreferredSlmSizeThenAllEntriesHaveCorrectValues) {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
|
||||
@@ -74,6 +74,10 @@ TEST_F(ReleaseHelper3000Tests, whenIsLocalOnlyAllowedCalledThenFalseReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper3000Tests, whenIsDummyBlitWaRequiredCalledThenFalseReturned) {
|
||||
whenIsDummyBlitWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper3000Tests, whenGettingPreferredSlmSizeThenAllEntriesHaveCorrectValues) {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
|
||||
@@ -74,6 +74,10 @@ TEST_F(ReleaseHelper3001Tests, whenIsLocalOnlyAllowedCalledThenFalseReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper3001Tests, whenIsDummyBlitWaRequiredCalledThenFalseReturned) {
|
||||
whenIsDummyBlitWaRequiredCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper3001Tests, whenGettingPreferredSlmSizeThenAllEntriesHaveCorrectValues) {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
|
||||
@@ -171,3 +171,21 @@ void ReleaseHelperTestsBase::whenGettingThreadsPerEuConfigsThenCorrectValueIsRet
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ReleaseHelperTestsBase::whenIsDummyBlitWaRequiredCalledThenTrueReturned() {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
releaseHelper = ReleaseHelper::create(ipVersion);
|
||||
ASSERT_NE(nullptr, releaseHelper);
|
||||
EXPECT_TRUE(releaseHelper->isDummyBlitWaRequired());
|
||||
}
|
||||
}
|
||||
|
||||
void ReleaseHelperTestsBase::whenIsDummyBlitWaRequiredCalledThenFalseReturned() {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
releaseHelper = ReleaseHelper::create(ipVersion);
|
||||
ASSERT_NE(nullptr, releaseHelper);
|
||||
EXPECT_FALSE(releaseHelper->isDummyBlitWaRequired());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ struct ReleaseHelperTestsBase : public ::testing::Test {
|
||||
void whenGettingTotalMemBankSizeThenReturn32GB();
|
||||
void whenGettingAdditionalFp16AtomicCapabilitiesThenReturnNoCapabilities();
|
||||
void whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities();
|
||||
void whenIsDummyBlitWaRequiredCalledThenTrueReturned();
|
||||
void whenIsDummyBlitWaRequiredCalledThenFalseReturned();
|
||||
void whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
void whenIsLocalOnlyAllowedCalledThenFalseReturned();
|
||||
void whenGettingPreferredSlmSizeThenAllEntriesEmpty();
|
||||
|
||||
@@ -10,4 +10,3 @@
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfIsBlitSplitEnqueueWARequiredThenReturnFalse, IGFX_PVC);
|
||||
HWTEST_EXCLUDE_PRODUCT(BlitTests, GivenCpuAccessToLocalMemoryWhenGettingMaxBlitSizeThenValuesAreOverriden_BlitPlatforms, IGFX_PVC);
|
||||
HWTEST_EXCLUDE_PRODUCT(GfxCoreHelperTest, GivenCooperativeEngineSupportedAndNotUsedWhenAdjustMaxWorkGroupCountIsCalledThenSmallerValueIsReturned, IGFX_PVC);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckDummyBlitWaRequiredThenReturnFalse, IGFX_PVC);
|
||||
|
||||
@@ -289,10 +289,6 @@ PVCTEST_F(PvcProductHelper, whenQueryingMaxNumSamplersThenReturnZero) {
|
||||
EXPECT_EQ(0u, productHelper->getMaxNumSamplers());
|
||||
}
|
||||
|
||||
PVCTEST_F(PvcProductHelper, whenCheckingIfDummyBlitWaIsRequiredThenTrueIsReturned) {
|
||||
EXPECT_TRUE(productHelper->isDummyBlitWaRequired());
|
||||
}
|
||||
|
||||
PVCTEST_F(PvcProductHelper, givenProductHelperWhenAskingForReadOnlyResourceSupportThenTrueReturned) {
|
||||
EXPECT_TRUE(productHelper->supportReadOnlyAllocations());
|
||||
}
|
||||
@@ -22,4 +22,3 @@ HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenIsAdjustWalkOrde
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckBlitEnqueuePreferredThenReturnTrue, IGFX_ARROWLAKE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenGettingPreferredAllocationMethodThenNoPreferenceIsReturned, IGFX_ARROWLAKE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenBooleanUncachedWhenCallOverridePatIndexThenProperPatIndexIsReturned, IGFX_ARROWLAKE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckDummyBlitWaRequiredThenReturnFalse, IGFX_ARROWLAKE);
|
||||
|
||||
@@ -18,4 +18,3 @@ HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenIsAdjustWalkOrde
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckBlitEnqueuePreferredThenReturnTrue, IGFX_METEORLAKE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenGettingPreferredAllocationMethodThenNoPreferenceIsReturned, IGFX_METEORLAKE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenBooleanUncachedWhenCallOverridePatIndexThenProperPatIndexIsReturned, IGFX_METEORLAKE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckDummyBlitWaRequiredThenReturnFalse, IGFX_METEORLAKE);
|
||||
|
||||
@@ -361,10 +361,6 @@ HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenCallDeferMOCSToPatThenF
|
||||
EXPECT_FALSE(productHelper.deferMOCSToPatIndex());
|
||||
}
|
||||
|
||||
HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenCheckDummyBlitWaRequiredThenReturnTrue, IsXeLpg) {
|
||||
EXPECT_TRUE(productHelper->isDummyBlitWaRequired());
|
||||
}
|
||||
|
||||
HWTEST2_F(XeLpgProductHelperTests, givenPatIndexWhenCheckIsCoherentAllocationThenReturnProperValue, IsXeLpg) {
|
||||
std::array<uint64_t, 2> listOfCoherentPatIndexes = {3, 4};
|
||||
for (auto patIndex : listOfCoherentPatIndexes) {
|
||||
|
||||
Reference in New Issue
Block a user