Pass source allocation to append method during Blit operation

Change-Id: I48995fd117ee64cfc9ebfc6ccafdc0ac5b5fa043
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
Related-To: NEO-3020
This commit is contained in:
Dunajski, Bartosz
2019-05-16 09:34:29 +02:00
committed by sys_ocldev
parent 061b436e7f
commit 8398a5132c
3 changed files with 8 additions and 8 deletions

View File

@@ -16,7 +16,7 @@ class LinearStream;
template <typename GfxFamily>
struct BlitCommandsHelper {
static size_t estimateBlitCommandsSize(uint64_t copySize);
static void dispatchBlitCommandsForBuffer(Buffer &buffer, LinearStream &linearStream, GraphicsAllocation &hostPtrAllocation, uint64_t copySize);
static void appendBlitCommandsForBuffer(Buffer &buffer, typename GfxFamily::XY_COPY_BLT &blitCmd);
static void dispatchBlitCommandsForBuffer(Buffer &dstBuffer, LinearStream &linearStream, GraphicsAllocation &srcAllocation, uint64_t copySize);
static void appendBlitCommandsForBuffer(Buffer &dstBuffer, GraphicsAllocation &srcAllocation, typename GfxFamily::XY_COPY_BLT &blitCmd);
};
} // namespace NEO

View File

@@ -38,8 +38,8 @@ size_t BlitCommandsHelper<GfxFamily>::estimateBlitCommandsSize(uint64_t copySize
}
template <typename GfxFamily>
void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBuffer(Buffer &buffer, LinearStream &linearStream,
GraphicsAllocation &hostPtrAllocation, uint64_t copySize) {
void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBuffer(Buffer &dstBuffer, LinearStream &linearStream,
GraphicsAllocation &srcAllocation, uint64_t copySize) {
uint64_t sizeToBlit = copySize;
uint64_t width = 1;
uint64_t height = 1;
@@ -70,10 +70,10 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBuffer(Buffer &buffer
bltCmd->setDestinationPitch(static_cast<uint32_t>(width));
bltCmd->setSourcePitch(static_cast<uint32_t>(width));
bltCmd->setDestinationBaseAddress(buffer.getGraphicsAllocation()->getGpuAddress() + offset);
bltCmd->setSourceBaseAddress(hostPtrAllocation.getGpuAddress() + offset);
bltCmd->setDestinationBaseAddress(dstBuffer.getGraphicsAllocation()->getGpuAddress() + offset);
bltCmd->setSourceBaseAddress(srcAllocation.getGpuAddress() + offset);
appendBlitCommandsForBuffer(buffer, *bltCmd);
appendBlitCommandsForBuffer(dstBuffer, srcAllocation, *bltCmd);
auto blitSize = width * height;
sizeToBlit -= blitSize;

View File

@@ -10,6 +10,6 @@
namespace NEO {
template <typename GfxFamily>
void BlitCommandsHelper<GfxFamily>::appendBlitCommandsForBuffer(Buffer &buffer, typename GfxFamily::XY_COPY_BLT &blitCmd) {}
void BlitCommandsHelper<GfxFamily>::appendBlitCommandsForBuffer(Buffer &dstBuffer, GraphicsAllocation &srcAllocation, typename GfxFamily::XY_COPY_BLT &blitCmd) {}
} // namespace NEO