Revert "refactor: unify blit memory fill methods and pass BlitProperties"
This reverts commit d7ca6568fc
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
parent
7cbe19c5a9
commit
21021f0340
|
@ -2327,15 +2327,15 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendBlitFill(void *ptr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto offset = getAllocationOffsetForAppendBlitFill(ptr, *gpuAllocation);
|
uint64_t offset = getAllocationOffsetForAppendBlitFill(ptr, *gpuAllocation);
|
||||||
|
|
||||||
commandContainer.addToResidencyContainer(gpuAllocation);
|
commandContainer.addToResidencyContainer(gpuAllocation);
|
||||||
uint32_t patternToCommand[4] = {};
|
uint32_t patternToCommand[4] = {};
|
||||||
memcpy_s(&patternToCommand, sizeof(patternToCommand), pattern, patternSize);
|
memcpy_s(&patternToCommand, sizeof(patternToCommand), pattern, patternSize);
|
||||||
|
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryColorFill(gpuAllocation, offset, patternToCommand, patternSize,
|
||||||
auto blitProperties = NEO::BlitProperties::constructPropertiesForMemoryFill(gpuAllocation, size, patternToCommand, patternSize, offset);
|
*commandContainer.getCommandStream(),
|
||||||
|
size,
|
||||||
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryColorFill(blitProperties, *commandContainer.getCommandStream(), neoDevice->getRootDeviceEnvironmentRef());
|
neoDevice->getRootDeviceEnvironmentRef());
|
||||||
dummyBlitWa.isWaRequired = true;
|
dummyBlitWa.isWaRequired = true;
|
||||||
|
|
||||||
appendSignalEventPostWalker(signalEvent, nullptr, nullptr, false, false, true);
|
appendSignalEventPostWalker(signalEvent, nullptr, nullptr, false, false, true);
|
||||||
|
|
|
@ -108,8 +108,8 @@ void BlitCommandsHelper<Family>::appendBlitCommandsForImages(const BlitPropertie
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void BlitCommandsHelper<Family>::dispatchBlitMemoryByteFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment) {
|
void BlitCommandsHelper<Family>::dispatchBlitMemoryByteFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||||
NEO::BlitCommandsHelper<Family>::dispatchBlitMemoryFill(blitProperties, linearStream, rootDeviceEnvironment);
|
NEO::BlitCommandsHelper<Family>::dispatchBlitMemoryFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_8_BIT_COLOR, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
|
|
@ -49,9 +49,9 @@ struct BlitCommandsHelper {
|
||||||
static void dispatchBlitCommandsForBufferRegion(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment);
|
static void dispatchBlitCommandsForBufferRegion(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment);
|
||||||
static void dispatchBlitCommandsForBufferPerRow(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment);
|
static void dispatchBlitCommandsForBufferPerRow(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment);
|
||||||
static void dispatchBlitCommandsForImageRegion(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment);
|
static void dispatchBlitCommandsForImageRegion(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment);
|
||||||
static void dispatchBlitMemoryColorFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment);
|
static void dispatchBlitMemoryColorFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, size_t patternSize, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment);
|
||||||
static void dispatchBlitMemoryByteFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment);
|
static void dispatchBlitMemoryByteFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment);
|
||||||
static void dispatchBlitMemoryFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment);
|
static void dispatchBlitMemoryFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment, COLOR_DEPTH depth, size_t patternSize);
|
||||||
static void dispatchDummyBlit(LinearStream &linearStream, EncodeDummyBlitWaArgs &waArgs);
|
static void dispatchDummyBlit(LinearStream &linearStream, EncodeDummyBlitWaArgs &waArgs);
|
||||||
static size_t getDummyBlitSize(const EncodeDummyBlitWaArgs &waArgs);
|
static size_t getDummyBlitSize(const EncodeDummyBlitWaArgs &waArgs);
|
||||||
static bool isDummyBlitWaNeeded(const EncodeDummyBlitWaArgs &waArgs);
|
static bool isDummyBlitWaNeeded(const EncodeDummyBlitWaArgs &waArgs);
|
||||||
|
@ -67,9 +67,9 @@ struct BlitCommandsHelper {
|
||||||
template <typename T = typename GfxFamily::XY_BLOCK_COPY_BLT>
|
template <typename T = typename GfxFamily::XY_BLOCK_COPY_BLT>
|
||||||
static void appendColorDepth(const BlitProperties &blitProperties, T &blitCmd);
|
static void appendColorDepth(const BlitProperties &blitProperties, T &blitCmd);
|
||||||
static void appendBlitMemoryOptionsForFillBuffer(NEO::GraphicsAllocation *dstAlloc, typename GfxFamily::XY_COLOR_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment);
|
static void appendBlitMemoryOptionsForFillBuffer(NEO::GraphicsAllocation *dstAlloc, typename GfxFamily::XY_COLOR_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||||
static void appendBlitFillCommand(const BlitProperties &blitProperties, typename GfxFamily::XY_COLOR_BLT &blitCmd);
|
static void appendBlitFillCommand(typename GfxFamily::XY_COLOR_BLT &blitCmd);
|
||||||
static void appendBlitMemSetCompressionFormat(void *blitCmd, NEO::GraphicsAllocation *dstAlloc, uint32_t compressionFormat);
|
static void appendBlitMemSetCompressionFormat(void *blitCmd, NEO::GraphicsAllocation *dstAlloc, uint32_t compressionFormat);
|
||||||
static void appendBlitMemSetCommand(const BlitProperties &blitProperties, void *blitCmd);
|
static void appendBlitMemSetCommand(void *blitCmd);
|
||||||
static void appendSurfaceType(const BlitProperties &blitProperties, typename GfxFamily::XY_BLOCK_COPY_BLT &blitCmd);
|
static void appendSurfaceType(const BlitProperties &blitProperties, typename GfxFamily::XY_BLOCK_COPY_BLT &blitCmd);
|
||||||
static void appendTilingEnable(typename GfxFamily::XY_COLOR_BLT &blitCmd);
|
static void appendTilingEnable(typename GfxFamily::XY_COLOR_BLT &blitCmd);
|
||||||
static void appendTilingType(const GMM_TILE_TYPE srcTilingType, const GMM_TILE_TYPE dstTilingType, typename GfxFamily::XY_BLOCK_COPY_BLT &blitCmd);
|
static void appendTilingType(const GMM_TILE_TYPE srcTilingType, const GMM_TILE_TYPE dstTilingType, typename GfxFamily::XY_BLOCK_COPY_BLT &blitCmd);
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include "shared/source/helpers/gfx_core_helper.h"
|
#include "shared/source/helpers/gfx_core_helper.h"
|
||||||
#include "shared/source/helpers/register_offsets.h"
|
#include "shared/source/helpers/register_offsets.h"
|
||||||
#include "shared/source/helpers/timestamp_packet.h"
|
#include "shared/source/helpers/timestamp_packet.h"
|
||||||
#include "shared/source/utilities/lookup_array.h"
|
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
@ -254,31 +253,22 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBufferPerRow(const Bl
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void BlitCommandsHelper<GfxFamily>::appendBlitMemSetCommand(const BlitProperties &blitProperties, void *blitCmd) {}
|
void BlitCommandsHelper<GfxFamily>::appendBlitMemSetCommand(void *blitCmd) {}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment) {
|
void BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment, COLOR_DEPTH depth, size_t patternSize) {
|
||||||
using XY_COLOR_BLT = typename GfxFamily::XY_COLOR_BLT;
|
using XY_COLOR_BLT = typename GfxFamily::XY_COLOR_BLT;
|
||||||
auto blitCmd = GfxFamily::cmdInitXyColorBlt;
|
auto blitCmd = GfxFamily::cmdInitXyColorBlt;
|
||||||
const auto maxWidth = getMaxBlitWidth(rootDeviceEnvironment);
|
const auto maxWidth = getMaxBlitWidth(rootDeviceEnvironment);
|
||||||
const auto maxHeight = getMaxBlitHeight(rootDeviceEnvironment, true);
|
const auto maxHeight = getMaxBlitHeight(rootDeviceEnvironment, true);
|
||||||
|
|
||||||
const LookupArray<size_t, COLOR_DEPTH, 5> colorDepthSize({{
|
blitCmd.setFillColor(pattern);
|
||||||
{1, COLOR_DEPTH::COLOR_DEPTH_8_BIT_COLOR},
|
blitCmd.setColorDepth(depth);
|
||||||
{2, COLOR_DEPTH::COLOR_DEPTH_16_BIT_COLOR},
|
|
||||||
{4, COLOR_DEPTH::COLOR_DEPTH_32_BIT_COLOR},
|
|
||||||
{8, COLOR_DEPTH::COLOR_DEPTH_64_BIT_COLOR},
|
|
||||||
{16, COLOR_DEPTH::COLOR_DEPTH_128_BIT_COLOR},
|
|
||||||
}});
|
|
||||||
|
|
||||||
blitCmd.setFillColor(blitProperties.fillPattern);
|
uint64_t sizeToFill = size / patternSize;
|
||||||
blitCmd.setColorDepth(colorDepthSize.lookUp(blitProperties.fillPatternSize));
|
|
||||||
|
|
||||||
uint64_t sizeToFill = blitProperties.copySize.x / blitProperties.fillPatternSize;
|
|
||||||
uint64_t offset = blitProperties.dstOffset.x;
|
|
||||||
while (sizeToFill != 0) {
|
while (sizeToFill != 0) {
|
||||||
auto tmpCmd = blitCmd;
|
auto tmpCmd = blitCmd;
|
||||||
tmpCmd.setDestinationBaseAddress(ptrOffset(blitProperties.dstAllocation->getGpuAddress(), static_cast<size_t>(offset)));
|
tmpCmd.setDestinationBaseAddress(ptrOffset(dstAlloc->getGpuAddress(), static_cast<size_t>(offset)));
|
||||||
uint64_t height = 0;
|
uint64_t height = 0;
|
||||||
uint64_t width = 0;
|
uint64_t width = 0;
|
||||||
if (sizeToFill <= maxWidth) {
|
if (sizeToFill <= maxWidth) {
|
||||||
|
@ -293,15 +283,15 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryFill(const BlitProperties
|
||||||
}
|
}
|
||||||
tmpCmd.setDestinationX2CoordinateRight(static_cast<uint32_t>(width));
|
tmpCmd.setDestinationX2CoordinateRight(static_cast<uint32_t>(width));
|
||||||
tmpCmd.setDestinationY2CoordinateBottom(static_cast<uint32_t>(height));
|
tmpCmd.setDestinationY2CoordinateBottom(static_cast<uint32_t>(height));
|
||||||
tmpCmd.setDestinationPitch(static_cast<uint32_t>(width * blitProperties.fillPatternSize));
|
tmpCmd.setDestinationPitch(static_cast<uint32_t>(width * patternSize));
|
||||||
|
|
||||||
appendBlitMemoryOptionsForFillBuffer(blitProperties.dstAllocation, tmpCmd, rootDeviceEnvironment);
|
appendBlitMemoryOptionsForFillBuffer(dstAlloc, tmpCmd, rootDeviceEnvironment);
|
||||||
appendBlitFillCommand(blitProperties, tmpCmd);
|
appendBlitFillCommand(tmpCmd);
|
||||||
|
|
||||||
auto cmd = linearStream.getSpaceForCmd<XY_COLOR_BLT>();
|
auto cmd = linearStream.getSpaceForCmd<XY_COLOR_BLT>();
|
||||||
*cmd = tmpCmd;
|
*cmd = tmpCmd;
|
||||||
auto blitSize = width * height;
|
auto blitSize = width * height;
|
||||||
offset += (blitSize * blitProperties.fillPatternSize);
|
offset += (blitSize * patternSize);
|
||||||
sizeToFill -= blitSize;
|
sizeToFill -= blitSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -564,14 +554,25 @@ template <typename GfxFamily>
|
||||||
void BlitCommandsHelper<GfxFamily>::adjustControlSurfaceType(const BlitProperties &blitProperties, typename GfxFamily::XY_BLOCK_COPY_BLT &blitCmd) {}
|
void BlitCommandsHelper<GfxFamily>::adjustControlSurfaceType(const BlitProperties &blitProperties, typename GfxFamily::XY_BLOCK_COPY_BLT &blitCmd) {}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void BlitCommandsHelper<GfxFamily>::appendBlitFillCommand(const BlitProperties &blitProperties, typename GfxFamily::XY_COLOR_BLT &blitCmd) {}
|
void BlitCommandsHelper<GfxFamily>::appendBlitFillCommand(typename GfxFamily::XY_COLOR_BLT &blitCmd) {}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryColorFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment) {
|
void BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryColorFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, size_t patternSize, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||||
if (blitProperties.fillPatternSize == 1) {
|
switch (patternSize) {
|
||||||
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryByteFill(blitProperties, linearStream, rootDeviceEnvironment);
|
case 1:
|
||||||
} else {
|
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryByteFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment);
|
||||||
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryFill(blitProperties, linearStream, rootDeviceEnvironment);
|
break;
|
||||||
|
case 2:
|
||||||
|
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_16_BIT_COLOR, 2);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_32_BIT_COLOR, 4);
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_64_BIT_COLOR, 8);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_128_BIT_COLOR, 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryByteFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment) {
|
void BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryByteFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||||
using MEM_SET = typename Family::MEM_SET;
|
using MEM_SET = typename Family::MEM_SET;
|
||||||
auto blitCmd = Family::cmdInitMemSet;
|
auto blitCmd = Family::cmdInitMemSet;
|
||||||
|
|
||||||
|
@ -23,20 +23,19 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryByteFill(const BlitPropert
|
||||||
blitCmd.setDestinationMOCS(mocs);
|
blitCmd.setDestinationMOCS(mocs);
|
||||||
|
|
||||||
uint32_t compressionFormat = 0;
|
uint32_t compressionFormat = 0;
|
||||||
if (blitProperties.dstAllocation->isCompressionEnabled()) {
|
if (dstAlloc->isCompressionEnabled()) {
|
||||||
auto resourceFormat = blitProperties.dstAllocation->getDefaultGmm()->gmmResourceInfo->getResourceFormat();
|
auto resourceFormat = dstAlloc->getDefaultGmm()->gmmResourceInfo->getResourceFormat();
|
||||||
compressionFormat = static_cast<uint32_t>(rootDeviceEnvironment.getGmmClientContext()->getSurfaceStateCompressionFormat(resourceFormat));
|
compressionFormat = static_cast<uint32_t>(rootDeviceEnvironment.getGmmClientContext()->getSurfaceStateCompressionFormat(resourceFormat));
|
||||||
}
|
}
|
||||||
|
|
||||||
appendBlitMemSetCompressionFormat(&blitCmd, blitProperties.dstAllocation, compressionFormat);
|
appendBlitMemSetCompressionFormat(&blitCmd, dstAlloc, compressionFormat);
|
||||||
|
|
||||||
blitCmd.setFillData(*blitProperties.fillPattern);
|
blitCmd.setFillData(*pattern);
|
||||||
|
|
||||||
auto sizeToFill = blitProperties.copySize.x;
|
auto sizeToFill = size;
|
||||||
uint64_t offset = blitProperties.dstOffset.x;
|
|
||||||
while (sizeToFill != 0) {
|
while (sizeToFill != 0) {
|
||||||
auto tmpCmd = blitCmd;
|
auto tmpCmd = blitCmd;
|
||||||
tmpCmd.setDestinationStartAddress(ptrOffset(blitProperties.dstAllocation->getGpuAddress(), static_cast<size_t>(offset)));
|
tmpCmd.setDestinationStartAddress(ptrOffset(dstAlloc->getGpuAddress(), static_cast<size_t>(offset)));
|
||||||
size_t height = 0;
|
size_t height = 0;
|
||||||
size_t width = 0;
|
size_t width = 0;
|
||||||
if (sizeToFill <= BlitterConstants::maxBlitSetWidth) {
|
if (sizeToFill <= BlitterConstants::maxBlitSetWidth) {
|
||||||
|
@ -53,7 +52,7 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitMemoryByteFill(const BlitPropert
|
||||||
tmpCmd.setFillHeight(static_cast<uint32_t>(height));
|
tmpCmd.setFillHeight(static_cast<uint32_t>(height));
|
||||||
tmpCmd.setDestinationPitch(static_cast<uint32_t>(width));
|
tmpCmd.setDestinationPitch(static_cast<uint32_t>(width));
|
||||||
|
|
||||||
appendBlitMemSetCommand(blitProperties, &tmpCmd);
|
appendBlitMemSetCommand(&tmpCmd);
|
||||||
|
|
||||||
auto cmd = linearStream.getSpaceForCmd<MEM_SET>();
|
auto cmd = linearStream.getSpaceForCmd<MEM_SET>();
|
||||||
*cmd = tmpCmd;
|
*cmd = tmpCmd;
|
||||||
|
|
|
@ -367,10 +367,7 @@ void BlitCommandsHelper<GfxFamily>::dispatchDummyBlit(LinearStream &linearStream
|
||||||
|
|
||||||
appendTilingEnable(blitCmd);
|
appendTilingEnable(blitCmd);
|
||||||
appendBlitMemoryOptionsForFillBuffer(dummyAllocation, blitCmd, *rootDeviceEnvironment);
|
appendBlitMemoryOptionsForFillBuffer(dummyAllocation, blitCmd, *rootDeviceEnvironment);
|
||||||
|
appendBlitFillCommand(blitCmd);
|
||||||
BlitProperties blitProperties = {};
|
|
||||||
|
|
||||||
appendBlitFillCommand(blitProperties, blitCmd);
|
|
||||||
|
|
||||||
auto cmd = linearStream.getSpaceForCmd<XY_COLOR_BLT>();
|
auto cmd = linearStream.getSpaceForCmd<XY_COLOR_BLT>();
|
||||||
*cmd = blitCmd;
|
*cmd = blitCmd;
|
||||||
|
|
|
@ -13,18 +13,6 @@
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
BlitProperties BlitProperties::constructPropertiesForMemoryFill(GraphicsAllocation *dstAllocation, size_t size, uint32_t *pattern, size_t patternSize, size_t offset) {
|
|
||||||
return {
|
|
||||||
.blitDirection = BlitterConstants::BlitDirection::fill,
|
|
||||||
.dstAllocation = dstAllocation,
|
|
||||||
.fillPattern = pattern,
|
|
||||||
.copySize = {size, 1, 1},
|
|
||||||
.dstOffset = {offset, 0, 0},
|
|
||||||
.srcOffset = {0, 0, 0},
|
|
||||||
.fillPatternSize = patternSize,
|
|
||||||
.isSystemMemoryPoolUsed = MemoryPoolHelper::isSystemMemoryPool(dstAllocation->getMemoryPool())};
|
|
||||||
}
|
|
||||||
|
|
||||||
BlitProperties BlitProperties::constructPropertiesForReadWrite(BlitterConstants::BlitDirection blitDirection,
|
BlitProperties BlitProperties::constructPropertiesForReadWrite(BlitterConstants::BlitDirection blitDirection,
|
||||||
CommandStreamReceiver &commandStreamReceiver,
|
CommandStreamReceiver &commandStreamReceiver,
|
||||||
GraphicsAllocation *memObjAllocation,
|
GraphicsAllocation *memObjAllocation,
|
||||||
|
|
|
@ -43,7 +43,6 @@ struct BlitSyncProperties {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BlitProperties {
|
struct BlitProperties {
|
||||||
static BlitProperties constructPropertiesForMemoryFill(GraphicsAllocation *dstAllocation, size_t size, uint32_t *pattern, size_t patternSize, size_t offset);
|
|
||||||
static BlitProperties constructPropertiesForReadWrite(BlitterConstants::BlitDirection blitDirection,
|
static BlitProperties constructPropertiesForReadWrite(BlitterConstants::BlitDirection blitDirection,
|
||||||
CommandStreamReceiver &commandStreamReceiver,
|
CommandStreamReceiver &commandStreamReceiver,
|
||||||
GraphicsAllocation *memObjAllocation,
|
GraphicsAllocation *memObjAllocation,
|
||||||
|
@ -76,7 +75,6 @@ struct BlitProperties {
|
||||||
GraphicsAllocation *dstAllocation = nullptr;
|
GraphicsAllocation *dstAllocation = nullptr;
|
||||||
GraphicsAllocation *srcAllocation = nullptr;
|
GraphicsAllocation *srcAllocation = nullptr;
|
||||||
GraphicsAllocation *clearColorAllocation = nullptr;
|
GraphicsAllocation *clearColorAllocation = nullptr;
|
||||||
uint32_t *fillPattern = nullptr;
|
|
||||||
uint64_t dstGpuAddress = 0;
|
uint64_t dstGpuAddress = 0;
|
||||||
uint64_t srcGpuAddress = 0;
|
uint64_t srcGpuAddress = 0;
|
||||||
|
|
||||||
|
@ -88,7 +86,6 @@ struct BlitProperties {
|
||||||
size_t dstSlicePitch = 0;
|
size_t dstSlicePitch = 0;
|
||||||
size_t srcRowPitch = 0;
|
size_t srcRowPitch = 0;
|
||||||
size_t srcSlicePitch = 0;
|
size_t srcSlicePitch = 0;
|
||||||
size_t fillPatternSize = 0;
|
|
||||||
Vec3<size_t> dstSize = 0;
|
Vec3<size_t> dstSize = 0;
|
||||||
Vec3<size_t> srcSize = 0;
|
Vec3<size_t> srcSize = 0;
|
||||||
size_t bytesPerPixel = 1;
|
size_t bytesPerPixel = 1;
|
||||||
|
|
|
@ -70,10 +70,9 @@ enum class BlitDirection : uint32_t {
|
||||||
bufferToHostPtr,
|
bufferToHostPtr,
|
||||||
hostPtrToBuffer,
|
hostPtrToBuffer,
|
||||||
bufferToBuffer,
|
bufferToBuffer,
|
||||||
fill,
|
|
||||||
hostPtrToImage,
|
hostPtrToImage,
|
||||||
imageToHostPtr,
|
imageToHostPtr,
|
||||||
imageToImage,
|
imageToImage
|
||||||
};
|
};
|
||||||
|
|
||||||
enum PostBlitMode : int32_t {
|
enum PostBlitMode : int32_t {
|
||||||
|
|
|
@ -150,8 +150,8 @@ void BlitCommandsHelper<Family>::appendBlitCommandsBlockCopy(const BlitPropertie
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void BlitCommandsHelper<Family>::dispatchBlitMemoryByteFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment) {
|
void BlitCommandsHelper<Family>::dispatchBlitMemoryByteFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||||
NEO::BlitCommandsHelper<Family>::dispatchBlitMemoryFill(blitProperties, linearStream, rootDeviceEnvironment);
|
NEO::BlitCommandsHelper<Family>::dispatchBlitMemoryFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_8_BIT_COLOR, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
|
|
@ -253,10 +253,7 @@ HWTEST_F(BlitTests, givenMemoryWhenFillPatternWithBlitThenCommandIsProgrammed) {
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, pattern, sizeof(uint32_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), pattern, sizeof(uint32_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -273,9 +270,7 @@ HWTEST_F(BlitTests, givenMemorySizeBiggerThanMaxWidthButLessThanTwiceMaxWidthWhe
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitWidth) - 1,
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitWidth) - 1,
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), pattern, sizeof(uint32_t), 0);
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, pattern, sizeof(uint32_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -295,10 +290,7 @@ HWTEST_F(BlitTests, givenMemoryPointerOffsetVerifyCorrectDestinationBaseAddress)
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0x234, pattern, sizeof(uint32_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), pattern, sizeof(uint32_t), 0x234);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -324,10 +316,7 @@ HWTEST_F(BlitTests, givenMemorySizeTwiceBiggerThanMaxWidthWhenFillPatternWithBli
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitWidth * sizeof(uint32_t)),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitWidth * sizeof(uint32_t)),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, pattern, sizeof(uint32_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), pattern, sizeof(uint32_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -354,10 +343,7 @@ HWTEST_F(BlitTests, givenMemorySizeIsLessThanTwicenMaxWidthWhenFillPatternWithBl
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, ((BlitterConstants::maxBlitWidth + 1) * sizeof(uint32_t)),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, ((BlitterConstants::maxBlitWidth + 1) * sizeof(uint32_t)),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, pattern, sizeof(uint32_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), pattern, sizeof(uint32_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include "shared/source/execution_environment/execution_environment.h"
|
#include "shared/source/execution_environment/execution_environment.h"
|
||||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||||
#include "shared/source/helpers/blit_commands_helper.h"
|
#include "shared/source/helpers/blit_commands_helper.h"
|
||||||
#include "shared/source/helpers/blit_properties.h"
|
|
||||||
#include "shared/source/helpers/definitions/command_encoder_args.h"
|
#include "shared/source/helpers/definitions/command_encoder_args.h"
|
||||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||||
#include "shared/test/common/fixtures/device_fixture.h"
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
|
@ -54,9 +53,7 @@ class GivenLinearStreamWhenCallDispatchBlitMemoryColorFillThenCorrectDepthIsProg
|
||||||
canonizedGpuAddress);
|
canonizedGpuAddress);
|
||||||
uint32_t patternToCommand[4];
|
uint32_t patternToCommand[4];
|
||||||
memset(patternToCommand, 4, patternSize);
|
memset(patternToCommand, 4, patternSize);
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), patternToCommand, patternSize, 0);
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, patternToCommand, patternSize, stream, mockAllocation.getUnderlyingBufferSize(), device->getRootDeviceEnvironmentRef());
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, device->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
|
|
@ -25,10 +25,7 @@ HWTEST2_F(BlitTests, givenOneBytePatternWhenFillPatternWithBlitThenCommandIsProg
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -44,10 +41,7 @@ HWTEST2_F(BlitTests, givenDeviceWithoutDefaultGmmWhenAppendBlitCommandsForVillBu
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -70,10 +64,8 @@ HWTEST2_F(BlitTests, givenGmmWithDisabledCompresionWhenAppendBlitCommandsForVill
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
|
||||||
mockAllocation.setGmm(gmm.get(), 0u);
|
mockAllocation.setGmm(gmm.get(), 0u);
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -98,10 +90,7 @@ HWTEST2_F(BlitTests, givenGmmWithEnabledCompresionWhenAppendBlitCommandsForVillB
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
mockAllocation.setGmm(gmm.get(), 0u);
|
mockAllocation.setGmm(gmm.get(), 0u);
|
||||||
auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironmentRef();
|
auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironmentRef();
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), rootDeviceEnvironment);
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, rootDeviceEnvironment);
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -129,8 +118,7 @@ HWTEST2_F(BlitTests, givenOverridedMocksValueWhenAppendBlitCommandsForVillBuffer
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -153,10 +141,7 @@ HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndSystemMe
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -187,9 +172,7 @@ HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndLocalMem
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::localMemory, MemoryManager::maxOsContextCount);
|
MemoryPool::localMemory, MemoryManager::maxOsContextCount);
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -210,9 +193,7 @@ HWTEST2_F(BlitTests, givenMemorySizeBiggerThanMaxWidthButLessThanTwiceMaxWidthWh
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitSetWidth) - 1,
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitSetWidth) - 1,
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -232,10 +213,7 @@ HWTEST2_F(BlitTests, givenMemorySizeTwiceBiggerThanMaxWidthWhenFillPatternWithBl
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitSetWidth),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitSetWidth),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
|
|
@ -25,10 +25,7 @@ HWTEST2_F(BlitTests, givenOneBytePatternWhenFillPatternWithBlitThenCommandIsProg
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -48,10 +45,7 @@ HWTEST2_F(BlitTests, givenOverridedMocksValueWhenAppendBlitCommandsForVillBuffer
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -75,10 +69,7 @@ HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndSystemMe
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -102,10 +93,7 @@ HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndLocalMem
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, sizeof(uint32_t),
|
||||||
MemoryPool::localMemory, MemoryManager::maxOsContextCount);
|
MemoryPool::localMemory, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -125,10 +113,7 @@ HWTEST2_F(BlitTests, givenMemorySizeBiggerThanMaxWidthButLessThanTwiceMaxWidthWh
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitSetWidth) - 1,
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitSetWidth) - 1,
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -148,10 +133,7 @@ HWTEST2_F(BlitTests, givenMemorySizeTwiceBiggerThanMaxWidthWhenFillPatternWithBl
|
||||||
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory,
|
||||||
reinterpret_cast<void *>(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitSetWidth),
|
reinterpret_cast<void *>(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitSetWidth),
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef());
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
@ -176,9 +158,7 @@ HWTEST2_F(BlitTests, givenGmmWithEnabledCompresionWhenAppendBlitCommandsForFillB
|
||||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||||
mockAllocation.setGmm(gmm.get(), 0u);
|
mockAllocation.setGmm(gmm.get(), 0u);
|
||||||
auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironmentRef();
|
auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironmentRef();
|
||||||
auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0);
|
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), rootDeviceEnvironment);
|
||||||
|
|
||||||
BlitCommandsHelper<FamilyType>::dispatchBlitMemoryColorFill(blitProperties, stream, rootDeviceEnvironment);
|
|
||||||
GenCmdList cmdList;
|
GenCmdList cmdList;
|
||||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||||
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));
|
||||||
|
|
Loading…
Reference in New Issue