From e97080ec7b222ad7dea8329a52b09fc843197e19 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:07:05 +0100 Subject: [PATCH] EXSWHTEC-360 - Implement tests for Cubemap mipmapped texture device functions #434 Change-Id: I129f5fe8d8769fabbf67bf10e0c994fdf05358e2 [ROCm/hip-tests commit: baf4c75311140d574b020e465c64635b5818d4f5] --- projects/hip-tests/catch/unit/texture/texCubemap.cc | 2 ++ .../hip-tests/catch/unit/texture/texCubemapGrad.cc | 10 ++++++---- .../catch/unit/texture/texCubemapLayeredGrad.cc | 10 ++++++---- .../catch/unit/texture/texCubemapLayeredLod.cc | 10 ++++++---- projects/hip-tests/catch/unit/texture/texCubemapLod.cc | 10 ++++++---- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/projects/hip-tests/catch/unit/texture/texCubemap.cc b/projects/hip-tests/catch/unit/texture/texCubemap.cc index ade3775c52..572283a4a7 100644 --- a/projects/hip-tests/catch/unit/texture/texCubemap.cc +++ b/projects/hip-tests/catch/unit/texture/texCubemap.cc @@ -95,6 +95,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemap_Positive_ReadModeElementType", "", char, uns INFO("i: " << i); INFO("j: " << j); INFO("k: " << k); + 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])); @@ -179,6 +180,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemap_Positive_ReadModeNormalizedFloat", "", char, INFO("i: " << i); INFO("j: " << j); INFO("k: " << k); + 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/texCubemapGrad.cc b/projects/hip-tests/catch/unit/texture/texCubemapGrad.cc index b2024737b3..75a69f698c 100644 --- a/projects/hip-tests/catch/unit/texture/texCubemapGrad.cc +++ b/projects/hip-tests/catch/unit/texture/texCubemapGrad.cc @@ -46,7 +46,7 @@ THE SOFTWARE. * - unit/texture/texCubemapGrad.cc * Test requirements * ------------------------ - * - HIP_VERSION >= 5.2 + * - HIP_VERSION >= 5.7 */ TEMPLATE_TEST_CASE("Unit_texCubemapGrad_Positive_ReadModeElementType", "", char, unsigned char, short, unsigned short, int, unsigned int, float) { @@ -58,7 +58,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapGrad_Positive_ReadModeElementType", "", char, params.cubemap = true; 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()); @@ -95,6 +95,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapGrad_Positive_ReadModeElementType", "", char, INFO("i: " << i); INFO("j: " << j); INFO("k: " << k); + 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])); @@ -130,7 +131,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapGrad_Positive_ReadModeElementType", "", char, * - unit/texture/texCubemapGrad.cc * Test requirements * ------------------------ - * - HIP_VERSION >= 5.2 + * - HIP_VERSION >= 5.7 */ TEMPLATE_TEST_CASE("Unit_texCubemapGrad_Positive_ReadModeNormalizedFloat", "", char, unsigned char, short, unsigned short) { @@ -142,7 +143,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapGrad_Positive_ReadModeNormalizedFloat", "", c params.cubemap = true; 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()); @@ -179,6 +180,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapGrad_Positive_ReadModeNormalizedFloat", "", c INFO("i: " << i); INFO("j: " << j); INFO("k: " << k); + 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/texCubemapLayeredGrad.cc b/projects/hip-tests/catch/unit/texture/texCubemapLayeredGrad.cc index 96dd0415b6..68c5efdb86 100644 --- a/projects/hip-tests/catch/unit/texture/texCubemapLayeredGrad.cc +++ b/projects/hip-tests/catch/unit/texture/texCubemapLayeredGrad.cc @@ -46,7 +46,7 @@ THE SOFTWARE. * - unit/texture/texCubemapLayeredGrad.cc * Test requirements * ------------------------ - * - HIP_VERSION >= 5.2 + * - HIP_VERSION >= 5.7 */ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredGrad_Positive_ReadModeElementType", "", char, unsigned char, short, unsigned short, int, unsigned int, float) { @@ -59,7 +59,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredGrad_Positive_ReadModeElementType", "" params.cubemap = true; 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()); @@ -98,6 +98,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredGrad_Positive_ReadModeElementType", "" INFO("i: " << i); INFO("j: " << j); INFO("k: " << k); + 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])); @@ -134,7 +135,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredGrad_Positive_ReadModeElementType", "" * - unit/texture/texCubemapLayeredGrad.cc * Test requirements * ------------------------ - * - HIP_VERSION >= 5.2 + * - HIP_VERSION >= 5.7 */ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredGrad_Positive_ReadModeNormalizedFloat", "", char, unsigned char, short, unsigned short) { @@ -147,7 +148,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredGrad_Positive_ReadModeNormalizedFloat" params.cubemap = true; 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()); @@ -186,6 +187,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredGrad_Positive_ReadModeNormalizedFloat" INFO("i: " << i); INFO("j: " << j); INFO("k: " << k); + 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/texCubemapLayeredLod.cc b/projects/hip-tests/catch/unit/texture/texCubemapLayeredLod.cc index fd9db2c0b7..af305d1e6c 100644 --- a/projects/hip-tests/catch/unit/texture/texCubemapLayeredLod.cc +++ b/projects/hip-tests/catch/unit/texture/texCubemapLayeredLod.cc @@ -46,7 +46,7 @@ THE SOFTWARE. * - unit/texture/texCubemapLayeredLod.cc * Test requirements * ------------------------ - * - HIP_VERSION >= 5.2 + * - HIP_VERSION >= 5.7 */ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredLod_Positive_ReadModeElementType", "", char, unsigned char, short, unsigned short, int, unsigned int, float) { @@ -59,7 +59,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredLod_Positive_ReadModeElementType", "", params.cubemap = true; 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()); @@ -98,6 +98,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredLod_Positive_ReadModeElementType", "", INFO("i: " << i); INFO("j: " << j); INFO("k: " << k); + 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])); @@ -134,7 +135,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredLod_Positive_ReadModeElementType", "", * - unit/texture/texCubemapLayeredLod.cc * Test requirements * ------------------------ - * - HIP_VERSION >= 5.2 + * - HIP_VERSION >= 5.7 */ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredLod_Positive_ReadModeNormalizedFloat", "", char, unsigned char, short, unsigned short) { @@ -147,7 +148,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredLod_Positive_ReadModeNormalizedFloat", params.cubemap = true; 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()); @@ -186,6 +187,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLayeredLod_Positive_ReadModeNormalizedFloat", INFO("i: " << i); INFO("j: " << j); INFO("k: " << k); + 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/texCubemapLod.cc b/projects/hip-tests/catch/unit/texture/texCubemapLod.cc index 0d33048197..e35f8f7b6c 100644 --- a/projects/hip-tests/catch/unit/texture/texCubemapLod.cc +++ b/projects/hip-tests/catch/unit/texture/texCubemapLod.cc @@ -46,7 +46,7 @@ THE SOFTWARE. * - unit/texture/texCubemapLod.cc * Test requirements * ------------------------ - * - HIP_VERSION >= 5.2 + * - HIP_VERSION >= 5.7 */ TEMPLATE_TEST_CASE("Unit_texCubemapLod_Positive_ReadModeElementType", "", char, unsigned char, short, unsigned short, int, unsigned int, float) { @@ -58,7 +58,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLod_Positive_ReadModeElementType", "", char, params.cubemap = true; 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()); @@ -95,6 +95,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLod_Positive_ReadModeElementType", "", char, INFO("i: " << i); INFO("j: " << j); INFO("k: " << k); + 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])); @@ -130,7 +131,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLod_Positive_ReadModeElementType", "", char, * - unit/texture/texCubemapLod.cc * Test requirements * ------------------------ - * - HIP_VERSION >= 5.2 + * - HIP_VERSION >= 5.7 */ TEMPLATE_TEST_CASE("Unit_texCubemapLod_Positive_ReadModeNormalizedFloat", "", char, unsigned char, short, unsigned short) { @@ -142,7 +143,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLod_Positive_ReadModeNormalizedFloat", "", ch params.cubemap = true; 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()); @@ -179,6 +180,7 @@ TEMPLATE_TEST_CASE("Unit_texCubemapLod_Positive_ReadModeNormalizedFloat", "", ch INFO("i: " << i); INFO("j: " << j); INFO("k: " << k); + 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]));