From f2464a36453a3a594dcc8be20adb3090ef022802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mirza=20Halil=C4=8Devi=C4=87?= <109971222+mirza-halilcevic@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:19:14 +0100 Subject: [PATCH] EXSWHTEC-359 - Implement tests for 3D mipmapped texture device functions #433 Change-Id: I1933d498f518b352b91b1c37b24c62d0cac309eb [ROCm/hip-tests commit: 2691895821047056a869ddfd12758ff26453699e] --- .../catch/hipTestMain/config/config_amd_linux | 11 ----------- projects/hip-tests/catch/unit/texture/CMakeLists.txt | 3 +++ projects/hip-tests/catch/unit/texture/tex3D.cc | 2 ++ projects/hip-tests/catch/unit/texture/tex3DGrad.cc | 10 ++++++---- projects/hip-tests/catch/unit/texture/tex3DLod.cc | 10 ++++++---- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux index 99c33f7834..66107df9e1 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux @@ -128,19 +128,8 @@ "Unit_hipEventIpc", "=== SWDEV-427101:Below test fails randomly in PSDB ===", "Unit_deviceAllocation_InOneThread_AccessInAllThreads", -<<<<<<< HEAD "=== Below test is disabled due to defect EXSWHTEC-347 ===", "Unit_hipPointerSetAttribute_Positive_SyncMemops", -======= - "Unit_tex2DLod_Positive_ReadModeElementType", - "Unit_tex2DLod_Positive_ReadModeNormalizedFloat", - "Unit_tex2DLayeredLod_Positive_ReadModeElementType", - "Unit_tex2DLayeredLod_Positive_ReadModeNormalizedFloat", - "Unit_tex2DGrad_Positive_ReadModeElementType", - "Unit_tex2DGrad_Positive_ReadModeNormalizedFloat", - "Unit_tex2DLayeredGrad_Positive_ReadModeElementType", - "Unit_tex2DLayeredGrad_Positive_ReadModeNormalizedFloat", ->>>>>>> ab1704d9 (Merge branch 'develop' into tex2D_mipmap_tests) "=== Patch which removes the typetraits implementation from std namespace in hiprtc is reverted ===", "Unit_hiprtc_stdheaders", "Unit_hipGraphAddMemcpyNode_Negative_Parameters", diff --git a/projects/hip-tests/catch/unit/texture/CMakeLists.txt b/projects/hip-tests/catch/unit/texture/CMakeLists.txt index d1d56d7064..3c0d5710d8 100644 --- a/projects/hip-tests/catch/unit/texture/CMakeLists.txt +++ b/projects/hip-tests/catch/unit/texture/CMakeLists.txt @@ -76,6 +76,9 @@ set(TEST_SRC tex2DLayeredGrad.cc tex2DLod.cc tex2DLayeredLod.cc + tex3D.cc + tex3DLod.cc + tex3DGrad.cc ) if(WIN32) diff --git a/projects/hip-tests/catch/unit/texture/tex3D.cc b/projects/hip-tests/catch/unit/texture/tex3D.cc index ecfdd535bb..2aaefe84d3 100644 --- a/projects/hip-tests/catch/unit/texture/tex3D.cc +++ b/projects/hip-tests/catch/unit/texture/tex3D.cc @@ -94,6 +94,7 @@ TEMPLATE_TEST_CASE("Unit_tex3D_Positive_ReadModeElementType", "", char, unsigned z = GetCoordinate(z, params.NumItersZ(), params.Depth(), params.num_subdivisions, params.tex_desc.normalizedCoords); + INFO("Filtering mode: " << FilteringModeToString(params.tex_desc.filterMode)); INFO("Normalized coordinates: " << std::boolalpha << params.tex_desc.normalizedCoords); INFO("Address mode X: " << AddressModeToString(params.tex_desc.addressMode[0])); INFO("Address mode Y: " << AddressModeToString(params.tex_desc.addressMode[1])); @@ -173,6 +174,7 @@ TEMPLATE_TEST_CASE("Unit_tex3D_Positive_ReadModeNormalizedFloat", "", char, unsi z = GetCoordinate(z, params.NumItersZ(), params.Depth(), params.num_subdivisions, params.tex_desc.normalizedCoords); + INFO("Filtering mode: " << FilteringModeToString(params.tex_desc.filterMode)); INFO("Normalized coordinates: " << std::boolalpha << params.tex_desc.normalizedCoords); INFO("Address mode X: " << AddressModeToString(params.tex_desc.addressMode[0])); INFO("Address mode Y: " << AddressModeToString(params.tex_desc.addressMode[1])); diff --git a/projects/hip-tests/catch/unit/texture/tex3DGrad.cc b/projects/hip-tests/catch/unit/texture/tex3DGrad.cc index a3f3d8ddfd..b810359fc1 100644 --- a/projects/hip-tests/catch/unit/texture/tex3DGrad.cc +++ b/projects/hip-tests/catch/unit/texture/tex3DGrad.cc @@ -46,7 +46,7 @@ THE SOFTWARE. * - unit/texture/tex3DGrad.cc * Test requirements * ------------------------ - * - HIP_VERSION >= 5.2 + * - HIP_VERSION >= 5.7 */ TEMPLATE_TEST_CASE("Unit_tex3DGrad_Positive_ReadModeElementType", "", char, unsigned char, short, unsigned short, int, unsigned int, float) { @@ -57,7 +57,7 @@ TEMPLATE_TEST_CASE("Unit_tex3DGrad_Positive_ReadModeElementType", "", char, unsi params.num_subdivisions = 2; params.GenerateTextureDesc(); - TextureTestFixture fixture{params}; + TextureTestFixture fixture{params}; const auto [num_threads_x, num_blocks_x] = GetLaunchConfig(10, params.NumItersX()); const auto [num_threads_y, num_blocks_y] = GetLaunchConfig(10, params.NumItersY()); @@ -94,6 +94,7 @@ TEMPLATE_TEST_CASE("Unit_tex3DGrad_Positive_ReadModeElementType", "", char, unsi z = GetCoordinate(z, params.NumItersZ(), params.Depth(), params.num_subdivisions, params.tex_desc.normalizedCoords); + INFO("Filtering mode: " << FilteringModeToString(params.tex_desc.filterMode)); INFO("Normalized coordinates: " << std::boolalpha << params.tex_desc.normalizedCoords); INFO("Address mode X: " << AddressModeToString(params.tex_desc.addressMode[0])); INFO("Address mode Y: " << AddressModeToString(params.tex_desc.addressMode[1])); @@ -125,7 +126,7 @@ TEMPLATE_TEST_CASE("Unit_tex3DGrad_Positive_ReadModeElementType", "", char, unsi * - unit/texture/tex3DGrad.cc * Test requirements * ------------------------ - * - HIP_VERSION >= 5.2 + * - HIP_VERSION >= 5.7 */ TEMPLATE_TEST_CASE("Unit_tex3DGrad_Positive_ReadModeNormalizedFloat", "", char, unsigned char, short, unsigned short) { @@ -136,7 +137,7 @@ TEMPLATE_TEST_CASE("Unit_tex3DGrad_Positive_ReadModeNormalizedFloat", "", char, params.num_subdivisions = 2; params.GenerateTextureDesc(hipReadModeNormalizedFloat); - TextureTestFixture fixture{params}; + TextureTestFixture fixture{params}; const auto [num_threads_x, num_blocks_x] = GetLaunchConfig(10, params.NumItersX()); const auto [num_threads_y, num_blocks_y] = GetLaunchConfig(10, params.NumItersY()); @@ -173,6 +174,7 @@ TEMPLATE_TEST_CASE("Unit_tex3DGrad_Positive_ReadModeNormalizedFloat", "", char, z = GetCoordinate(z, params.NumItersZ(), params.Depth(), params.num_subdivisions, params.tex_desc.normalizedCoords); + INFO("Filtering mode: " << FilteringModeToString(params.tex_desc.filterMode)); INFO("Normalized coordinates: " << std::boolalpha << params.tex_desc.normalizedCoords); INFO("Address mode X: " << AddressModeToString(params.tex_desc.addressMode[0])); INFO("Address mode Y: " << AddressModeToString(params.tex_desc.addressMode[1])); diff --git a/projects/hip-tests/catch/unit/texture/tex3DLod.cc b/projects/hip-tests/catch/unit/texture/tex3DLod.cc index bd5ee5f7a5..e514c9b9a3 100644 --- a/projects/hip-tests/catch/unit/texture/tex3DLod.cc +++ b/projects/hip-tests/catch/unit/texture/tex3DLod.cc @@ -46,7 +46,7 @@ THE SOFTWARE. * - unit/texture/tex3DLod.cc * Test requirements * ------------------------ - * - HIP_VERSION >= 5.2 + * - HIP_VERSION >= 5.7 */ TEMPLATE_TEST_CASE("Unit_tex3DLod_Positive_ReadModeElementType", "", char, unsigned char, short, unsigned short, int, unsigned int, float) { @@ -57,7 +57,7 @@ TEMPLATE_TEST_CASE("Unit_tex3DLod_Positive_ReadModeElementType", "", char, unsig params.num_subdivisions = 2; params.GenerateTextureDesc(); - TextureTestFixture fixture{params}; + TextureTestFixture fixture{params}; const auto [num_threads_x, num_blocks_x] = GetLaunchConfig(10, params.NumItersX()); const auto [num_threads_y, num_blocks_y] = GetLaunchConfig(10, params.NumItersY()); @@ -94,6 +94,7 @@ TEMPLATE_TEST_CASE("Unit_tex3DLod_Positive_ReadModeElementType", "", char, unsig z = GetCoordinate(z, params.NumItersZ(), params.Depth(), params.num_subdivisions, params.tex_desc.normalizedCoords); + INFO("Filtering mode: " << FilteringModeToString(params.tex_desc.filterMode)); INFO("Normalized coordinates: " << std::boolalpha << params.tex_desc.normalizedCoords); INFO("Address mode X: " << AddressModeToString(params.tex_desc.addressMode[0])); INFO("Address mode Y: " << AddressModeToString(params.tex_desc.addressMode[1])); @@ -125,7 +126,7 @@ TEMPLATE_TEST_CASE("Unit_tex3DLod_Positive_ReadModeElementType", "", char, unsig * - unit/texture/tex3DLod.cc * Test requirements * ------------------------ - * - HIP_VERSION >= 5.2 + * - HIP_VERSION >= 5.7 */ TEMPLATE_TEST_CASE("Unit_tex3DLod_Positive_ReadModeNormalizedFloat", "", char, unsigned char, short, unsigned short) { @@ -136,7 +137,7 @@ TEMPLATE_TEST_CASE("Unit_tex3DLod_Positive_ReadModeNormalizedFloat", "", char, u params.num_subdivisions = 2; params.GenerateTextureDesc(hipReadModeNormalizedFloat); - TextureTestFixture fixture{params}; + TextureTestFixture fixture{params}; const auto [num_threads_x, num_blocks_x] = GetLaunchConfig(10, params.NumItersX()); const auto [num_threads_y, num_blocks_y] = GetLaunchConfig(10, params.NumItersY()); @@ -173,6 +174,7 @@ TEMPLATE_TEST_CASE("Unit_tex3DLod_Positive_ReadModeNormalizedFloat", "", char, u z = GetCoordinate(z, params.NumItersZ(), params.Depth(), params.num_subdivisions, params.tex_desc.normalizedCoords); + INFO("Filtering mode: " << FilteringModeToString(params.tex_desc.filterMode)); INFO("Normalized coordinates: " << std::boolalpha << params.tex_desc.normalizedCoords); INFO("Address mode X: " << AddressModeToString(params.tex_desc.addressMode[0])); INFO("Address mode Y: " << AddressModeToString(params.tex_desc.addressMode[1]));