SWDEV-349490 - Add unit test of sRGB (#2940)

Add unit test of sRGB.
Update helper functions to accomodate uchar4 and float4.
Change-Id: Ib604cf603ab63b908130ef1c562c53d42328bacf
This commit is contained in:
ROCm CI Service Account authored and GitHub committed 2022-09-15 21:04:57 -07:00
1 parent a8c0fa145d
commit 30fcb99268
6 files changed
+437 -51

No files matched your search

@@ -39,7 +39,7 @@ __global__ void tex3DKernel(float *outputData, hipTextureObject_t textureObject,
}
template<hipTextureAddressMode addressMode, hipTextureFilterMode filterMode, bool normalizedCoords>
void runTest(const int width, const int height, const int depth, const float offsetX, const float offsetY,
static void runTest(const int width, const int height, const int depth, const float offsetX, const float offsetY,
const float offsetZ) {
//printf("%s(addressMode=%d, filterMode=%d, normalizedCoords=%d, width=%d, height=%d, depth=%d, offsetX=%f, offsetY=%f, offsetZ=%f)\n",
// __FUNCTION__, addressMode, filterMode, normalizedCoords, width, height,
@@ -124,7 +124,7 @@ void runTest(const int width, const int height, const int depth, const float off
for (int j = 0; j < height; j++) {
for (int k = 0; k < width; k++) {
int index = i * width * height + j * width + k;
float expectedValue = getExpectedValue<addressMode, filterMode>(
float expectedValue = getExpectedValue<float, addressMode, filterMode>(
width, height, depth, offsetX + k, offsetY + j, offsetZ + i, hData);
if (!hipTextureSamplingVerify<float, filterMode>(hOutputData[index], expectedValue)) {