mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
Add debug flag to read back command buffer pointer
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
88c16542a1
commit
68351249d1
@@ -153,6 +153,14 @@ SubmissionStatus DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBu
|
||||
} else {
|
||||
this->flushStamp->setStamp(bb->peekHandle());
|
||||
}
|
||||
|
||||
auto readBackMode = DebugManager.flags.ReadBackCommandBufferAllocation.get();
|
||||
bool readBackAllowed = ((batchBuffer.commandBufferAllocation->isAllocatedInLocalMemoryPool() && readBackMode == 1) || readBackMode == 2);
|
||||
|
||||
if (readBackAllowed) {
|
||||
readBackAllocation(ptrOffset(batchBuffer.commandBufferAllocation->getUnderlyingBuffer(), batchBuffer.startOffset));
|
||||
}
|
||||
|
||||
auto ret = this->flushInternal(batchBuffer, allocationsForResidency);
|
||||
|
||||
if (this->gemCloseWorkerOperationMode == gemCloseWorkerMode::gemCloseWorkerActive) {
|
||||
@@ -167,6 +175,11 @@ SubmissionStatus DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBu
|
||||
return SubmissionStatus::SUCCESS;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void DrmCommandStreamReceiver<GfxFamily>::readBackAllocation(void *source) {
|
||||
reserved = *reinterpret_cast<volatile uint32_t *>(source);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void DrmCommandStreamReceiver<GfxFamily>::printBOsForSubmit(ResidencyContainer &allocationsForResidency, GraphicsAllocation &cmdBufferAllocation) {
|
||||
if (DebugManager.flags.PrintBOsForSubmit.get()) {
|
||||
|
||||
Reference in New Issue
Block a user