SWDEV-549696 - Fix HIP catch sub-test failure for MipmappedArray (#1198)
Co-authored-by: JeniferC99 <150404595+JeniferC99@users.noreply.github.com>
This commit is contained in:
committad av
GitHub
förälder
e9e972144d
incheckning
272f06506f
@@ -1468,7 +1468,7 @@ hipError_t hipTexRefSetMipmappedArray(textureReference* texRef, hipMipmappedArra
|
||||
resDesc.res.mipmap.mipmap = mipmappedArray;
|
||||
|
||||
hipTextureDesc texDesc = hip::getTextureDesc(texRef);
|
||||
|
||||
texDesc.normalizedCoords = texRef->normalized;
|
||||
hipResourceViewFormat format =
|
||||
hip::getResourceViewFormat(hip::getChannelFormatDesc(texRef->numChannels, texRef->format));
|
||||
hipResourceViewDesc resViewDesc = hip::getResourceViewDesc(mipmappedArray, format);
|
||||
|
||||
@@ -43,6 +43,7 @@ TEST_CASE("Unit_hipTexRefSetGetMipmappedArray") {
|
||||
SECTION("Set and get mipmapped array") {
|
||||
hipMipmappedArray_t mipmapped_array;
|
||||
HIP_RESOURCE_DESC res_desc{};
|
||||
hipModule_t module = nullptr;
|
||||
hipExtent extent;
|
||||
hipChannelFormatDesc channel_desc;
|
||||
unsigned int width = 256, height = 256, mipmap_level = 2;
|
||||
@@ -58,8 +59,11 @@ TEST_CASE("Unit_hipTexRefSetGetMipmappedArray") {
|
||||
return;
|
||||
}
|
||||
HIP_CHECK(res);
|
||||
|
||||
HIP_CHECK(hipTexRefSetMipmappedArray(texRef, mipmapped_array, Flags));
|
||||
HIP_CHECK(hipFree(nullptr));
|
||||
HIP_CHECK(hipModuleLoad(&module, "tex_ref_get_module.code"));
|
||||
HIP_CHECK(hipModuleGetTexRef(&texRef, module, "tex"));
|
||||
HIP_CHECK(hipTexRefSetFlags(texRef, HIP_TRSF_NORMALIZED_COORDINATES));
|
||||
HIP_CHECK(hipTexRefSetMipmappedArray(texRef, mipmapped_array, HIP_TRSA_OVERRIDE_FORMAT));
|
||||
HIP_CHECK(hipTexRefGetMipMappedArray(&outArr, texRef));
|
||||
REQUIRE(outArr == mipmapped_array);
|
||||
HIP_CHECK(hipFreeMipmappedArray(mipmapped_array));
|
||||
|
||||
Referens i nytt ärende
Block a user