|
7 | 7 |
|
8 | 8 | #pragma once |
9 | 9 |
|
| 10 | +#include "shared/source/command_container/command_encoder.h" |
| 11 | +#include "shared/source/command_stream/command_stream_receiver_hw.h" |
10 | 12 | #include "shared/source/command_stream/wait_status.h" |
11 | 13 | #include "shared/source/helpers/hw_helper.h" |
12 | 14 | #include "shared/source/helpers/hw_info.h" |
@@ -143,6 +145,32 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::executeCommandListImm |
143 | 145 | this->csr->makeResident(*this->device->getDebugSurface()); |
144 | 146 | } |
145 | 147 |
|
| 148 | + NEO::Device *neoDevice = this->device->getNEODevice(); |
| 149 | + if (neoDevice->getDebugger() && this->immediateCmdListHeapSharing) { |
| 150 | + auto csrHw = static_cast<NEO::CommandStreamReceiverHw<GfxFamily> *>(this->csr); |
| 151 | + auto sshStateCopy = csrHw->getSshState(); |
| 152 | + bool sshDirty = sshStateCopy.updateAndCheck(ssh); |
| 153 | + |
| 154 | + if (sshDirty) { |
| 155 | + auto surfaceStateSpace = neoDevice->getDebugger()->getDebugSurfaceReservedSurfaceState(*ssh); |
| 156 | + auto surfaceState = GfxFamily::cmdInitRenderSurfaceState; |
| 157 | + |
| 158 | + NEO::EncodeSurfaceStateArgs args; |
| 159 | + args.outMemory = &surfaceState; |
| 160 | + args.graphicsAddress = this->device->getDebugSurface()->getGpuAddress(); |
| 161 | + args.size = this->device->getDebugSurface()->getUnderlyingBufferSize(); |
| 162 | + args.mocs = this->device->getMOCS(false, false); |
| 163 | + args.numAvailableDevices = neoDevice->getNumGenericSubDevices(); |
| 164 | + args.allocation = this->device->getDebugSurface(); |
| 165 | + args.gmmHelper = neoDevice->getGmmHelper(); |
| 166 | + args.useGlobalAtomics = false; |
| 167 | + args.areMultipleSubDevicesInContext = false; |
| 168 | + args.isDebuggerActive = true; |
| 169 | + NEO::EncodeSurfaceState<GfxFamily>::encodeBuffer(args); |
| 170 | + *reinterpret_cast<typename GfxFamily::RENDER_SURFACE_STATE *>(surfaceStateSpace) = surfaceState; |
| 171 | + } |
| 172 | + } |
| 173 | + |
146 | 174 | auto completionStamp = this->csr->flushTask( |
147 | 175 | *commandStream, |
148 | 176 | commandStreamStart, |
|
0 commit comments