Skip to content

Commit

Permalink
Update RENDER_SURFACE_STATE for Xe Hpc
Browse files Browse the repository at this point in the history
For Xe Hp and later rename RSS tile mode enum from YMAJOR to TILE4

Related-To: NEO-6466
Signed-off-by: Mateusz Jablonski <[email protected]>
  • Loading branch information
JablonskiMateusz authored and Compute-Runtime-Automation committed Jan 24, 2022
1 parent e379249 commit 0c933d8
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 113 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2331,7 +2331,7 @@ TEST_F(KernelImplicitArgTests, givenKernelWithoutImplicitArgsWhenPatchingImplici

using MultiTileModuleTest = Test<MultiTileModuleFixture>;

HWTEST2_F(MultiTileModuleTest, GivenMultiTileDeviceWhenSettingKernelArgAndSurfaceStateThenMultiTileFlagsAreSetCorrectly, isXeHpOrXeHpcCore) {
HWTEST2_F(MultiTileModuleTest, GivenMultiTileDeviceWhenSettingKernelArgAndSurfaceStateThenMultiTileFlagsAreSetCorrectly, IsXeHpCore) {
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
ze_kernel_desc_t desc = {};
desc.pKernelName = kernelName.c_str();
Expand Down
1 change: 1 addition & 0 deletions opencl/test/unit_test/mem_obj/image_set_arg_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ HWTEST_F(ImageSetArgTest, givenImageArraySizeGreaterThanOneButTypeIsNotImageArra

ClSurfaceFormatInfo surfaceFormatInfo{};
surfaceFormatInfo.surfaceFormat.GMMSurfaceFormat = GMM_FORMAT_B8G8R8A8_UNORM;
surfaceFormatInfo.surfaceFormat.ImageElementSizeInBytes = 4u;
imageInfo.surfaceFormat = &surfaceFormatInfo.surfaceFormat;
cl_image_desc imageDesc = Image2dDefaults::imageDesc;
imageDesc.image_array_size = 3u;
Expand Down
4 changes: 2 additions & 2 deletions opencl/test/unit_test/mem_obj/nv12_image_tests.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
Expand Down Expand Up @@ -421,7 +421,7 @@ HWTEST_F(Nv12ImageTest, WhenSettingImageArgUvPlaneImageThenOffsetSurfaceBaseAddr

auto tileMode = RENDER_SURFACE_STATE::TILE_MODE_LINEAR;
if (imageNV12->isTiledAllocation()) {
tileMode = RENDER_SURFACE_STATE::TILE_MODE_YMAJOR;
tileMode = static_cast<typename RENDER_SURFACE_STATE::TILE_MODE>(MockGmmResourceInfo::yMajorTileModeValue);
}

EXPECT_EQ(tileMode, surfaceState.getTileMode());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ typedef struct tagRENDER_SURFACE_STATE {
TILE_MODE_LINEAR = 0x0,
TILE_MODE_TILE64 = 0x1,
TILE_MODE_XMAJOR = 0x2,
TILE_MODE_YMAJOR = 0x3, // patched - old name for TILE_MODE_TILE4
TILE_MODE_TILE4 = 0x3,
} TILE_MODE;
typedef enum tagSURFACE_HORIZONTAL_ALIGNMENT {
SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_16 = 0x0,
Expand Down
187 changes: 94 additions & 93 deletions shared/source/generated/xe_hpc_core/hw_cmds_generated_xe_hpc_core.inl

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1217,9 +1217,9 @@ typedef struct tagRENDER_SURFACE_STATE {
uint32_t Reserved_252 : BITFIELD_RANGE(28, 29);
uint32_t MemoryCompressionEnable : BITFIELD_RANGE(30, 30);
uint32_t MemoryCompressionType : BITFIELD_RANGE(31, 31);
// DWORD 8
// DWORD 8, 9
uint64_t SurfaceBaseAddress;
// DWORD 10
// DWORD 10, 11
uint64_t QuiltWidth : BITFIELD_RANGE(0, 4);
uint64_t QuiltHeight : BITFIELD_RANGE(5, 9);
uint64_t ClearValueAddressEnable : BITFIELD_RANGE(10, 10);
Expand Down Expand Up @@ -1259,16 +1259,15 @@ typedef struct tagRENDER_SURFACE_STATE {
uint32_t SeparateUvPlaneEnable : BITFIELD_RANGE(31, 31);
// DWORD 7
uint32_t Reserved_224;
// DWORD 8
// DWORD 8, 9
uint64_t Reserved_256;
// DWORD 10
uint64_t Reserved_320 : BITFIELD_RANGE(0, 11);
uint64_t Reserved_332 : 20; /* WARNING: Uncontinuous fields, bit position gap. Patched with dummy field */
uint64_t Reserved_320 : BITFIELD_RANGE(0, 31);
// DWORD 11
uint64_t YOffsetForVPlane : BITFIELD_RANGE(32, 45);
uint64_t Reserved_366 : 2; /* WARNING: Uncontinuous fields, bit position gap. Patched with dummy field */
uint64_t Reserved_366 : BITFIELD_RANGE(46, 47);
uint64_t XOffsetForVPlane : BITFIELD_RANGE(48, 61);
uint64_t Reserved_382 : 2; /* WARNING: Uncontinuous fields, bit position gap. Patched with dummy field */
uint64_t Reserved_382 : BITFIELD_RANGE(62, 63);
// DWORD 12
uint32_t Reserved_384;
// DWORD 13
Expand All @@ -1294,15 +1293,14 @@ typedef struct tagRENDER_SURFACE_STATE {
// DWORD 6
uint32_t AuxiliarySurfaceMode : BITFIELD_RANGE(0, 2);
uint32_t AuxiliarySurfacePitch : BITFIELD_RANGE(3, 12);
uint32_t Reserved_205 : 1; /* WARNING: Uncontinuous fields, bit position gap. Patched with dummy field */
uint32_t Reserved_206 : BITFIELD_RANGE(14, 15);
uint32_t Reserved_205 : BITFIELD_RANGE(13, 15);
uint32_t AuxiliarySurfaceQpitch : BITFIELD_RANGE(16, 30);
uint32_t Reserved_223 : BITFIELD_RANGE(31, 31);
// DWORD 7
uint32_t Reserved_224;
// DWORD 8
// DWORD 8, 9
uint64_t Reserved_256;
// DWORD 10
// DWORD 10, 11
uint64_t Reserved_320;
// DWORD 12
uint32_t Reserved_384;
Expand Down Expand Up @@ -1330,9 +1328,9 @@ typedef struct tagRENDER_SURFACE_STATE {
uint32_t Reserved_192;
// DWORD 7
uint32_t Reserved_224;
// DWORD 8
// DWORD 8, 9
uint64_t Reserved_256;
// DWORD 10
// DWORD 10, 11
uint64_t Reserved_320 : BITFIELD_RANGE(0, 11);
uint64_t AuxiliarySurfaceBaseAddress : BITFIELD_RANGE(12, 63);
// DWORD 12
Expand Down Expand Up @@ -1360,7 +1358,6 @@ typedef struct tagRENDER_SURFACE_STATE {
TILE_MODE_TILE64 = 0x1,
TILE_MODE_XMAJOR = 0x2,
TILE_MODE_TILE4 = 0x3,
TILE_MODE_YMAJOR = 0x3, // patched - old name for TILE_MODE_TILE4
} TILE_MODE;
typedef enum tagSURFACE_HORIZONTAL_ALIGNMENT {
SURFACE_HORIZONTAL_ALIGNMENT_HALIGN_16 = 0x0,
Expand Down
1 change: 1 addition & 0 deletions shared/test/common/mocks/mock_gmm_resource_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class MockGmmResourceInfo : public GmmResourceInfo {
uint32_t cpuBltCalled = 0u;
uint8_t cpuBltResult = 1u;
static constexpr uint32_t getHAlignSurfaceStateResult = 2u;
static constexpr uint32_t yMajorTileModeValue = 3u;

protected:
MockGmmResourceInfo();
Expand Down
4 changes: 2 additions & 2 deletions shared/test/common/mocks/mock_gmm_resource_info_common.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
Expand Down Expand Up @@ -106,7 +106,7 @@ uint32_t MockGmmResourceInfo::getTileModeSurfaceState() {

if (mockResourceCreateParams.Type == GMM_RESOURCE_TYPE::RESOURCE_2D ||
mockResourceCreateParams.Type == GMM_RESOURCE_TYPE::RESOURCE_3D) {
return 3;
return yMajorTileModeValue;
} else {
return 0;
}
Expand Down

0 comments on commit 0c933d8

Please sign in to comment.