mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
fix: Reset direct submission when reinitialize context
Resolves: HSD-15018564496 Related-To: NEO-16651 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5cf3eeb615
commit
498f62d7a0
@@ -380,6 +380,7 @@ class CommandStreamReceiver : NEO::NonCopyableAndNonMovableClass {
|
||||
}
|
||||
|
||||
virtual void stopDirectSubmission(bool blocking, bool needsLock) {}
|
||||
virtual void resetDirectSubmission(){};
|
||||
|
||||
virtual QueueThrottle getLastDirectSubmissionThrottle() = 0;
|
||||
|
||||
|
||||
@@ -159,6 +159,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
|
||||
uint32_t getDirectSubmissionRelaxedOrderingQueueDepth() const override;
|
||||
|
||||
void stopDirectSubmission(bool blocking, bool needsLock) override;
|
||||
void resetDirectSubmission() override;
|
||||
|
||||
QueueThrottle getLastDirectSubmissionThrottle() override;
|
||||
|
||||
|
||||
@@ -1430,6 +1430,13 @@ inline void CommandStreamReceiverHw<GfxFamily>::stopDirectSubmission(bool blocki
|
||||
}
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline void CommandStreamReceiverHw<GfxFamily>::resetDirectSubmission() {
|
||||
this->unregisterDirectSubmissionFromController();
|
||||
this->blitterDirectSubmission.reset();
|
||||
this->directSubmission.reset();
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline QueueThrottle CommandStreamReceiverHw<GfxFamily>::getLastDirectSubmissionThrottle() {
|
||||
if (this->isAnyDirectSubmissionEnabled()) {
|
||||
|
||||
@@ -996,6 +996,17 @@ struct MockWddmDrmDirectSubmissionDispatchCommandBuffer : public MockWddmDirectS
|
||||
uint32_t lastNotifyKmdParamValue = false;
|
||||
};
|
||||
|
||||
HWTEST_TEMPLATED_F(WddmCommandStreamMockGdiTest, givenCsrWhenResetDirectSubmissionThenObjectDeleted) {
|
||||
using Dispatcher = RenderDispatcher<FamilyType>;
|
||||
using MockSubmission = MockWddmDrmDirectSubmissionDispatchCommandBuffer<FamilyType, Dispatcher>;
|
||||
auto mockCsr = static_cast<MockWddmCsr<FamilyType> *>(csr);
|
||||
mockCsr->directSubmission = std::make_unique<MockSubmission>(*device->getDefaultEngine().commandStreamReceiver);
|
||||
|
||||
mockCsr->resetDirectSubmission();
|
||||
|
||||
EXPECT_EQ(mockCsr->directSubmission.get(), nullptr);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(WddmCommandStreamMockGdiTest, givenCsrWhenFlushMonitorFenceThenFlushMonitorFenceOnDirectSubmission) {
|
||||
using Dispatcher = RenderDispatcher<FamilyType>;
|
||||
using MockSubmission = MockWddmDrmDirectSubmissionDispatchCommandBuffer<FamilyType, Dispatcher>;
|
||||
|
||||
Reference in New Issue
Block a user