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

Add unit test of sRGB.
Update helper functions to accomodate uchar4 and float4.
Change-Id: Ib604cf603ab63b908130ef1c562c53d42328bacf
这个提交包含在:
ROCm CI Service Account 编写, GitHub 于 2022-09-15 21:04:57 -07:00 提交
1 父节点 a8c0fa145d
当前提交 30fcb99268
6 个文件已更改
+437 -51

没有与搜索条件相匹配的文件

@@ -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)) {