add front end command query methods to unit test helpers

Related-To: NEO-5019

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2022-09-02 13:15:59 +00:00
committed by Compute-Runtime-Automation
parent e0b686a538
commit 2d8324c954
5 changed files with 28 additions and 0 deletions

View File

@@ -51,5 +51,10 @@ uint32_t UnitTestHelper<Family>::getTdCtlRegisterValue() {
return (1u << 7) | (1u << 4);
}
template <>
bool UnitTestHelper<Family>::getDisableFusionStateFromFrontEndCommand(const typename Family::VFE_STATE_TYPE &feCmd) {
return feCmd.getDisableSlice0Subslice2();
}
template struct UnitTestHelper<Family>;
} // namespace NEO

View File

@@ -87,6 +87,9 @@ struct UnitTestHelper {
static GenCmdList::iterator findMidThreadPreemptionAllocationCommand(GenCmdList::iterator begin, GenCmdList::iterator end);
static std::vector<GenCmdList::iterator> findAllMidThreadPreemptionAllocationCommand(GenCmdList::iterator begin, GenCmdList::iterator end);
static bool getDisableFusionStateFromFrontEndCommand(const typename GfxFamily::VFE_STATE_TYPE &feCmd);
static bool getComputeDispatchAllWalkerFromFrontEndCommand(const typename GfxFamily::VFE_STATE_TYPE &feCmd);
};
} // namespace NEO

View File

@@ -97,4 +97,14 @@ void UnitTestHelper<GfxFamily>::validateSbaMocs(uint32_t expectedMocs, CommandSt
EXPECT_EQ(expectedMocs, mocs);
}
template <typename GfxFamily>
bool UnitTestHelper<GfxFamily>::getDisableFusionStateFromFrontEndCommand(const typename GfxFamily::VFE_STATE_TYPE &feCmd) {
return false;
}
template <typename GfxFamily>
bool UnitTestHelper<GfxFamily>::getComputeDispatchAllWalkerFromFrontEndCommand(const typename GfxFamily::VFE_STATE_TYPE &feCmd) {
return false;
}
} // namespace NEO

View File

@@ -90,6 +90,11 @@ uint32_t UnitTestHelper<Family>::getTdCtlRegisterValue() {
return (1u << 7) | (1u << 4) | (1u << 2) | (1u << 0);
}
template <>
bool UnitTestHelper<Family>::getComputeDispatchAllWalkerFromFrontEndCommand(const typename Family::VFE_STATE_TYPE &feCmd) {
return feCmd.getComputeDispatchAllWalkerEnable();
}
template struct UnitTestHelper<Family>;
} // namespace NEO

View File

@@ -39,5 +39,10 @@ uint32_t UnitTestHelper<Family>::getTdCtlRegisterValue() {
return (1u << 7) | (1u << 4) | (1u << 2) | (1u << 0);
}
template <>
bool UnitTestHelper<Family>::getDisableFusionStateFromFrontEndCommand(const typename Family::VFE_STATE_TYPE &feCmd) {
return feCmd.getFusedEuDispatch();
}
template struct UnitTestHelper<Family>;
} // namespace NEO