Defer direct submission control until first submit

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2021-10-29 11:54:52 +00:00
committed by Compute-Runtime-Automation
parent 0cde8eb7ff
commit 4ea452040d
6 changed files with 47 additions and 0 deletions

View File

@@ -13,6 +13,7 @@
#include "shared/source/command_stream/preemption.h"
#include "shared/source/command_stream/scratch_space_controller.h"
#include "shared/source/device/device.h"
#include "shared/source/direct_submission/direct_submission_controller.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/gmm_helper/page_table_mngr.h"
#include "shared/source/helpers/array_count.h"
@@ -385,6 +386,13 @@ AubSubCaptureStatus CommandStreamReceiver::checkAndActivateAubSubCapture(const s
void CommandStreamReceiver::addAubComment(const char *comment) {}
void CommandStreamReceiver::startControllingDirectSubmissions() {
auto controller = this->executionEnvironment.directSubmissionController.get();
if (controller) {
controller->startControlling();
}
}
GraphicsAllocation *CommandStreamReceiver::allocateDebugSurface(size_t size) {
UNRECOVERABLE_IF(debugSurface != nullptr);
debugSurface = getMemoryManager()->allocateGraphicsMemoryWithProperties({rootDeviceIndex, size, GraphicsAllocation::AllocationType::INTERNAL_HOST_MEMORY, getOsContext().getDeviceBitfield()});

View File

@@ -235,6 +235,8 @@ class CommandStreamReceiver {
uint32_t getRootDeviceIndex() { return rootDeviceIndex; }
void startControllingDirectSubmissions();
virtual bool initDirectSubmission(Device &device, OsContext &osContext) {
return true;
}