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:
committed by
GitHub
parent
614529f83b
commit
4a74649360
@@ -14,8 +14,10 @@
|
||||
template<bool normalizedCoords>
|
||||
__global__ void tex1DKernel(float *outputData, hipTextureObject_t textureObject,
|
||||
int width, float offsetX) {
|
||||
#if !defined(__HIP_NO_IMAGE_SUPPORT) || !__HIP_NO_IMAGE_SUPPORT
|
||||
int x = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
outputData[x] = tex1D<float>(textureObject, normalizedCoords ? (x + offsetX) / width : x + offsetX);
|
||||
#endif
|
||||
}
|
||||
|
||||
template<hipTextureAddressMode addressMode, hipTextureFilterMode filterMode, bool normalizedCoords>
|
||||
@@ -88,6 +90,8 @@ bool runTest(const int width, const float offsetX) {
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
checkImageSupport();
|
||||
|
||||
bool testResult = true;
|
||||
testResult = testResult && runTest<hipAddressModeClamp, hipFilterModePoint, false>(256, -3);
|
||||
testResult = testResult && runTest<hipAddressModeClamp, hipFilterModePoint, false>(256, 4);
|
||||
|
||||
Reference in New Issue
Block a user