SWDEV-272536 - (PR-2229) Fix conversion of texture addressing mode

hipAddressModeClamp corresponds to CL_ADDRESS_CLAMP_TO_EDGE.
This change fixes incorrect sampling near texture edges.

https://github.com/ROCm-Developer-Tools/HIP/pull/2229

Change-Id: Ia2af9f3cb582a74af7b1f65bad1ed0310eab2628
This commit is contained in:
Anton Gorenko
2021-02-01 11:22:19 +06:00
gecommit door Rahul Garg
bovenliggende c81a7136d2
commit 6b14050424
+2 -2
Bestand weergeven
@@ -126,11 +126,11 @@ cl_addressing_mode getCLAddressingMode(const hipTextureAddressMode hipAddressMod
case hipAddressModeWrap:
return CL_ADDRESS_REPEAT;
case hipAddressModeClamp:
return CL_ADDRESS_CLAMP;
return CL_ADDRESS_CLAMP_TO_EDGE;
case hipAddressModeMirror:
return CL_ADDRESS_MIRRORED_REPEAT;
case hipAddressModeBorder:
return CL_ADDRESS_CLAMP_TO_EDGE;
return CL_ADDRESS_CLAMP;
}
ShouldNotReachHere();