Use non-coherent buffers as kernel args in L0
Change-Id: I78f699779d65b694fa8de82c8e19dc07f7c176c3 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
parent
3b6f9b7cb6
commit
03c8bbf054
|
@ -81,7 +81,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(z
|
||||||
auto mocs = device->getMOCS(true, false);
|
auto mocs = device->getMOCS(true, false);
|
||||||
NEO::EncodeSurfaceState<GfxFamily>::encodeBuffer(surfaceState, debugSurface->getGpuAddress(),
|
NEO::EncodeSurfaceState<GfxFamily>::encodeBuffer(surfaceState, debugSurface->getGpuAddress(),
|
||||||
debugSurface->getUnderlyingBufferSize(), mocs,
|
debugSurface->getUnderlyingBufferSize(), mocs,
|
||||||
true, false, neoDevice->getNumAvailableDevices(),
|
false, false, neoDevice->getNumAvailableDevices(),
|
||||||
debugSurface, neoDevice->getGmmHelper());
|
debugSurface, neoDevice->getGmmHelper());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ struct KernelHw : public KernelImp {
|
||||||
auto mocs = this->module->getDevice()->getMOCS(true, false);
|
auto mocs = this->module->getDevice()->getMOCS(true, false);
|
||||||
NEO::Device *neoDevice = module->getDevice()->getNEODevice();
|
NEO::Device *neoDevice = module->getDevice()->getNEODevice();
|
||||||
NEO::EncodeSurfaceState<GfxFamily>::encodeBuffer(surfaceStateAddress, bufferAddressForSsh, bufferSizeForSsh, mocs,
|
NEO::EncodeSurfaceState<GfxFamily>::encodeBuffer(surfaceStateAddress, bufferAddressForSsh, bufferSizeForSsh, mocs,
|
||||||
true, false, neoDevice->getNumAvailableDevices(),
|
false, false, neoDevice->getNumAvailableDevices(),
|
||||||
alloc, neoDevice->getGmmHelper());
|
alloc, neoDevice->getGmmHelper());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -444,7 +444,7 @@ HWTEST_F(L0DebuggerTest, givenDebuggerWhenAppendingKernelToCommandListThenBindle
|
||||||
EXPECT_EQ(debugSurface->getGpuAddress(), debugSurfaceState->getSurfaceBaseAddress());
|
EXPECT_EQ(debugSurface->getGpuAddress(), debugSurfaceState->getSurfaceBaseAddress());
|
||||||
|
|
||||||
EXPECT_EQ(RENDER_SURFACE_STATE::SURFACE_TYPE_SURFTYPE_BUFFER, debugSurfaceState->getSurfaceType());
|
EXPECT_EQ(RENDER_SURFACE_STATE::SURFACE_TYPE_SURFTYPE_BUFFER, debugSurfaceState->getSurfaceType());
|
||||||
EXPECT_EQ(RENDER_SURFACE_STATE::COHERENCY_TYPE_IA_COHERENT, debugSurfaceState->getCoherencyType());
|
EXPECT_EQ(RENDER_SURFACE_STATE::COHERENCY_TYPE_GPU_COHERENT, debugSurfaceState->getCoherencyType());
|
||||||
}
|
}
|
||||||
|
|
||||||
using IsSklOrAbove = IsAtLeastProduct<IGFX_SKYLAKE>;
|
using IsSklOrAbove = IsAtLeastProduct<IGFX_SKYLAKE>;
|
||||||
|
|
|
@ -101,7 +101,8 @@ HWTEST2_F(ModuleTest, givenNonPatchedTokenThenSurfaceBaseAddressIsCorrectlySet,
|
||||||
auto argInfo = kernelImp->getImmutableData()->getDescriptor().payloadMappings.explicitArgs[argIndex].as<NEO::ArgDescPointer>();
|
auto argInfo = kernelImp->getImmutableData()->getDescriptor().payloadMappings.explicitArgs[argIndex].as<NEO::ArgDescPointer>();
|
||||||
auto surfaceStateAddressRaw = ptrOffset(kernelImp->getSurfaceStateHeapData(), argInfo.bindful);
|
auto surfaceStateAddressRaw = ptrOffset(kernelImp->getSurfaceStateHeapData(), argInfo.bindful);
|
||||||
auto surfaceStateAddress = reinterpret_cast<RENDER_SURFACE_STATE *>(const_cast<unsigned char *>(surfaceStateAddressRaw));
|
auto surfaceStateAddress = reinterpret_cast<RENDER_SURFACE_STATE *>(const_cast<unsigned char *>(surfaceStateAddressRaw));
|
||||||
EXPECT_EQ(reinterpret_cast<void *>(surfaceStateAddress->getSurfaceBaseAddress()), devicePtr);
|
EXPECT_EQ(devicePtr, reinterpret_cast<void *>(surfaceStateAddress->getSurfaceBaseAddress()));
|
||||||
|
EXPECT_EQ(RENDER_SURFACE_STATE::COHERENCY_TYPE_GPU_COHERENT, surfaceStateAddress->getCoherencyType());
|
||||||
|
|
||||||
Kernel::fromHandle(kernelHandle)->destroy();
|
Kernel::fromHandle(kernelHandle)->destroy();
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ HWTEST_F(CommandEncodeStatesTest, givenCreatedSurfaceStateBufferWhenAllocationPr
|
||||||
length.Length = static_cast<uint32_t>(allocSize - 1);
|
length.Length = static_cast<uint32_t>(allocSize - 1);
|
||||||
GraphicsAllocation allocation(0, GraphicsAllocation::AllocationType::UNKNOWN, cpuAddr, gpuAddr, 0u, allocSize, MemoryPool::MemoryNull, 1);
|
GraphicsAllocation allocation(0, GraphicsAllocation::AllocationType::UNKNOWN, cpuAddr, gpuAddr, 0u, allocSize, MemoryPool::MemoryNull, 1);
|
||||||
EncodeSurfaceState<FamilyType>::encodeBuffer(stateBuffer, gpuAddr, allocSize, 1,
|
EncodeSurfaceState<FamilyType>::encodeBuffer(stateBuffer, gpuAddr, allocSize, 1,
|
||||||
true, false, 1u,
|
false, false, 1u,
|
||||||
&allocation, pDevice->getGmmHelper());
|
&allocation, pDevice->getGmmHelper());
|
||||||
EXPECT_EQ(length.SurfaceState.Depth + 1u, state->getDepth());
|
EXPECT_EQ(length.SurfaceState.Depth + 1u, state->getDepth());
|
||||||
EXPECT_EQ(length.SurfaceState.Width + 1u, state->getWidth());
|
EXPECT_EQ(length.SurfaceState.Width + 1u, state->getWidth());
|
||||||
|
@ -78,6 +78,7 @@ HWTEST_F(CommandEncodeStatesTest, givenCreatedSurfaceStateBufferWhenAllocationNo
|
||||||
nullptr, pDevice->getGmmHelper());
|
nullptr, pDevice->getGmmHelper());
|
||||||
|
|
||||||
EXPECT_EQ(RENDER_SURFACE_STATE::SURFACE_TYPE_SURFTYPE_NULL, state->getSurfaceType());
|
EXPECT_EQ(RENDER_SURFACE_STATE::SURFACE_TYPE_SURFTYPE_NULL, state->getSurfaceType());
|
||||||
|
EXPECT_EQ(RENDER_SURFACE_STATE::COHERENCY_TYPE_IA_COHERENT, state->getCoherencyType());
|
||||||
|
|
||||||
alignedFree(stateBuffer);
|
alignedFree(stateBuffer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue