mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
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:
@@ -765,7 +765,6 @@ bool Wddm::submit(uint64_t commandBuffer, size_t size, void *commandHeader, OsCo
|
||||
osContext.getResidencyController().getMonitoredFence().currentFenceValue++;
|
||||
}
|
||||
getDeviceState();
|
||||
UNRECOVERABLE_IF(!status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class WddmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily>
|
||||
WddmCommandStreamReceiver(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
|
||||
virtual ~WddmCommandStreamReceiver();
|
||||
|
||||
FlushStamp flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
|
||||
bool flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override;
|
||||
void makeResident(GraphicsAllocation &gfxAllocation) override;
|
||||
void processResidency(const ResidencyContainer &allocationsForResidency) override;
|
||||
void processEviction() override;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "runtime/device/device.h"
|
||||
#include "runtime/gen_common/hw_cmds.h"
|
||||
#include "runtime/gmm_helper/page_table_mngr.h"
|
||||
#include "runtime/helpers/flush_stamp.h"
|
||||
#include "runtime/helpers/gmm_callbacks.h"
|
||||
#include "runtime/mem_obj/mem_obj.h"
|
||||
#include "runtime/os_interface/windows/wddm/wddm.h"
|
||||
@@ -25,6 +26,7 @@
|
||||
#include "runtime/os_interface/windows/os_context_win.h"
|
||||
#include "runtime/os_interface/windows/os_interface.h"
|
||||
#include "runtime/os_interface/windows/wddm_memory_manager.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
// Initialize COMMAND_BUFFER_HEADER Type PatchList Streamer Perf Tag
|
||||
@@ -61,7 +63,7 @@ WddmCommandStreamReceiver<GfxFamily>::~WddmCommandStreamReceiver() {
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
FlushStamp WddmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) {
|
||||
bool WddmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) {
|
||||
auto commandStreamAddress = ptrOffset(batchBuffer.commandBufferAllocation->getGpuAddress(), batchBuffer.startOffset);
|
||||
|
||||
if (this->dispatchMode == DispatchMode::ImmediateDispatch) {
|
||||
@@ -95,9 +97,10 @@ FlushStamp WddmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer,
|
||||
}
|
||||
|
||||
auto osContextWin = static_cast<OsContextWin *>(osContext);
|
||||
wddm->submit(commandStreamAddress, batchBuffer.usedSize - batchBuffer.startOffset, commandBufferHeader, *osContextWin);
|
||||
auto status = wddm->submit(commandStreamAddress, batchBuffer.usedSize - batchBuffer.startOffset, commandBufferHeader, *osContextWin);
|
||||
|
||||
return osContextWin->getResidencyController().getMonitoredFence().lastSubmittedFence;
|
||||
flushStamp->setStamp(osContextWin->getResidencyController().getMonitoredFence().lastSubmittedFence);
|
||||
return status;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
||||
Reference in New Issue
Block a user