mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Adding new interface to cooperate with hw context state Simplify programming removing unnecessary functions Code optimization that stop using expensive call and instead stores configuration parameter Related-To: NEO-5019 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
65 lines
1.8 KiB
C++
65 lines
1.8 KiB
C++
/*
|
|
* Copyright (C) 2020-2022 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include "shared/source/command_container/command_encoder.h"
|
|
#include "shared/source/kernel/kernel_descriptor.h"
|
|
#include "shared/test/common/fixtures/device_fixture.h"
|
|
#include "shared/test/common/test_macros/hw_test.h"
|
|
|
|
namespace NEO {
|
|
|
|
class CommandEncodeStatesFixture : public DeviceFixture {
|
|
public:
|
|
class MyMockCommandContainer : public CommandContainer {
|
|
public:
|
|
using CommandContainer::dirtyHeaps;
|
|
};
|
|
|
|
void setUp();
|
|
void tearDown();
|
|
|
|
EncodeDispatchKernelArgs createDefaultDispatchKernelArgs(Device *device,
|
|
DispatchKernelEncoderI *dispatchInterface,
|
|
const void *threadGroupDimensions,
|
|
bool requiresUncachedMocs);
|
|
|
|
template <typename FamilyType>
|
|
EncodeStateBaseAddressArgs<FamilyType> createDefaultEncodeStateBaseAddressArgs(
|
|
CommandContainer *container,
|
|
typename FamilyType::STATE_BASE_ADDRESS &sbaCmd,
|
|
uint32_t statelessMocs) {
|
|
EncodeStateBaseAddressArgs<FamilyType> args = {
|
|
container,
|
|
sbaCmd,
|
|
statelessMocs,
|
|
false,
|
|
false,
|
|
false};
|
|
return args;
|
|
}
|
|
|
|
KernelDescriptor descriptor;
|
|
std::unique_ptr<MyMockCommandContainer> cmdContainer;
|
|
};
|
|
|
|
} // namespace NEO
|
|
|
|
struct WalkerThreadFixture {
|
|
void setUp();
|
|
void tearDown() {}
|
|
|
|
uint32_t startWorkGroup[3];
|
|
uint32_t numWorkGroups[3];
|
|
uint32_t workGroupSizes[3];
|
|
uint32_t simd;
|
|
uint32_t localIdDimensions;
|
|
uint32_t requiredWorkGroupOrder;
|
|
};
|
|
|
|
using WalkerThreadTest = Test<WalkerThreadFixture>;
|