mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
Command stream receiver: handle flush method failure when flushing BCS task
Related-To: NEO-7412 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
27d042107a
commit
33e1b3a717
@@ -928,4 +928,15 @@ LogicalStateHelper *CommandStreamReceiver::getLogicalStateHelper() const {
|
||||
return logicalStateHelper.get();
|
||||
}
|
||||
|
||||
uint32_t CompletionStamp::getTaskCountFromSubmissionStatusError(SubmissionStatus status) {
|
||||
switch (status) {
|
||||
case SubmissionStatus::OUT_OF_HOST_MEMORY:
|
||||
return CompletionStamp::outOfHostMemory;
|
||||
case SubmissionStatus::OUT_OF_MEMORY:
|
||||
return CompletionStamp::outOfDeviceMemory;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1164,7 +1164,10 @@ uint32_t CommandStreamReceiverHw<GfxFamily>::flushBcsTask(const BlitPropertiesCo
|
||||
commandStream.getGraphicsAllocation()->updateTaskCount(newTaskCount, this->osContext->getContextId());
|
||||
commandStream.getGraphicsAllocation()->updateResidencyTaskCount(newTaskCount, this->osContext->getContextId());
|
||||
|
||||
flush(batchBuffer, getResidencyAllocations());
|
||||
auto flushSubmissionStatus = flush(batchBuffer, getResidencyAllocations());
|
||||
if (flushSubmissionStatus != SubmissionStatus::SUCCESS) {
|
||||
return CompletionStamp::getTaskCountFromSubmissionStatusError(flushSubmissionStatus);
|
||||
}
|
||||
makeSurfacePackNonResident(getResidencyAllocations(), true);
|
||||
|
||||
if (updateTag) {
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
|
||||
namespace NEO {
|
||||
using FlushStamp = uint64_t;
|
||||
enum class SubmissionStatus : uint32_t;
|
||||
struct CompletionStamp {
|
||||
static uint32_t getTaskCountFromSubmissionStatusError(SubmissionStatus submissionStatus);
|
||||
|
||||
uint32_t taskCount;
|
||||
uint32_t taskLevel;
|
||||
FlushStamp flushStamp;
|
||||
|
||||
Reference in New Issue
Block a user