ClipMode clipMode,
VerifyTriangleGroupRasterizationLogStash* logStash,
const bool vulkanLinesTest,
- const bool strictMode)
+ const bool strictMode,
+ const bool carryRemainder)
{
// Multisampled line == 2 triangles
float d0 = (float)lineOffset;
float d1 = d0 + 1.0f;
- // "leftoverPhase" carries over a fractional stipple phase that was "unused"
- // by the last line segment in the strip, if it wasn't an integer length.
- if (leftoverPhase > lineLength)
- {
- DE_ASSERT(d0 == 0.0f);
- d1 = lineLength;
- leftoverPhase -= lineLength;
- }
- else if (leftoverPhase != 0.0f)
+ if (carryRemainder)
{
- DE_ASSERT(d0 == 0.0f);
- d1 = leftoverPhase;
- leftoverPhase = 0.0f;
- }
- else
- {
- if (d0 + 1.0f > lineLength)
+ // "leftoverPhase" carries over a fractional stipple phase that was "unused"
+ // by the last line segment in the strip, if it wasn't an integer length.
+ if (leftoverPhase > lineLength)
{
+ DE_ASSERT(d0 == 0.0f);
d1 = lineLength;
- leftoverPhase = d0 + 1.0f - lineLength;
+ leftoverPhase -= lineLength;
+ }
+ else if (leftoverPhase != 0.0f)
+ {
+ DE_ASSERT(d0 == 0.0f);
+ d1 = leftoverPhase;
+ leftoverPhase = 0.0f;
}
else
- d1 = d0 + 1.0f;
+ {
+ if (d0 + 1.0f > lineLength)
+ {
+ d1 = lineLength;
+ leftoverPhase = d0 + 1.0f - lineLength;
+ }
+ else
+ d1 = d0 + 1.0f;
+ }
+ }
+ else
+ {
+ if (d1 > lineLength)
+ d1 = lineLength;
}
// set offset for next iteration
return verifyTriangleGroupRasterization(surface, triangleScene, args, log, scene.verificationMode, logStash, vulkanLinesTest);
}
+bool verifyMultisampleLineGroupRasterization (const tcu::Surface& surface,
+ const LineSceneSpec& scene,
+ const RasterizationArguments& args,
+ tcu::TestLog& log,
+ ClipMode clipMode,
+ VerifyTriangleGroupRasterizationLogStash* logStash,
+ const bool vulkanLinesTest,
+ const bool strictMode)
+{
+ if (scene.stippleEnable)
+ return verifyMultisampleLineGroupRasterization(surface, scene, args, log, clipMode, logStash, vulkanLinesTest, strictMode, true) ||
+ verifyMultisampleLineGroupRasterization(surface, scene, args, log, clipMode, logStash, vulkanLinesTest, strictMode, false);
+ else
+ return verifyMultisampleLineGroupRasterization(surface, scene, args, log, clipMode, logStash, vulkanLinesTest, strictMode, true);
+}
+
static bool verifyMultisampleLineGroupInterpolationInternal (const tcu::Surface& surface,
const LineSceneSpec& scene,
const RasterizationArguments& args,