SWDEV-305992 - Improve texture tests (#2646)

Enable more texture supports for hip-rocclr.
Skip texture tests on device that doesn't support images.
SWDEV-322257 - Fix issues of image tests skipped on
NVidia devices.

Change-Id: Ia99d06b1e97fc945f1b740e47710f4dcd70f38ca
This commit is contained in:
ROCm CI Service Account
2022-05-09 21:16:20 +05:30
gecommit door GitHub
bovenliggende ab3dc9ccac
commit 643f8dbd36
25 gewijzigde bestanden met toevoegingen van 132 en 68 verwijderingen
@@ -15,11 +15,13 @@ template<bool normalizedCoords>
__global__ void tex2DKernel(float *outputData, hipTextureObject_t textureObject,
int width, int height, float offsetX,
float offsetY) {
#if !defined(__HIP_NO_IMAGE_SUPPORT) || !__HIP_NO_IMAGE_SUPPORT
int x = blockIdx.x * blockDim.x + threadIdx.x;
int y = blockIdx.y * blockDim.y + threadIdx.y;
outputData[y * width + x] = tex2D<float>(textureObject,
normalizedCoords ? (x + offsetX) / width : x + offsetX,
normalizedCoords ? (y + offsetY) / height : y + offsetY);
#endif
}
template<hipTextureAddressMode addressMode, hipTextureFilterMode filterMode, bool normalizedCoords>
@@ -100,6 +102,8 @@ line1:
}
int main(int argc, char **argv) {
checkImageSupport();
bool testResult = true;
testResult = testResult && runTest<hipAddressModeClamp, hipFilterModePoint, false>(256, 256, -3.9, 6.1);