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
이 커밋은 다음에 포함됨:
@@ -25,6 +25,8 @@ THE SOFTWARE.
|
||||
* Validate argument list of texture object api.
|
||||
*/
|
||||
TEST_CASE("Unit_hipCreateTextureObject_ArgValidation") {
|
||||
checkImageSupport();
|
||||
|
||||
float *texBuf;
|
||||
hipError_t ret;
|
||||
constexpr int xsize = 32;
|
||||
|
||||
@@ -23,6 +23,8 @@ THE SOFTWARE.
|
||||
* Validates Array Resource texture object with negative/functional tests.
|
||||
*/
|
||||
TEST_CASE("Unit_hipCreateTextureObject_ArrayResource") {
|
||||
checkImageSupport();
|
||||
|
||||
hipError_t ret;
|
||||
hipResourceDesc resDesc;
|
||||
hipTextureDesc texDesc;
|
||||
@@ -47,6 +49,8 @@ TEST_CASE("Unit_hipCreateTextureObject_ArrayResource") {
|
||||
* with negative/functional tests.
|
||||
*/
|
||||
TEST_CASE("Unit_hipCreateTextureObject_MmArrayResource") {
|
||||
checkImageSupport();
|
||||
|
||||
hipError_t ret;
|
||||
hipResourceDesc resDesc;
|
||||
hipTextureDesc texDesc;
|
||||
|
||||
@@ -26,6 +26,8 @@ THE SOFTWARE.
|
||||
* Validates Linear Resource texture object with negative/functional tests.
|
||||
*/
|
||||
TEST_CASE("Unit_hipCreateTextureObject_LinearResource") {
|
||||
checkImageSupport();
|
||||
|
||||
float *texBuf;
|
||||
hipError_t ret;
|
||||
constexpr int xsize = 32;
|
||||
|
||||
@@ -29,6 +29,8 @@ THE SOFTWARE.
|
||||
* Validates Pitch2D Resource texture object with negative and functional tests
|
||||
*/
|
||||
TEST_CASE("Unit_hipCreateTextureObject_Pitch2DResource") {
|
||||
checkImageSupport();
|
||||
|
||||
hipError_t ret;
|
||||
hipResourceDesc resDesc;
|
||||
hipTextureDesc texDesc;
|
||||
|
||||
@@ -23,10 +23,12 @@ THE SOFTWARE.
|
||||
|
||||
template <typename T>
|
||||
__global__ void tex1dKernelFetch(T *val, hipTextureObject_t obj, int N) {
|
||||
#if !defined(__HIP_NO_IMAGE_SUPPORT) || !__HIP_NO_IMAGE_SUPPORT
|
||||
int k = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (k < N) {
|
||||
val[k] = tex1Dfetch<T>(obj, k);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@@ -203,6 +205,8 @@ bool runTest(const char *description) {
|
||||
}
|
||||
|
||||
TEST_CASE("Unit_hipTextureFetch_vector") {
|
||||
checkImageSupport();
|
||||
|
||||
// test for char
|
||||
runTest<char1>("char1");
|
||||
runTest<char2>("char2");
|
||||
|
||||
새 이슈에서 참조
사용자 차단