mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 08:07:19 +08:00
Simplify OCL image implementation for SKL and later
Related-To: NEO-6466 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
cf4ce308d9
commit
a27c7af2da
@@ -7,37 +7,15 @@
|
||||
|
||||
#include "shared/source/gen11/hw_cmds_base.h"
|
||||
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/mem_obj/image.inl"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
typedef ICLFamily Family;
|
||||
using Family = ICLFamily;
|
||||
static auto gfxCore = IGFX_GEN11_CORE;
|
||||
|
||||
template <typename GfxFamily>
|
||||
void ImageHw<GfxFamily>::setMediaSurfaceRotation(void *memory) {
|
||||
using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE;
|
||||
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
|
||||
|
||||
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
|
||||
|
||||
surfaceState->setRotation(MEDIA_SURFACE_STATE::ROTATION_NO_ROTATION_OR_0_DEGREE);
|
||||
surfaceState->setXOffset(0);
|
||||
surfaceState->setYOffset(0);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void ImageHw<GfxFamily>::setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) {
|
||||
using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE;
|
||||
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
|
||||
|
||||
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
|
||||
|
||||
surfaceState->setSurfaceMemoryObjectControlStateIndexToMocsTables(value);
|
||||
}
|
||||
template <>
|
||||
void ImageHw<Family>::appendSurfaceStateParams(RENDER_SURFACE_STATE *surfaceState, uint32_t rootDeviceIndex, bool useGlobalAtomics) {
|
||||
if (hasAlphaChannel(&imageFormat)) {
|
||||
@@ -45,5 +23,7 @@ void ImageHw<Family>::appendSurfaceStateParams(RENDER_SURFACE_STATE *surfaceStat
|
||||
}
|
||||
}
|
||||
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
} // namespace NEO
|
||||
|
||||
// factory initializer
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
|
||||
@@ -5,40 +5,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/hw_cmds.h"
|
||||
#include "shared/source/gen12lp/hw_cmds_base.h"
|
||||
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/mem_obj/image.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
typedef TGLLPFamily Family;
|
||||
using Family = TGLLPFamily;
|
||||
static auto gfxCore = IGFX_GEN12LP_CORE;
|
||||
|
||||
template <typename GfxFamily>
|
||||
void ImageHw<GfxFamily>::setMediaSurfaceRotation(void *memory) {
|
||||
using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE;
|
||||
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
|
||||
|
||||
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
|
||||
|
||||
surfaceState->setRotation(MEDIA_SURFACE_STATE::ROTATION_NO_ROTATION_OR_0_DEGREE);
|
||||
surfaceState->setXOffset(0);
|
||||
surfaceState->setYOffset(0);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void ImageHw<GfxFamily>::setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) {
|
||||
using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE;
|
||||
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
|
||||
|
||||
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
|
||||
|
||||
surfaceState->setSurfaceMemoryObjectControlStateIndexToMocsTables(value);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
#include "opencl/source/mem_obj/image_tgllp_and_later.inl"
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
// clang-format on
|
||||
} // namespace NEO
|
||||
#include "opencl/source/mem_obj/image_tgllp_and_later.inl"
|
||||
|
||||
// factory initializer
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
|
||||
@@ -5,16 +5,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen8/hw_cmds.h"
|
||||
#include "shared/source/gen8/hw_cmds_base.h"
|
||||
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/mem_obj/image.inl"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
typedef BDWFamily Family;
|
||||
using Family = BDWFamily;
|
||||
static auto gfxCore = IGFX_GEN8_CORE;
|
||||
|
||||
template <>
|
||||
@@ -23,5 +22,7 @@ void ImageHw<Family>::setMediaSurfaceRotation(void *) {}
|
||||
template <>
|
||||
void ImageHw<Family>::setSurfaceMemoryObjectControlStateIndexToMocsTable(void *, uint32_t) {}
|
||||
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
} // namespace NEO
|
||||
|
||||
// factory initializer
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
|
||||
@@ -5,39 +5,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds.h"
|
||||
#include "shared/source/gen9/hw_cmds_base.h"
|
||||
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/mem_obj/image.inl"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
typedef SKLFamily Family;
|
||||
using Family = SKLFamily;
|
||||
static auto gfxCore = IGFX_GEN9_CORE;
|
||||
|
||||
template <typename GfxFamily>
|
||||
void ImageHw<GfxFamily>::setMediaSurfaceRotation(void *memory) {
|
||||
using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE;
|
||||
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
|
||||
|
||||
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
|
||||
|
||||
surfaceState->setRotation(MEDIA_SURFACE_STATE::ROTATION_NO_ROTATION_OR_0_DEGREE);
|
||||
surfaceState->setXOffset(0);
|
||||
surfaceState->setYOffset(0);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void ImageHw<GfxFamily>::setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) {
|
||||
using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE;
|
||||
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
|
||||
|
||||
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
|
||||
|
||||
surfaceState->setSurfaceMemoryObjectControlStateIndexToMocsTables(value);
|
||||
}
|
||||
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
} // namespace NEO
|
||||
|
||||
// factory initializer
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
|
||||
@@ -201,4 +201,26 @@ void ImageHw<GfxFamily>::transformImage3dTo2dArray(void *memory) {
|
||||
surfaceState->setSurfaceArray(true);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline void ImageHw<GfxFamily>::setMediaSurfaceRotation(void *memory) {
|
||||
using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE;
|
||||
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
|
||||
|
||||
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
|
||||
|
||||
surfaceState->setRotation(MEDIA_SURFACE_STATE::ROTATION_NO_ROTATION_OR_0_DEGREE);
|
||||
surfaceState->setXOffset(0);
|
||||
surfaceState->setYOffset(0);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline void ImageHw<GfxFamily>::setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) {
|
||||
using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE;
|
||||
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
|
||||
|
||||
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
|
||||
|
||||
surfaceState->setSurfaceMemoryObjectControlStateIndexToMocsTables(value);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -5,9 +5,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template class ImageHw<Family>;
|
||||
template <>
|
||||
void populateFactoryTable<ImageHw<Family>>() {
|
||||
extern ImageFactoryFuncs imageFactory[IGFX_MAX_CORE];
|
||||
imageFactory[gfxCore].createImageFunction = ImageHw<Family>::create;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -5,6 +5,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/resource_info.h"
|
||||
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
void ImageHw<Family>::appendSurfaceStateDepthParams(RENDER_SURFACE_STATE *surfaceState, Gmm *gmm) {
|
||||
if (gmm) {
|
||||
@@ -12,3 +18,4 @@ void ImageHw<Family>::appendSurfaceStateDepthParams(RENDER_SURFACE_STATE *surfac
|
||||
surfaceState->setDepthStencilResource(isDepthResource);
|
||||
}
|
||||
}
|
||||
} // namespace NEO
|
||||
@@ -5,30 +5,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/context/context.h"
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
void ImageHw<Family>::setMediaSurfaceRotation(void *memory) {
|
||||
using MEDIA_SURFACE_STATE = typename Family::MEDIA_SURFACE_STATE;
|
||||
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
|
||||
|
||||
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
|
||||
|
||||
surfaceState->setRotation(MEDIA_SURFACE_STATE::ROTATION_NO_ROTATION_OR_0_DEGREE);
|
||||
surfaceState->setXOffset(0);
|
||||
surfaceState->setYOffset(0);
|
||||
}
|
||||
|
||||
template <>
|
||||
void ImageHw<Family>::setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) {
|
||||
using MEDIA_SURFACE_STATE = typename Family::MEDIA_SURFACE_STATE;
|
||||
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
|
||||
|
||||
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
|
||||
|
||||
surfaceState->setSurfaceMemoryObjectControlStateIndexToMocsTables(value);
|
||||
}
|
||||
|
||||
template <>
|
||||
void ImageHw<Family>::appendSurfaceStateParams(Family::RENDER_SURFACE_STATE *surfaceState, uint32_t rootDeviceIndex, bool useGlobalAtomics) {
|
||||
auto imageCtxType = this->context->peekContextType();
|
||||
@@ -51,5 +31,4 @@ void ImageHw<Family>::appendSurfaceStateParams(Family::RENDER_SURFACE_STATE *sur
|
||||
surfaceState->setDisableSupportForMultiGpuPartialWrites(!!DebugManager.flags.ForceMultiGpuPartialWrites.get());
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -5,25 +5,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
|
||||
#include "shared/source/xe_hp_core/hw_cmds.h"
|
||||
#include "shared/source/xe_hp_core/hw_cmds_base.h"
|
||||
|
||||
#include "opencl/source/context/context.h"
|
||||
#include "opencl/source/mem_obj/image.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = XeHpFamily;
|
||||
static auto gfxCore = IGFX_XE_HP_CORE;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
#include "opencl/source/mem_obj/image_tgllp_and_later.inl"
|
||||
#include "opencl/source/mem_obj/image_xehp_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
// clang-format off
|
||||
#include "opencl/source/mem_obj/image_tgllp_and_later.inl"
|
||||
// factory initializer
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
// clang-format on
|
||||
} // namespace NEO
|
||||
|
||||
@@ -5,24 +5,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
|
||||
#include "shared/source/xe_hpc_core/hw_cmds.h"
|
||||
#include "shared/source/xe_hpc_core/hw_cmds_base.h"
|
||||
|
||||
#include "opencl/source/context/context.h"
|
||||
#include "opencl/source/mem_obj/image.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = XE_HPC_COREFamily;
|
||||
static auto gfxCore = IGFX_XE_HPC_CORE;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
#include "opencl/source/mem_obj/image_tgllp_and_later.inl"
|
||||
#include "opencl/source/mem_obj/image_xehp_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
// clang-format off
|
||||
#include "opencl/source/mem_obj/image_tgllp_and_later.inl"
|
||||
// factory initializer
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
// clang-format on
|
||||
} // namespace NEO
|
||||
|
||||
@@ -5,25 +5,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/gmm_helper/client_context/gmm_client_context.h"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds.h"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_base.h"
|
||||
|
||||
#include "opencl/source/context/context.h"
|
||||
#include "opencl/source/mem_obj/image.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = XE_HPG_COREFamily;
|
||||
static auto gfxCore = IGFX_XE_HPG_CORE;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
#include "opencl/source/mem_obj/image_tgllp_and_later.inl"
|
||||
#include "opencl/source/mem_obj/image_xehp_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
// clang-format off
|
||||
#include "opencl/source/mem_obj/image_tgllp_and_later.inl"
|
||||
// factory initializer
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
// clang-format on
|
||||
} // namespace NEO
|
||||
|
||||
@@ -29,9 +29,11 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef ::testing::Test XeHPAndLaterBufferTests;
|
||||
using XeHPAndLaterBufferTests = ::testing::Test;
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenContextTypeDefaultWhenBufferIsWritableAndOnlyOneTileIsAvailableThenRemainFlagsToTrue) {
|
||||
using isXePlatform = IsWithinGfxCore<IGFX_XE_HP_CORE, IGFX_XE_HPC_CORE>;
|
||||
|
||||
HWTEST2_F(XeHPAndLaterBufferTests, givenContextTypeDefaultWhenBufferIsWritableAndOnlyOneTileIsAvailableThenRemainFlagsToTrue, isXePlatform) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(1);
|
||||
initPlatform();
|
||||
@@ -95,7 +97,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenDebugFlagSetWhenProgr
|
||||
}
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenContextTypeDefaultWhenBufferIsWritableThenFlipPartialFlagsToFalse) {
|
||||
HWTEST2_F(XeHPAndLaterBufferTests, givenContextTypeDefaultWhenBufferIsWritableThenFlipPartialFlagsToFalse, isXePlatform) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(4);
|
||||
initPlatform();
|
||||
@@ -125,7 +127,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenContextTypeDefaultWhe
|
||||
EXPECT_FALSE(surfaceState.getDisableSupportForMultiGpuPartialWrites());
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenContextTypeUnrestrictiveWhenBufferIsWritableThenFlipPartialFlagsToFalse) {
|
||||
HWTEST2_F(XeHPAndLaterBufferTests, givenContextTypeUnrestrictiveWhenBufferIsWritableThenFlipPartialFlagsToFalse, isXePlatform) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(4);
|
||||
initPlatform();
|
||||
@@ -155,7 +157,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenContextTypeUnrestrict
|
||||
EXPECT_FALSE(surfaceState.getDisableSupportForMultiGpuPartialWrites());
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenContextTypeDefaultWhenBufferIsNotWritableThenRemainPartialFlagsToTrue) {
|
||||
HWTEST2_F(XeHPAndLaterBufferTests, givenContextTypeDefaultWhenBufferIsNotWritableThenRemainPartialFlagsToTrue, isXePlatform) {
|
||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||
MockContext context;
|
||||
context.contextType = ContextType::CONTEXT_TYPE_DEFAULT;
|
||||
@@ -183,7 +185,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenContextTypeDefaultWhe
|
||||
EXPECT_TRUE(surfaceState.getDisableSupportForMultiGpuPartialWrites());
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenContextTypeSpecializedWhenBufferIsWritableThenRemainPartialFlagsToTrue) {
|
||||
HWTEST2_F(XeHPAndLaterBufferTests, givenContextTypeSpecializedWhenBufferIsWritableThenRemainPartialFlagsToTrue, isXePlatform) {
|
||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||
MockContext context;
|
||||
context.contextType = ContextType::CONTEXT_TYPE_SPECIALIZED;
|
||||
@@ -211,7 +213,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenContextTypeSpecialize
|
||||
EXPECT_TRUE(surfaceState.getDisableSupportForMultiGpuPartialWrites());
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenDebugFlagForMultiTileSupportWhenSurfaceStateIsSetThenValuesMatch) {
|
||||
HWTEST2_F(XeHPAndLaterBufferTests, givenDebugFlagForMultiTileSupportWhenSurfaceStateIsSetThenValuesMatch, isXePlatform) {
|
||||
DebugManagerStateRestore restore;
|
||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||
MockContext context;
|
||||
@@ -247,7 +249,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenDebugFlagForMultiTile
|
||||
EXPECT_EQ(1u, surfaceState.getDisableSupportForMultiGpuPartialWrites());
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenNullContextWhenBufferAllocationIsNullThenRemainPartialFlagsToTrue) {
|
||||
HWTEST2_F(XeHPAndLaterBufferTests, givenNullContextWhenBufferAllocationIsNullThenRemainPartialFlagsToTrue, isXePlatform) {
|
||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||
RENDER_SURFACE_STATE surfaceState = FamilyType::cmdInitRenderSurfaceState;
|
||||
|
||||
@@ -270,7 +272,7 @@ struct MultiGpuGlobalAtomicsBufferTest : public XeHPAndLaterBufferTests,
|
||||
public ::testing::WithParamInterface<std::tuple<unsigned int, unsigned int, bool, bool, bool>> {
|
||||
};
|
||||
|
||||
HWCMDTEST_P(IGFX_XE_HP_CORE, MultiGpuGlobalAtomicsBufferTest, givenSetArgStatefulCalledThenDisableSupportForMultiGpuAtomicsIsSetCorrectly) {
|
||||
HWTEST2_P(MultiGpuGlobalAtomicsBufferTest, givenSetArgStatefulCalledThenDisableSupportForMultiGpuAtomicsIsSetCorrectly, isXePlatform) {
|
||||
unsigned int numAvailableDevices, bufferFlags;
|
||||
bool useGlobalAtomics, areMultipleSubDevicesInContext, enableMultiGpuAtomicsOptimization;
|
||||
std::tie(numAvailableDevices, bufferFlags, useGlobalAtomics, areMultipleSubDevicesInContext, enableMultiGpuAtomicsOptimization) = GetParam();
|
||||
@@ -317,7 +319,7 @@ HWCMDTEST_P(IGFX_XE_HP_CORE, MultiGpuGlobalAtomicsBufferTest, givenSetArgStatefu
|
||||
EXPECT_EQ(!enabled, surfaceState.getDisableSupportForMultiGpuAtomics());
|
||||
}
|
||||
|
||||
HWCMDTEST_P(IGFX_XE_HP_CORE, MultiGpuGlobalAtomicsBufferTest, givenSetSurfaceStateCalledThenDisableSupportForMultiGpuAtomicsIsSetCorrectly) {
|
||||
HWTEST2_P(MultiGpuGlobalAtomicsBufferTest, givenSetSurfaceStateCalledThenDisableSupportForMultiGpuAtomicsIsSetCorrectly, isXePlatform) {
|
||||
unsigned int numAvailableDevices, bufferFlags;
|
||||
bool useGlobalAtomics, areMultipleSubDevicesInContext, enableMultiGpuAtomicsOptimization;
|
||||
std::tie(numAvailableDevices, bufferFlags, useGlobalAtomics, areMultipleSubDevicesInContext, enableMultiGpuAtomicsOptimization) = GetParam();
|
||||
|
||||
@@ -29,8 +29,9 @@
|
||||
using namespace NEO;
|
||||
|
||||
using XeHPAndLaterImageTests = ::testing::Test;
|
||||
using isXePlatform = IsWithinGfxCore<IGFX_XE_HP_CORE, IGFX_XE_HPC_CORE>;
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterImageTests, givenContextTypeDefaultWhenImageIsWritableAndOnlyOneTileIsAvailableThenRemainFlagsToTrue) {
|
||||
HWTEST2_F(XeHPAndLaterImageTests, givenContextTypeDefaultWhenImageIsWritableAndOnlyOneTileIsAvailableThenRemainFlagsToTrue, isXePlatform) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(1);
|
||||
initPlatform();
|
||||
@@ -69,7 +70,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterImageTests, givenContextTypeDefaultWhen
|
||||
EXPECT_TRUE(surfaceState.getDisableSupportForMultiGpuPartialWrites());
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterImageTests, givenContextTypeDefaultWhenImageIsWritableThenFlipPartialFlagsToFalse) {
|
||||
HWTEST2_F(XeHPAndLaterImageTests, givenContextTypeDefaultWhenImageIsWritableThenFlipPartialFlagsToFalse, isXePlatform) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(4);
|
||||
initPlatform();
|
||||
@@ -106,7 +107,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterImageTests, givenContextTypeDefaultWhen
|
||||
EXPECT_FALSE(surfaceState.getDisableSupportForMultiGpuPartialWrites());
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterImageTests, givenDebugFlagForMultiTileSupportWhenSurfaceStateIsProgrammedThenItHasDesiredValues) {
|
||||
HWTEST2_F(XeHPAndLaterImageTests, givenDebugFlagForMultiTileSupportWhenSurfaceStateIsProgrammedThenItHasDesiredValues, isXePlatform) {
|
||||
DebugManagerStateRestore restorer;
|
||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||
MockContext context;
|
||||
@@ -149,7 +150,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterImageTests, givenDebugFlagForMultiTileS
|
||||
EXPECT_EQ(1u, surfaceState.getDisableSupportForMultiGpuPartialWrites());
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterImageTests, givenContextTypeUnrestrictiveWhenImageIsWritableThenFlipPartialFlagsToFalse) {
|
||||
HWTEST2_F(XeHPAndLaterImageTests, givenContextTypeUnrestrictiveWhenImageIsWritableThenFlipPartialFlagsToFalse, isXePlatform) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(4);
|
||||
initPlatform();
|
||||
@@ -186,7 +187,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterImageTests, givenContextTypeUnrestricti
|
||||
EXPECT_FALSE(surfaceState.getDisableSupportForMultiGpuPartialWrites());
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterImageTests, givenContextTypeDefaultWhenImageIsNotWritableThenRemainPartialFlagsToTrue) {
|
||||
HWTEST2_F(XeHPAndLaterImageTests, givenContextTypeDefaultWhenImageIsNotWritableThenRemainPartialFlagsToTrue, isXePlatform) {
|
||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||
MockContext context;
|
||||
context.contextType = ContextType::CONTEXT_TYPE_DEFAULT;
|
||||
@@ -221,7 +222,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterImageTests, givenContextTypeDefaultWhen
|
||||
EXPECT_TRUE(surfaceState.getDisableSupportForMultiGpuPartialWrites());
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterImageTests, givenContextTypeSpecializedWhenImageIsWritableThenRemainPartialFlagsToTrue) {
|
||||
HWTEST2_F(XeHPAndLaterImageTests, givenContextTypeSpecializedWhenImageIsWritableThenRemainPartialFlagsToTrue, isXePlatform) {
|
||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||
MockContext context;
|
||||
context.contextType = ContextType::CONTEXT_TYPE_SPECIALIZED;
|
||||
@@ -260,7 +261,7 @@ struct MultiGpuGlobalAtomicsImageTest : public XeHPAndLaterImageTests,
|
||||
public ::testing::WithParamInterface<std::tuple<unsigned int, unsigned int, ContextType, bool, bool>> {
|
||||
};
|
||||
|
||||
HWCMDTEST_P(IGFX_XE_HP_CORE, MultiGpuGlobalAtomicsImageTest, givenAppendSurfaceStateParamCalledThenDisableSupportForMultiGpuAtomicsIsSetCorrectly) {
|
||||
HWTEST2_P(MultiGpuGlobalAtomicsImageTest, givenAppendSurfaceStateParamCalledThenDisableSupportForMultiGpuAtomicsIsSetCorrectly, isXePlatform) {
|
||||
unsigned int numAvailableDevices, memFlags;
|
||||
ContextType contextType;
|
||||
bool useGlobalAtomics, enableMultiGpuAtomicsOptimization;
|
||||
|
||||
Reference in New Issue
Block a user