Setup surface state for debugSurface at offset zero

Related-To: NEO-4767

Change-Id: I5be24712795f18865037ea5d3b42604579027969
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2020-07-23 10:56:08 +02:00
committed by sys_ocldev
parent 05990b628b
commit 5de52badbe
9 changed files with 98 additions and 3 deletions

View File

@@ -12,6 +12,7 @@
#include "opencl/source/command_queue/hardware_interface.h"
#include "opencl/source/helpers/hardware_commands_helper.h"
#include "opencl/source/helpers/task_information.h"
#include "opencl/source/mem_obj/buffer.h"
namespace NEO {
@@ -90,6 +91,14 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
commandStream = &commandQueue.getCS(0);
}
if (commandQueue.getDevice().getDebugger()) {
auto debugSurface = commandQueue.getGpgpuCommandStreamReceiver().getDebugSurfaceAllocation();
void *addressToPatch = reinterpret_cast<void *>(debugSurface->getGpuAddress());
size_t sizeToPatch = debugSurface->getUnderlyingBufferSize();
Buffer::setSurfaceState(&commandQueue.getDevice(), commandQueue.getDevice().getDebugger()->getDebugSurfaceReservedSurfaceState(*ssh),
sizeToPatch, addressToPatch, 0, debugSurface, 0, 0);
}
auto numSupportedDevices = commandQueue.getGpgpuCommandStreamReceiver().getOsContext().getNumSupportedDevices();
TimestampPacketHelper::programCsrDependencies<GfxFamily>(*commandStream, csrDependencies, numSupportedDevices);