Skip to content

Commit 97ecf58

Browse files
refactor: reduce batch buffer struct size
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
1 parent 76e7433 commit 97ecf58

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

shared/source/command_stream/submissions_aggregator.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2023 Intel Corporation
2+
* Copyright (C) 2018-2024 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -100,10 +100,9 @@ NEO::BatchBuffer::BatchBuffer(GraphicsAllocation *commandBufferAllocation, size_
100100
bool hasRelaxedOrderingDependencies, bool dispatchMonitorFence)
101101
: commandBufferAllocation(commandBufferAllocation), startOffset(startOffset),
102102
chainedBatchBufferStartOffset(chainedBatchBufferStartOffset), taskStartAddress(taskStartAddress), chainedBatchBuffer(chainedBatchBuffer),
103-
lowPriority(lowPriority),
104-
throttle(throttle), sliceCount(sliceCount),
105-
usedSize(usedSize), stream(stream), endCmdPtr(endCmdPtr), numCsrClients(numCsrClients), hasStallingCmds(hasStallingCmds),
106-
hasRelaxedOrderingDependencies(hasRelaxedOrderingDependencies), dispatchMonitorFence(dispatchMonitorFence) {}
103+
sliceCount(sliceCount), usedSize(usedSize), stream(stream), endCmdPtr(endCmdPtr), numCsrClients(numCsrClients),
104+
throttle(throttle), dispatchMonitorFence(dispatchMonitorFence), hasRelaxedOrderingDependencies(hasRelaxedOrderingDependencies),
105+
hasStallingCmds(hasStallingCmds), lowPriority(lowPriority) {}
107106

108107
NEO::CommandBuffer::CommandBuffer(Device &device) : device(device) {
109108
flushStamp.reset(new FlushStampTracker(false));

shared/source/command_stream/submissions_aggregator.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2023 Intel Corporation
2+
* Copyright (C) 2018-2024 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -43,8 +43,6 @@ struct BatchBuffer {
4343
uint64_t taskStartAddress = 0; // if task not available, use CSR stream
4444

4545
GraphicsAllocation *chainedBatchBuffer = nullptr;
46-
bool lowPriority = false;
47-
QueueThrottle throttle = QueueThrottle::MEDIUM;
4846
uint64_t sliceCount = QueueSliceCount::defaultSliceCount;
4947
size_t usedSize = 0u;
5048

@@ -53,11 +51,13 @@ struct BatchBuffer {
5351
void *endCmdPtr = nullptr;
5452
uint32_t numCsrClients = 0;
5553

56-
bool hasStallingCmds = false;
57-
bool hasRelaxedOrderingDependencies = false;
58-
bool ringBufferRestartRequest = false;
54+
QueueThrottle throttle = QueueThrottle::MEDIUM;
5955
bool disableFlatRingBuffer = false;
6056
bool dispatchMonitorFence = false;
57+
bool hasRelaxedOrderingDependencies = false;
58+
bool hasStallingCmds = false;
59+
bool lowPriority = false;
60+
bool ringBufferRestartRequest = false;
6161
};
6262

6363
struct CommandBuffer : public IDNode<CommandBuffer> {

0 commit comments

Comments
 (0)