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


[ROCm/hip commit: 643f8dbd36]
This commit is contained in:
ROCm CI Service Account
2022-05-09 21:16:20 +05:30
committed by GitHub
vanhempi 614529f83b
commit 4a74649360
25 muutettua tiedostoa jossa 132 lisäystä ja 68 poistoa
@@ -21,7 +21,7 @@ THE SOFTWARE.
*/
/*HIT_START
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_RUNTIME rocclr
* BUILD: %t %s ../test_common.cpp
* TEST: %t
* HIT_END
*/
@@ -32,14 +32,18 @@ THE SOFTWARE.
#define N 512
__global__ void tex1dKernel(float *val, hipTextureObject_t obj) {
#if !defined(__HIP_NO_IMAGE_SUPPORT) || !__HIP_NO_IMAGE_SUPPORT
int k = blockIdx.x * blockDim.x + threadIdx.x;
if (k < N)
val[k] = tex1Dfetch<float>(obj, k);
#endif
}
int runTest(void);
int main(int argc, char **argv) {
checkImageSupport();
int testResult = runTest();
if(testResult) {
passed();
@@ -72,6 +76,7 @@ int runTest() {
hipTextureDesc texDesc;
memset(&texDesc, 0, sizeof(texDesc));
texDesc.readMode = hipReadModeElementType;
texDesc.addressMode[0]= hipAddressModeClamp;
// Creating texture object
hipTextureObject_t texObj = 0;