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:
1 förälder
a8c0fa145d
incheckning
30fcb99268
6 files changed
+437
-51
No files matched your search
@@ -31,7 +31,7 @@ __global__ void tex1DKernel(float *outputData, hipTextureObject_t textureObject,
|
||||
}
|
||||
|
||||
template<hipTextureAddressMode addressMode, hipTextureFilterMode filterMode, bool normalizedCoords>
|
||||
void runTest(const int width, const float offsetX) {
|
||||
static void runTest(const int width, const float offsetX) {
|
||||
//printf("%s(addressMode=%d, filterMode=%d, normalizedCoords=%d, width=%d, offsetX=%f)\n", __FUNCTION__,
|
||||
// addressMode, filterMode, normalizedCoords, width, offsetX);
|
||||
unsigned int size = width * sizeof(float);
|
||||
@@ -82,7 +82,7 @@ void runTest(const int width, const float offsetX) {
|
||||
|
||||
bool result = true;
|
||||
for (int j = 0; j < width; j++) {
|
||||
float expectedValue = getExpectedValue<addressMode, filterMode>(width, offsetX + j, hData);
|
||||
float expectedValue = getExpectedValue<float, addressMode, filterMode>(width, offsetX + j, hData);
|
||||
if (!hipTextureSamplingVerify<float, filterMode>(hOutputData[j], expectedValue)) {
|
||||
INFO("Mismatch at " << offsetX + j << ":" << hOutputData[j] <<
|
||||
" expected:" << expectedValue);
|
||||
|
||||
Reference in new issue
Block a user