fix: Add asserts to ensure NonCopyable and NonMovable n/n

Related-To: NEO-14068

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2025-02-18 17:32:35 +00:00
committed by Compute-Runtime-Automation
parent aeff5513c3
commit b60c02d597
36 changed files with 71 additions and 51 deletions

View File

@@ -9,6 +9,7 @@
#include "shared/source/command_container/cmdcontainer.h"
#include "shared/source/command_stream/csr_definitions.h"
#include "shared/source/command_stream/task_count_helper.h"
#include "shared/source/helpers/non_copyable_or_moveable.h"
#include "shared/source/helpers/pipe_control_args.h"
#include "shared/source/utilities/idlist.h"
@@ -72,10 +73,8 @@ struct BatchBuffer {
bool taskCountUpdateOnly = false;
};
struct CommandBuffer : public IDNode<CommandBuffer> {
struct CommandBuffer : public IDNode<CommandBuffer>, NEO::NonCopyableAndNonMovableClass {
CommandBuffer(Device &device);
CommandBuffer &operator=(const CommandBuffer &) = delete;
CommandBuffer &operator=(CommandBuffer &&) = delete;
~CommandBuffer() override;
ResidencyContainer surfaces;
BatchBuffer batchBuffer;
@@ -89,6 +88,8 @@ struct CommandBuffer : public IDNode<CommandBuffer> {
Device &device;
};
static_assert(NEO::NonCopyableAndNonMovable<CommandBuffer>);
struct CommandBufferList : public IDList<CommandBuffer, false, true, false> {};
using ResourcePackage = StackVec<GraphicsAllocation *, 128>;