Commit
57c002a31612855e744c33ac698590da0e3d02d3 changed how the stride
was calculated for sampling values in order to avoid double-counting
values. However, it also reduced the number of values sampled and
that's resulting in both GLES and Vulkan failures.
This patch restores the original stride calculation, but changes the
parameters to rnd.getInt() to ensure that 0 is never returned from it.
Components: Framework
VK-GL-CTS issue: 658
Change-Id: I4c7e6d39017bbfc38bcd155037d3b4d40ce46ca7
for (int y = 1; y < height-1; y++)
{
- for (int x = 1; x < width-1; x += 1 + (int)rnd.getInt(0, params.maxSampleSkip))
+ for (int x = 1; x < width-1; x += params.maxSampleSkip > 0 ? (int)rnd.getInt(1, params.maxSampleSkip) : 1)
{
const deUint32 minDist2RefToCmp = distSquaredToNeighbor<4>(rnd, readUnorm8<4>(refAccess, x, y), cmpAccess, x, y);
const deUint32 minDist2CmpToRef = distSquaredToNeighbor<4>(rnd, readUnorm8<4>(cmpAccess, x, y), refAccess, x, y);