Skip to content

Commit 0c933d8

Browse files
Update RENDER_SURFACE_STATE for Xe Hpc
For Xe Hp and later rename RSS tile mode enum from YMAJOR to TILE4 Related-To: NEO-6466 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
1 parent e379249 commit 0c933d8

File tree

8 files changed

+113
-113
lines changed

8 files changed

+113
-113
lines changed

level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,7 @@ TEST_F(KernelImplicitArgTests, givenKernelWithoutImplicitArgsWhenPatchingImplici
23312331

23322332
using MultiTileModuleTest = Test<MultiTileModuleFixture>;
23332333

2334-
HWTEST2_F(MultiTileModuleTest, GivenMultiTileDeviceWhenSettingKernelArgAndSurfaceStateThenMultiTileFlagsAreSetCorrectly, isXeHpOrXeHpcCore) {
2334+
HWTEST2_F(MultiTileModuleTest, GivenMultiTileDeviceWhenSettingKernelArgAndSurfaceStateThenMultiTileFlagsAreSetCorrectly, IsXeHpCore) {
23352335
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
23362336
ze_kernel_desc_t desc = {};
23372337
desc.pKernelName = kernelName.c_str();

opencl/test/unit_test/mem_obj/image_set_arg_tests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ HWTEST_F(ImageSetArgTest, givenImageArraySizeGreaterThanOneButTypeIsNotImageArra
265265

266266
ClSurfaceFormatInfo surfaceFormatInfo{};
267267
surfaceFormatInfo.surfaceFormat.GMMSurfaceFormat = GMM_FORMAT_B8G8R8A8_UNORM;
268+
surfaceFormatInfo.surfaceFormat.ImageElementSizeInBytes = 4u;
268269
imageInfo.surfaceFormat = &surfaceFormatInfo.surfaceFormat;
269270
cl_image_desc imageDesc = Image2dDefaults::imageDesc;
270271
imageDesc.image_array_size = 3u;

opencl/test/unit_test/mem_obj/nv12_image_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2021 Intel Corporation
2+
* Copyright (C) 2018-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -421,7 +421,7 @@ HWTEST_F(Nv12ImageTest, WhenSettingImageArgUvPlaneImageThenOffsetSurfaceBaseAddr
421421

422422
auto tileMode = RENDER_SURFACE_STATE::TILE_MODE_LINEAR;
423423
if (imageNV12->isTiledAllocation()) {
424-
tileMode = RENDER_SURFACE_STATE::TILE_MODE_YMAJOR;
424+
tileMode = static_cast<typename RENDER_SURFACE_STATE::TILE_MODE>(MockGmmResourceInfo::yMajorTileModeValue);
425425
}
426426

427427
EXPECT_EQ(tileMode, surfaceState.getTileMode());

shared/source/generated/xe_hp_core/hw_cmds_generated_xe_hp_core.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ typedef struct tagRENDER_SURFACE_STATE {
13441344
TILE_MODE_LINEAR = 0x0,
13451345
TILE_MODE_TILE64 = 0x1,
13461346
TILE_MODE_XMAJOR = 0x2,
1347-
TILE_MODE_YMAJOR = 0x3, // patched - old name for TILE_MODE_TILE4
1347+
TILE_MODE_TILE4 = 0x3,
13481348
} TILE_MODE;
13491349
typedef enum tagSURFACE_HORIZONTAL_ALIGNMENT {
13501350
SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_16 = 0x0,

shared/source/generated/xe_hpc_core/hw_cmds_generated_xe_hpc_core.inl

Lines changed: 94 additions & 93 deletions
Large diffs are not rendered by default.

shared/source/generated/xe_hpg_core/hw_cmds_generated_xe_hpg_core.inl

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,9 +1217,9 @@ typedef struct tagRENDER_SURFACE_STATE {
12171217
uint32_t Reserved_252 : BITFIELD_RANGE(28, 29);
12181218
uint32_t MemoryCompressionEnable : BITFIELD_RANGE(30, 30);
12191219
uint32_t MemoryCompressionType : BITFIELD_RANGE(31, 31);
1220-
// DWORD 8
1220+
// DWORD 8, 9
12211221
uint64_t SurfaceBaseAddress;
1222-
// DWORD 10
1222+
// DWORD 10, 11
12231223
uint64_t QuiltWidth : BITFIELD_RANGE(0, 4);
12241224
uint64_t QuiltHeight : BITFIELD_RANGE(5, 9);
12251225
uint64_t ClearValueAddressEnable : BITFIELD_RANGE(10, 10);
@@ -1259,16 +1259,15 @@ typedef struct tagRENDER_SURFACE_STATE {
12591259
uint32_t SeparateUvPlaneEnable : BITFIELD_RANGE(31, 31);
12601260
// DWORD 7
12611261
uint32_t Reserved_224;
1262-
// DWORD 8
1262+
// DWORD 8, 9
12631263
uint64_t Reserved_256;
12641264
// DWORD 10
1265-
uint64_t Reserved_320 : BITFIELD_RANGE(0, 11);
1266-
uint64_t Reserved_332 : 20; /* WARNING: Uncontinuous fields, bit position gap. Patched with dummy field */
1265+
uint64_t Reserved_320 : BITFIELD_RANGE(0, 31);
12671266
// DWORD 11
12681267
uint64_t YOffsetForVPlane : BITFIELD_RANGE(32, 45);
1269-
uint64_t Reserved_366 : 2; /* WARNING: Uncontinuous fields, bit position gap. Patched with dummy field */
1268+
uint64_t Reserved_366 : BITFIELD_RANGE(46, 47);
12701269
uint64_t XOffsetForVPlane : BITFIELD_RANGE(48, 61);
1271-
uint64_t Reserved_382 : 2; /* WARNING: Uncontinuous fields, bit position gap. Patched with dummy field */
1270+
uint64_t Reserved_382 : BITFIELD_RANGE(62, 63);
12721271
// DWORD 12
12731272
uint32_t Reserved_384;
12741273
// DWORD 13
@@ -1294,15 +1293,14 @@ typedef struct tagRENDER_SURFACE_STATE {
12941293
// DWORD 6
12951294
uint32_t AuxiliarySurfaceMode : BITFIELD_RANGE(0, 2);
12961295
uint32_t AuxiliarySurfacePitch : BITFIELD_RANGE(3, 12);
1297-
uint32_t Reserved_205 : 1; /* WARNING: Uncontinuous fields, bit position gap. Patched with dummy field */
1298-
uint32_t Reserved_206 : BITFIELD_RANGE(14, 15);
1296+
uint32_t Reserved_205 : BITFIELD_RANGE(13, 15);
12991297
uint32_t AuxiliarySurfaceQpitch : BITFIELD_RANGE(16, 30);
13001298
uint32_t Reserved_223 : BITFIELD_RANGE(31, 31);
13011299
// DWORD 7
13021300
uint32_t Reserved_224;
1303-
// DWORD 8
1301+
// DWORD 8, 9
13041302
uint64_t Reserved_256;
1305-
// DWORD 10
1303+
// DWORD 10, 11
13061304
uint64_t Reserved_320;
13071305
// DWORD 12
13081306
uint32_t Reserved_384;
@@ -1330,9 +1328,9 @@ typedef struct tagRENDER_SURFACE_STATE {
13301328
uint32_t Reserved_192;
13311329
// DWORD 7
13321330
uint32_t Reserved_224;
1333-
// DWORD 8
1331+
// DWORD 8, 9
13341332
uint64_t Reserved_256;
1335-
// DWORD 10
1333+
// DWORD 10, 11
13361334
uint64_t Reserved_320 : BITFIELD_RANGE(0, 11);
13371335
uint64_t AuxiliarySurfaceBaseAddress : BITFIELD_RANGE(12, 63);
13381336
// DWORD 12
@@ -1360,7 +1358,6 @@ typedef struct tagRENDER_SURFACE_STATE {
13601358
TILE_MODE_TILE64 = 0x1,
13611359
TILE_MODE_XMAJOR = 0x2,
13621360
TILE_MODE_TILE4 = 0x3,
1363-
TILE_MODE_YMAJOR = 0x3, // patched - old name for TILE_MODE_TILE4
13641361
} TILE_MODE;
13651362
typedef enum tagSURFACE_HORIZONTAL_ALIGNMENT {
13661363
SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_16 = 0x0,

shared/test/common/mocks/mock_gmm_resource_info.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ class MockGmmResourceInfo : public GmmResourceInfo {
112112
uint32_t cpuBltCalled = 0u;
113113
uint8_t cpuBltResult = 1u;
114114
static constexpr uint32_t getHAlignSurfaceStateResult = 2u;
115+
static constexpr uint32_t yMajorTileModeValue = 3u;
115116

116117
protected:
117118
MockGmmResourceInfo();

shared/test/common/mocks/mock_gmm_resource_info_common.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020-2021 Intel Corporation
2+
* Copyright (C) 2020-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -106,7 +106,7 @@ uint32_t MockGmmResourceInfo::getTileModeSurfaceState() {
106106

107107
if (mockResourceCreateParams.Type == GMM_RESOURCE_TYPE::RESOURCE_2D ||
108108
mockResourceCreateParams.Type == GMM_RESOURCE_TYPE::RESOURCE_3D) {
109-
return 3;
109+
return yMajorTileModeValue;
110110
} else {
111111
return 0;
112112
}

0 commit comments

Comments
 (0)