Refactor programming of surface states

Related-To: NEO-5069

Change-Id: Id7442fcdcc8c7df57f00e8dc383c11869bf1a677
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2020-09-15 20:27:18 +02:00
committed by sys_ocldev
parent 0de5e422fb
commit 394e626db9
14 changed files with 54 additions and 68 deletions

View File

@@ -75,14 +75,14 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(z
if (device->getNEODevice()->getDebugger()) {
auto *ssh = commandContainer.getIndirectHeap(NEO::HeapType::SURFACE_STATE);
auto surfaceState = device->getNEODevice()->getDebugger()->getDebugSurfaceReservedSurfaceState(*ssh);
NEO::Device *neoDevice = device->getNEODevice();
auto surfaceState = neoDevice->getDebugger()->getDebugSurfaceReservedSurfaceState(*ssh);
auto debugSurface = device->getDebugSurface();
auto mocs = device->getMOCS(true, false);
NEO::EncodeSurfaceState<GfxFamily>::encodeBuffer(surfaceState, debugSurface->getGpuAddress(),
debugSurface->getUnderlyingBufferSize(),
mocs, true);
NEO::EncodeSurfaceState<GfxFamily>::encodeExtraBufferParams(debugSurface,
device->getNEODevice()->getGmmHelper(), surfaceState, false, false);
debugSurface->getUnderlyingBufferSize(), mocs,
true, false, neoDevice->getNumAvailableDevices(),
debugSurface, neoDevice->getGmmHelper());
}
appendSignalEventPostWalker(hEvent);

View File

@@ -51,10 +51,10 @@ struct KernelHw : public KernelImp {
bufferSizeForSsh = alignUp(bufferSizeForSsh, alignment);
auto mocs = this->module->getDevice()->getMOCS(true, false);
bool requiresCoherency;
NEO::EncodeSurfaceState<GfxFamily>::encodeBuffer(surfaceStateAddress,
bufferAddressForSsh, bufferSizeForSsh, mocs,
requiresCoherency = false);
NEO::Device *neoDevice = module->getDevice()->getNEODevice();
NEO::EncodeSurfaceState<GfxFamily>::encodeBuffer(surfaceStateAddress, bufferAddressForSsh, bufferSizeForSsh, mocs,
true, false, neoDevice->getNumAvailableDevices(),
alloc, neoDevice->getGmmHelper());
}
std::unique_ptr<Kernel> clone() const override {