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]
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
614529f83b
Коммит
4a74649360
@@ -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
|
||||
*/
|
||||
@@ -34,9 +34,11 @@ texture<float, hipTextureType2DLayered> tex2DL;
|
||||
|
||||
__global__ void simpleKernelLayeredArray(T* outputData,int width,int height,int layer)
|
||||
{
|
||||
#if !defined(__HIP_NO_IMAGE_SUPPORT) || !__HIP_NO_IMAGE_SUPPORT
|
||||
unsigned int x = blockIdx.x*blockDim.x + threadIdx.x;
|
||||
unsigned int y = blockIdx.y*blockDim.y + threadIdx.y;
|
||||
outputData[layer*width*height + y*width + x] = tex2DLayered(tex2DL, x, y, layer);
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -67,8 +69,8 @@ void runTest(int width,int height,int num_layers,texture<T, hipTextureType2DLaye
|
||||
HIPCHECK(hipMemcpy3D(&myparms));
|
||||
|
||||
// set texture parameters
|
||||
tex->addressMode[0] = hipAddressModeWrap;
|
||||
tex->addressMode[1] = hipAddressModeWrap;
|
||||
tex->addressMode[0] = hipAddressModeClamp;
|
||||
tex->addressMode[1] = hipAddressModeClamp;
|
||||
tex->filterMode = hipFilterModePoint;
|
||||
tex->normalized = false;
|
||||
|
||||
@@ -103,6 +105,8 @@ void runTest(int width,int height,int num_layers,texture<T, hipTextureType2DLaye
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
checkImageSupport();
|
||||
|
||||
runTest(512,512,5,&tex2DL);
|
||||
passed();
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user