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

Add unit test of sRGB.
Update helper functions to accomodate uchar4 and float4.
Change-Id: Ib604cf603ab63b908130ef1c562c53d42328bacf
Cette révision appartient à :
ROCm CI Service Account a créé et GitHub a révisé 2022-09-15 21:04:57 -07:00
1 Parent a8c0fa145d
révision 30fcb99268
6 fichiers modifiés
+437 -51

Aucun fichier ne correspond à votre recherche

+2 -2
Voir le fichier
@@ -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)) {