2
0

SWDEV-474989 - Fix texture filter test issues

Change-Id: I9b647aff79ba92f07b2ca18eac49d58ae63fa859


[ROCm/hip-tests commit: 8a9ed34f6a]
Este cometimento está contido em:
taosang2
2024-07-30 09:35:04 -04:00
cometido por Tao Sang
ascendente 2253b82046
cometimento 43b7d702ff
38 ficheiros modificados com 488 adições e 645 eliminações
+15 -14
Ver ficheiro
@@ -56,8 +56,12 @@ TEMPLATE_TEST_CASE("Unit_tex3DGrad_Positive_ReadModeElementType", "", char, unsi
params.extent = make_hipExtent(2, 2, 2);
params.num_subdivisions = 2;
params.GenerateTextureDesc();
TextureTestFixture<TestType, false, true> fixture{params};
if (params.tex_desc.addressMode[0] != params.tex_desc.addressMode[1] ||
params.tex_desc.addressMode[0] != params.tex_desc.addressMode[2]) {
INFO("Different address modes on X, Y, Z aren't supported. Skipped.");
return;
}
TextureTestFixture<TestType, false, false> 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());
@@ -104,10 +108,7 @@ TEMPLATE_TEST_CASE("Unit_tex3DGrad_Positive_ReadModeElementType", "", char, unsi
INFO("z: " << std::fixed << std::setprecision(16) << z);
const auto ref_val = fixture.tex_h.Tex3D(x, y, z, params.tex_desc);
REQUIRE(ref_val.x == fixture.out_alloc_h[i].x);
REQUIRE(ref_val.y == fixture.out_alloc_h[i].y);
REQUIRE(ref_val.z == fixture.out_alloc_h[i].z);
REQUIRE(ref_val.w == fixture.out_alloc_h[i].w);
REQUIRE(fixture.Verify(fixture.out_alloc_h[i], ref_val));
}
}
@@ -136,8 +137,12 @@ TEMPLATE_TEST_CASE("Unit_tex3DGrad_Positive_ReadModeNormalizedFloat", "", char,
params.extent = make_hipExtent(2, 2, 2);
params.num_subdivisions = 2;
params.GenerateTextureDesc(hipReadModeNormalizedFloat);
TextureTestFixture<TestType, true, true> fixture{params};
if (params.tex_desc.addressMode[0] != params.tex_desc.addressMode[1] ||
params.tex_desc.addressMode[0] != params.tex_desc.addressMode[2]) {
INFO("Different address modes on X, Y, Z aren't supported. Skipped.");
return;
}
TextureTestFixture<TestType, true, false> 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());
@@ -183,12 +188,8 @@ TEMPLATE_TEST_CASE("Unit_tex3DGrad_Positive_ReadModeNormalizedFloat", "", char,
INFO("y: " << std::fixed << std::setprecision(16) << y);
INFO("z: " << std::fixed << std::setprecision(16) << z);
auto ref_val = Vec4Map<TestType>(fixture.tex_h.Tex3D(x, y, z, params.tex_desc),
NormalizeInteger<TestType>);
REQUIRE(ref_val.x == fixture.out_alloc_h[i].x);
REQUIRE(ref_val.y == fixture.out_alloc_h[i].y);
REQUIRE(ref_val.z == fixture.out_alloc_h[i].z);
REQUIRE(ref_val.w == fixture.out_alloc_h[i].w);
auto ref_val = fixture.tex_h.Tex3D(x, y, z, params.tex_desc);
REQUIRE(fixture.Verify(fixture.out_alloc_h[i], ref_val));
}
}