SWDEV-303204 - Disable texture/image Apis on some devices

If the target device doesn't support image,
compiler will send out unavailable error if device texture apis
are called; and host texture apis will return hipErrorNotSupported.
Remove useless include/hip/amd_detail/texture_functions.h.
Add hipDeviceAttributeImageSupport attribute to check image
support in runtime.
Add __HIP_NO_IMAGE_SUPPORT(=1) macro in device code to indicate
texture apis not supported.
Change-Id: Ia891493e681a61980a2444859a90e046a9ebea39


[ROCm/clr commit: 5acc8b5102]
This commit is contained in:
Tao Sang authored and Tao Sang committed 2021-12-04 08:14:08 -05:00
1 orang tua 6c68d56c17
melakukan 68c75c9fb7
7 files changed
+329 -11204

No files matched your search

@@ -318,6 +318,9 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device)
// hipStreamWaitValue64() and hipStreamWaitValue32() support
*pi = g_devices[device]->devices()[0]->info().aqlBarrierValue_;
break;
case hipDeviceAttributeImageSupport:
*pi = static_cast<int>(g_devices[device]->devices()[0]->info().imageSupport_);
break;
default:
HIP_RETURN(hipErrorInvalidValue);
}