Return error code from submit() to application.

Related-To: NEO-3741

Change-Id: I0e0ff6606eb6a8a77673949955c8e799689017b6
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
This commit is contained in:
Pawel Wilma
2019-11-24 14:50:41 +01:00
committed by sys_ocldev
parent fe474379b2
commit 472a75912d
39 changed files with 187 additions and 77 deletions

View File

@@ -75,8 +75,9 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
this->latestSentTaskCount = latestSentTaskCount;
}
void flushBatchedSubmissions() override {
bool flushBatchedSubmissions() override {
flushBatchedSubmissionsCalled = true;
return true;
}
void initProgrammingFlags() override {
initProgrammingFlagsCalled = true;

View File

@@ -9,9 +9,8 @@
#include "runtime/os_interface/os_interface.h"
FlushStamp MockCommandStreamReceiver::flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) {
FlushStamp stamp = 0;
return stamp;
bool MockCommandStreamReceiver::flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) {
return true;
}
CompletionStamp MockCommandStreamReceiver::flushTask(

View File

@@ -114,8 +114,8 @@ class MockCsr : public MockCsrBase<GfxFamily> {
MockCsr(int32_t &execStamp, ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex) : BaseClass(execStamp, executionEnvironment, rootDeviceIndex) {
}
FlushStamp flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override {
return 0;
bool flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override {
return true;
}
CompletionStamp flushTask(
@@ -185,12 +185,12 @@ class MockCsrHw2 : public CommandStreamReceiverHw<GfxFamily> {
bool peekMediaVfeStateDirty() const { return mediaVfeStateDirty; }
FlushStamp flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override {
bool flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override {
flushCalledCount++;
recordedCommandBuffer->batchBuffer = batchBuffer;
copyOfAllocations = allocationsForResidency;
flushStamp->setStamp(flushStamp->peekStamp() + 1);
return flushStamp->peekStamp();
return true;
}
CompletionStamp flushTask(LinearStream &commandStream, size_t commandStreamStart,
@@ -265,7 +265,7 @@ class MockCommandStreamReceiver : public CommandStreamReceiver {
waitForCompletionWithTimeoutCalled++;
return true;
}
FlushStamp flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
bool flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
bool isMultiOsContextCapable() const { return multiOsContextCapable; }
@@ -279,10 +279,11 @@ class MockCommandStreamReceiver : public CommandStreamReceiver {
DispatchFlags &dispatchFlags,
Device &device) override;
void flushBatchedSubmissions() override {
bool flushBatchedSubmissions() override {
if (flushBatchedSubmissionsCallCounter) {
(*flushBatchedSubmissionsCallCounter)++;
}
return true;
}
void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool quickKmdSleep, bool forcePowerSavingMode) override {