mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Fixed TBX with AUB dump mode without AubStream
Related-To: NEO-3150 Change-Id: I9ee7fc3c44f3021c61db7c27c01522cbe7d7445d Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
0c9995d447
commit
cc6a94b5b6
@@ -125,6 +125,7 @@ void *CommandQueue::cpuDataTransferHandler(TransferProperties &transferPropertie
|
||||
if (!unmapInfo.readOnly) {
|
||||
auto graphicsAllocation = transferProperties.memObj->getGraphicsAllocation();
|
||||
graphicsAllocation->setAubWritable(true);
|
||||
graphicsAllocation->setTbxWritable(true);
|
||||
}
|
||||
break;
|
||||
case CL_COMMAND_READ_BUFFER:
|
||||
|
||||
@@ -614,6 +614,10 @@ void AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, voi
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(GraphicsAllocation &gfxAllocation) {
|
||||
if (!gfxAllocation.isAubWritable()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ownsLock = !gfxAllocation.isLocked();
|
||||
|
||||
uint64_t gpuAddress;
|
||||
|
||||
@@ -102,7 +102,7 @@ bool CommandStreamReceiverSimulatedCommonHw<GfxFamily>::getParametersForWriteMem
|
||||
size = gmm->gmmResourceInfo->getSizeAllocation();
|
||||
}
|
||||
|
||||
if ((size == 0) || !graphicsAllocation.isAubWritable())
|
||||
if (size == 0)
|
||||
return false;
|
||||
|
||||
if (cpuAddress == nullptr) {
|
||||
|
||||
@@ -365,6 +365,10 @@ void TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, voi
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(GraphicsAllocation &gfxAllocation) {
|
||||
if (!gfxAllocation.isTbxWritable()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint64_t gpuAddress;
|
||||
void *cpuAddress;
|
||||
size_t size;
|
||||
@@ -379,7 +383,7 @@ bool TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(GraphicsAllocation &gfxA
|
||||
}
|
||||
|
||||
if (AubHelper::isOneTimeAubWritableAllocationType(gfxAllocation.getAllocationType())) {
|
||||
gfxAllocation.setAubWritable(false);
|
||||
gfxAllocation.setTbxWritable(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -411,7 +415,7 @@ template <typename GfxFamily>
|
||||
void TbxCommandStreamReceiverHw<GfxFamily>::processResidency(ResidencyContainer &allocationsForResidency) {
|
||||
for (auto &gfxAllocation : allocationsForResidency) {
|
||||
if (!writeMemory(*gfxAllocation)) {
|
||||
DEBUG_BREAK_IF(!((gfxAllocation->getUnderlyingBufferSize() == 0) || !gfxAllocation->isAubWritable()));
|
||||
DEBUG_BREAK_IF(!((gfxAllocation->getUnderlyingBufferSize() == 0) || !gfxAllocation->isTbxWritable()));
|
||||
}
|
||||
gfxAllocation->updateResidencyTaskCount(this->taskCount + 1, this->osContext->getContextId());
|
||||
}
|
||||
|
||||
@@ -133,6 +133,8 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
|
||||
void setAubWritable(bool writable) { aubInfo.aubWritable = writable; }
|
||||
bool isAubWritable() const { return aubInfo.aubWritable; }
|
||||
void setTbxWritable(bool writable) { aubInfo.tbxWritable = writable; }
|
||||
bool isTbxWritable() const { return aubInfo.tbxWritable; }
|
||||
void setAllocDumpable(bool dumpable) { aubInfo.allocDumpable = dumpable; }
|
||||
bool isAllocDumpable() const { return aubInfo.allocDumpable; }
|
||||
bool isMemObjectsAllocationWithWritableFlags() const { return aubInfo.memObjectsAllocationWithWritableFlags; }
|
||||
@@ -210,6 +212,7 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
};
|
||||
struct AubInfo {
|
||||
bool aubWritable = true;
|
||||
bool tbxWritable = true;
|
||||
bool allocDumpable = false;
|
||||
bool memObjectsAllocationWithWritableFlags = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user