Program MI_SEMAPHORE_WAIT for dependencies during blit operations

Change-Id: I8b0e467886bfb23d026a0c13be514343a22a20a1
Related-To: NEO-3020
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-05-20 12:00:02 +02:00
committed by sys_ocldev
parent e6c7c862ed
commit b82cdd6b8e
11 changed files with 100 additions and 27 deletions

View File

@@ -15,7 +15,7 @@ class LinearStream;
template <typename GfxFamily>
struct BlitCommandsHelper {
static size_t estimateBlitCommandsSize(uint64_t copySize);
static size_t estimateBlitCommandsSize(uint64_t copySize, CsrDependencies &csrDependencies);
static void dispatchBlitCommandsForBuffer(Buffer &dstBuffer, Buffer &srcBuffer, LinearStream &linearStream, uint64_t copySize);
static void appendBlitCommandsForBuffer(Buffer &dstBuffer, Buffer &srcBuffer, typename GfxFamily::XY_COPY_BLT &blitCmd);
};

View File

@@ -10,7 +10,7 @@
namespace NEO {
template <typename GfxFamily>
size_t BlitCommandsHelper<GfxFamily>::estimateBlitCommandsSize(uint64_t copySize) {
size_t BlitCommandsHelper<GfxFamily>::estimateBlitCommandsSize(uint64_t copySize, CsrDependencies &csrDependencies) {
size_t numberOfBlits = 0;
uint64_t sizeToBlit = copySize;
uint64_t width = 1;
@@ -30,7 +30,8 @@ size_t BlitCommandsHelper<GfxFamily>::estimateBlitCommandsSize(uint64_t copySize
numberOfBlits++;
}
size_t size = (sizeof(typename GfxFamily::XY_COPY_BLT) * numberOfBlits) +
size_t size = TimestampPacketHelper::getRequiredCmdStreamSize<GfxFamily>(csrDependencies) +
(sizeof(typename GfxFamily::XY_COPY_BLT) * numberOfBlits) +
sizeof(typename GfxFamily::MI_FLUSH_DW) +
sizeof(typename GfxFamily::MI_BATCH_BUFFER_END);