Do not allocate surface if not needed.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2021-08-03 11:42:37 +00:00
committed by Compute-Runtime-Automation
parent b454bcbfe7
commit d3fd5077e7
2 changed files with 28 additions and 1 deletions

View File

@@ -8,6 +8,7 @@
#include "shared/source/command_stream/command_stream_receiver.h"
#include "shared/source/built_ins/built_ins.h"
#include "shared/source/command_container/implicit_scaling.h"
#include "shared/source/command_stream/experimental_command_buffer.h"
#include "shared/source/command_stream/preemption.h"
#include "shared/source/command_stream/scratch_space_controller.h"
@@ -51,7 +52,7 @@ CommandStreamReceiver::CommandStreamReceiver(ExecutionEnvironment &executionEnvi
}
internalAllocationStorage = std::make_unique<InternalAllocationStorage>(*this);
if (deviceBitfield.count() > 1 && DebugManager.flags.EnableStaticPartitioning.get() != 0) {
if (deviceBitfield.count() > 1 && DebugManager.flags.EnableStaticPartitioning.get() != 0 && NEO::ImplicitScalingHelper::isImplicitScalingEnabled(deviceBitfield, true)) {
this->staticWorkPartitioningEnabled = true;
}
}