feature: add bindless addressing support query to releaseHelper

Related-To: NEO-7063

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2023-10-02 13:19:46 +00:00
committed by Compute-Runtime-Automation
parent 099a3f30e3
commit 92a2d6df27
9 changed files with 14 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ class ReleaseHelper {
virtual bool isRcsExposureDisabled() const = 0;
virtual std::optional<GfxMemoryAllocationMethod> getPreferredAllocationMethod(AllocationType allocationType) const = 0;
virtual std::vector<uint32_t> getSupportedNumGrfs() const = 0;
virtual bool isBindlessAddressingDisabled() const = 0;
protected:
ReleaseHelper(HardwareIpVersion hardwareIpVersion) : hardwareIpVersion(hardwareIpVersion) {}
@@ -76,6 +77,7 @@ class ReleaseHelperHw : public ReleaseHelper {
bool isRcsExposureDisabled() const override;
std::optional<GfxMemoryAllocationMethod> getPreferredAllocationMethod(AllocationType allocationType) const override;
std::vector<uint32_t> getSupportedNumGrfs() const override;
bool isBindlessAddressingDisabled() const override;
protected:
ReleaseHelperHw(HardwareIpVersion hardwareIpVersion) : ReleaseHelper(hardwareIpVersion) {}

View File

@@ -92,4 +92,9 @@ template <ReleaseType releaseType>
std::vector<uint32_t> ReleaseHelperHw<releaseType>::getSupportedNumGrfs() const {
return {128u, 256u};
}
template <ReleaseType releaseType>
bool ReleaseHelperHw<releaseType>::isBindlessAddressingDisabled() const {
return true;
}
} // namespace NEO

View File

@@ -30,5 +30,6 @@ class MockReleaseHelper : public ReleaseHelper {
ADDMETHOD_CONST_NOBASE(isRcsExposureDisabled, bool, false, ());
ADDMETHOD_CONST_NOBASE(getPreferredAllocationMethod, std::optional<GfxMemoryAllocationMethod>, std::nullopt, (AllocationType allocationType));
ADDMETHOD_CONST_NOBASE(getSupportedNumGrfs, std::vector<uint32_t>, {128}, ());
ADDMETHOD_CONST_NOBASE(isBindlessAddressingDisabled, bool, true, ());
};
} // namespace NEO

View File

@@ -35,6 +35,7 @@ TEST_F(ReleaseHelper1255Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
EXPECT_FALSE(releaseHelper->isAuxSurfaceModeOverrideRequired());
EXPECT_TRUE(releaseHelper->isRcsExposureDisabled());
EXPECT_TRUE(releaseHelper->isBindlessAddressingDisabled());
}
}

View File

@@ -35,6 +35,7 @@ TEST_F(ReleaseHelper1256Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
EXPECT_FALSE(releaseHelper->isAuxSurfaceModeOverrideRequired());
EXPECT_TRUE(releaseHelper->isRcsExposureDisabled());
EXPECT_TRUE(releaseHelper->isBindlessAddressingDisabled());
}
}

View File

@@ -35,6 +35,7 @@ TEST_F(ReleaseHelper1257Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
EXPECT_FALSE(releaseHelper->isAuxSurfaceModeOverrideRequired());
EXPECT_TRUE(releaseHelper->isRcsExposureDisabled());
EXPECT_TRUE(releaseHelper->isBindlessAddressingDisabled());
}
}

View File

@@ -33,5 +33,6 @@ TEST_F(ReleaseHelper1260Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
EXPECT_TRUE(releaseHelper->isResolvingSubDeviceIDNeeded());
EXPECT_TRUE(releaseHelper->isCachingOnCpuAvailable());
EXPECT_TRUE(releaseHelper->isRcsExposureDisabled());
EXPECT_TRUE(releaseHelper->isBindlessAddressingDisabled());
}
}

View File

@@ -36,6 +36,7 @@ TEST_F(ReleaseHelper1270Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
EXPECT_TRUE(releaseHelper->isAuxSurfaceModeOverrideRequired());
EXPECT_FALSE(releaseHelper->isRcsExposureDisabled());
EXPECT_TRUE(releaseHelper->isBindlessAddressingDisabled());
}
}

View File

@@ -36,6 +36,7 @@ TEST_F(ReleaseHelper1271Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe
EXPECT_TRUE(releaseHelper->isDirectSubmissionSupported());
EXPECT_TRUE(releaseHelper->isAuxSurfaceModeOverrideRequired());
EXPECT_FALSE(releaseHelper->isRcsExposureDisabled());
EXPECT_TRUE(releaseHelper->isBindlessAddressingDisabled());
}
}