Files
compute-runtime/opencl/test/unit_test/mocks/mock_builder.cpp
Damian Tomczak a9278e1799 feature: force stateless for copy image to buffer
Related-to: NEO-6075

Signed-off-by: Damian Tomczak <damian.tomczak@intel.com>
2025-08-29 13:09:03 +02:00

34 lines
1.2 KiB
C++

/*
* Copyright (C) 2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/test/unit_test/mocks/mock_builder.h"
#include "opencl/source/kernel/kernel.h"
#include "opencl/test/unit_test/mocks/mock_mdi.h"
bool MockBuilder::buildDispatchInfos(MultiDispatchInfo &d) const {
wasBuildDispatchInfosWithBuiltinOpParamsCalled = true;
paramsReceived.multiDispatchInfo.setBuiltinOpParams(d.peekBuiltinOpParams());
return true;
}
bool MockBuilder::buildDispatchInfos(MultiDispatchInfo &d, Kernel *kernel,
const uint32_t dim, const Vec3<size_t> &gws, const Vec3<size_t> &elws, const Vec3<size_t> &offset) const {
paramsReceived.kernel = kernel;
paramsReceived.gws = gws;
paramsReceived.elws = elws;
paramsReceived.offset = offset;
wasBuildDispatchInfosWithKernelParamsCalled = true;
DispatchInfoBuilder<NEO::SplitDispatch::Dim::d3D, NEO::SplitDispatch::SplitMode::noSplit> dispatchInfoBuilder(clDevice);
dispatchInfoBuilder.setKernel(paramsToUse.kernel);
dispatchInfoBuilder.setDispatchGeometry(dim, paramsToUse.gws, paramsToUse.elws, paramsToUse.offset);
dispatchInfoBuilder.bake(d);
cloneMdi(paramsReceived.multiDispatchInfo, d);
return true;
}