refactor: change additional walker fields encoder 1/n

- move encoding l3 prefetch field into dedicated function

Related-To: NEO-12639

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2024-10-29 10:57:38 +00:00
committed by Compute-Runtime-Automation
parent 2dccdd886a
commit 6f4994c269
7 changed files with 14 additions and 57 deletions

View File

@@ -81,14 +81,11 @@ HWTEST2_F(WalkerDispatchTestDg2AndLater, givenDebugVariableSetWhenProgramCompute
using COMPUTE_WALKER = typename FamilyType::COMPUTE_WALKER;
DebugManagerStateRestore restore;
auto walkerCmd = FamilyType::template getInitGpuWalker<COMPUTE_WALKER>();
MockExecutionEnvironment mockExecutionEnvironment{};
auto &rootDeviceEnvironment = *mockExecutionEnvironment.rootDeviceEnvironments[0];
auto idd = FamilyType::cmdInitInterfaceDescriptorData;
KernelDescriptor kernelDescriptor;
EncodeWalkerArgs walkerArgs{KernelExecutionType::defaultType, true, kernelDescriptor, NEO::RequiredDispatchWalkOrder::none, 0, 0};
for (auto forceL3PrefetchForComputeWalker : {false, true}) {
debugManager.flags.ForceL3PrefetchForComputeWalker.set(forceL3PrefetchForComputeWalker);
EncodeDispatchKernel<FamilyType>::encodeAdditionalWalkerFields(rootDeviceEnvironment, walkerCmd, walkerArgs);
EncodeDispatchKernel<FamilyType>::overrideDefaultValues(walkerCmd, idd);
EXPECT_EQ(!forceL3PrefetchForComputeWalker, walkerCmd.getL3PrefetchDisable());
}
}