Home | History | Annotate | Download | only in functional

Lines Matching full:bbox

93 static ProjectedBBox projectBoundingBox (const BoundingBox& bbox)
95 const float wMin = de::max(0.0f, bbox.min.w()); // clamp to w=0 as extension requires
96 const float wMax = de::max(0.0f, bbox.max.w());
99 retVal.min = tcu::min(bbox.min.swizzle(0, 1, 2) / wMin,
100 bbox.min.swizzle(0, 1, 2) / wMax);
101 retVal.max = tcu::max(bbox.max.swizzle(0, 1, 2) / wMin,
102 bbox.max.swizzle(0, 1, 2) / wMax);
106 static tcu::IVec4 getViewportBoundingBoxArea (const ProjectedBBox& bbox, const tcu::IVec2& viewportSize, float size = 0.0f)
111 vertexBox.x() = (bbox.min.x() * 0.5f + 0.5f) * (float)viewportSize.x();
112 vertexBox.y() = (bbox.min.y() * 0.5f + 0.5f) * (float)viewportSize.y();
113 vertexBox.z() = (bbox.max.x() * 0.5f + 0.5f) * (float)viewportSize.x();
114 vertexBox.w() = (bbox.max.y() * 0.5f + 0.5f) * (float)viewportSize.y();
202 bool verifyState (glu::CallLogWrapper& gl, const BoundingBox& bbox) const;
267 bool QueryCase::verifyState (glu::CallLogWrapper& gl, const BoundingBox& bbox) const
288 if (state[ndx] != bbox.getComponentAccess(ndx))
297 << bbox.min.x() << ", " << bbox.min.y() << ", " << bbox.min.z() << ", " << bbox.min.w() << ", "
298 << bbox.max.x() << ", " << bbox.max.y() << ", " << bbox.max.z() << ", " << bbox.max.w() << "]"
322 if (state[ndx] != StateQueryUtil::roundGLfloatToNearestIntegerHalfDown<glw::GLint>(bbox.getComponentAccess(ndx)) &&
323 state[ndx] != StateQueryUtil::roundGLfloatToNearestIntegerHalfUp<glw::GLint>(bbox.getComponentAccess(ndx)))
335 const glw::GLint roundDown = StateQueryUtil::roundGLfloatToNearestIntegerHalfDown<glw::GLint>(bbox.getComponentAccess(ndx));
336 const glw::GLint roundUp = StateQueryUtil::roundGLfloatToNearestIntegerHalfUp<glw::GLint>(bbox.getComponentAccess(ndx));
371 if (state[ndx] != StateQueryUtil::roundGLfloatToNearestIntegerHalfDown<glw::GLint64>(bbox.getComponentAccess(ndx)) &&
372 state[ndx] != StateQueryUtil::roundGLfloatToNearestIntegerHalfUp<glw::GLint64>(bbox.getComponentAccess(ndx)))
384 const glw::GLint64 roundDown = StateQueryUtil::roundGLfloatToNearestIntegerHalfDown<glw::GLint64>(bbox.getComponentAccess(ndx));
385 const glw::GLint64 roundUp = StateQueryUtil::roundGLfloatToNearestIntegerHalfUp<glw::GLint64>(bbox.getComponentAccess(ndx));
422 if (state[ndx] != ((bbox.getComponentAccess(ndx) != 0.0f) ? (GL_TRUE) : (GL_FALSE)))
437 builder << ((bbox.getComponentAccess(ndx) != 0.0f) ? ("GL_TRUE") : ("GL_FALSE"));
519 BoundingBox bbox;
745 config.bbox.min = tcu::Vec4(config.patternPos.x(), config.patternPos.y(), 0.0f, 1.0f);
746 config.bbox.max = tcu::Vec4(config.patternPos.x() + config.patternSize.x(), config.patternPos.y() + config.patternSize.y(), 0.0f, 1.0f);
750 // increase bbox size
751 config.bbox.min.x() -= rnd.getFloat() * 0.5f;
752 config.bbox.min.y() -= rnd.getFloat() * 0.5f;
753 config.bbox.min.z() -= rnd.getFloat() * 0.5f;
755 config.bbox.max.x() += rnd.getFloat() * 0.5f;
756 config.bbox.max.y() += rnd.getFloat() * 0.5f;
757 config.bbox.max.z() += rnd.getFloat() * 0.5f;
761 // reduce bbox size
762 config.bbox.min.x() += rnd.getFloat() * 0.4f * config.patternSize.x();
763 config.bbox.min.y() += rnd.getFloat() * 0.4f * config.patternSize.y();
765 config.bbox.max.x() -= rnd.getFloat() * 0.4f * config.patternSize.x();
766 config.bbox.max.y() -= rnd.getFloat() * 0.4f * config.patternSize.y();
828 << "\t" << config.bbox.min << "\n"
829 << "\t" << config.bbox.max << "\n"
833 gl.primitiveBoundingBox(config.bbox.min.x(), config.bbox.min.y(), config.bbox.min.z(), config.bbox.min.w(),
834 config.bbox.max.x(), config.bbox.max.y(), config.bbox.max.z(), config.bbox.max.w());
836 // state is overriden by the tessellation output, set bbox to invisible area to imitiate dirty state left by application
859 gl.uniform4f(bboxMinPos, config.bbox.min.x(), config.bbox.min.y(), config.bbox.min.z(), config.bbox.min.w());
860 gl.uniform4f(bboxMaxPos, config.bbox.max.x(), config.bbox.max.y(), config.bbox.max.z(), config.bbox.max.w());
1277 const ProjectedBBox projectedBBox = projectBoundingBox(config.bbox);
1798 const ProjectedBBox projectedBBox = projectBoundingBox(config.bbox);
2252 // Line is allowed to be be thinner if it borders the bbox boundary (since part of the line might have been discarded).
2373 bool verifyNarrowPointPattern (const tcu::Surface& viewport, const std::vector<GeneratedPoint>& refPoints, const ProjectedBBox& bbox, int& logFloodCounter);
2374 bool verifyWidePointPattern (const tcu::Surface& viewport, const std::vector<GeneratedPoint>& refPoints, const ProjectedBBox& bbox, int& logFloodCounter);
2375 bool verifyWidePoint (const tcu::Surface& viewport, const GeneratedPoint& refPoint, const ProjectedBBox& bbox, ResultPointType pointType, int& logFloodCounter);
2376 bool verifyWidePointAt (const tcu::IVec2& pointPos, const tcu::Surface& viewport, const GeneratedPoint& refPoint, const tcu::IVec4& bbox, ResultPointType pointType, int componentNdx, int& logFloodCounter);
2707 config.bbox.min -= tcu::Vec4(0.07f * patternScale.x(), 0.07f * patternScale.y(), 0.0f, 0.0f);
2708 config.bbox.max += tcu::Vec4(0.07f * patternScale.x(), 0.07f * patternScale.y(), 0.0f, 0.0f);
2712 config.bbox.min -= tcu::Vec4(0.05f * patternScale.x(), 0.02f * patternScale.y(), 0.0f, 0.0f);
2713 config.bbox.max += tcu::Vec4(0.05f * patternScale.x(), 0.03f * patternScale.y(), 0.0f, 0.0f);
2790 const ProjectedBBox projectedBBox = projectBoundingBox(config.bbox);
2946 bool PointRenderCase::verifyNarrowPointPattern (const tcu::Surface& viewport, const std::vector<GeneratedPoint>& refPoints, const ProjectedBBox& bbox, int& logFloodCounter)
2956 // skip points not in the the bbox, treat boundary as "in"
2957 if (refPoint.center.x() < bbox.min.x() - epsilon ||
2958 refPoint.center.y() < bbox.min.y() - epsilon ||
2959 refPoint.center.x() > bbox.max.x() + epsilon ||
2960 refPoint.center.y() > bbox.max.y() + epsilon)
3008 bool PointRenderCase::verifyWidePointPattern (const tcu::Surface& viewport, const std::vector<GeneratedPoint>& refPoints, const ProjectedBBox& bbox, int& logFloodCounter)
3017 if (refPoint.center.x() >= bbox.min.x() &&
3018 refPoint.center.y() >= bbox.min.y() &&
3019 refPoint.center.x() <= bbox.max.x() &&
3020 refPoint.center.y() <= bbox.max.y())
3023 anyError |= !verifyWidePoint(viewport, refPoint, bbox, POINT_FULL, logFloodCounter);
3025 else if (refPoint.center.x() >= bbox.min.x() + (float)refPoint.size / 2.0f &&
3026 refPoint.center.y() >= bbox.min.y() - (float)refPoint.size / 2.0f &&
3027 refPoint.center.x() <= bbox.max.x() + (float)refPoint.size / 2.0f &&
3028 refPoint.center.y() <= bbox.max.y() - (float)refPoint.size / 2.0f)
3031 anyError |= !verifyWidePoint(viewport, refPoint, bbox, POINT_PARTIAL, logFloodCounter);
3038 bool PointRenderCase::verifyWidePoint (const tcu::Surface& viewport, const GeneratedPoint& refPoint, const ProjectedBBox& bbox, ResultPointType pointType, int& logFloodCounter)
3043 const tcu::IVec4 viewportBBoxArea = getViewportBoundingBoxArea(bbox, tcu::IVec2(viewport.getWidth(), viewport.getHeight()), (float)refPoint.size);
3051 // find any fragment within the point that is inside the bbox, start search at the center
3098 bool PointRenderCase::verifyWidePointAt (const tcu::IVec2& pointPos, const tcu::Surface& viewport, const GeneratedPoint& refPoint, const tcu::IVec4& bbox, ResultPointType pointType, int componentNdx, int& logFloodCounter)
3112 if (y < bbox.y() || y < 0)
3114 if (y < bbox.y())
3140 const bool widthClipped = (pointType == POINT_PARTIAL) && (range.x() <= bbox.x() || range.y() >= bbox.z());
3149 if (y >= bbox.w() || y >= viewport.getHeight())
3151 if (y >= bbox.w())
3177 const bool bboxClipped = (pointType == POINT_PARTIAL) && (range.x() <= bbox.x() || range.y() >= bbox.z()-1);
3205 const bool bboxClipped = (pointType == POINT_PARTIAL) && (unionRange.x() <= bbox.x() || unionRange.y() >= bbox.z()-1);
4153 DE_ASSERT(m_useGlobalState || m_drawTriangles); // per-triangle bbox requires triangles
4208 // render with and without bbox set
4369 // calc bbox
5146 "Test tight bounding box with global bbox state",
5152 "Test padded bounding box with global bbox state",
5158 "Test tight bounding box with tessellation output bbox",
5164 "Test padded bounding box with tessellation output bbox",
5216 callOrderGroup->addChild(new ViewportCallOrderCase(m_context, "viewport_first_bbox_second", "Set up viewport first and bbox after", ViewportCallOrderCase::VIEWPORT_FIRST));
5217 callOrderGroup->addChild(new ViewportCallOrderCase(m_context, "bbox_first_viewport_second", "Set up bbox first and viewport after", ViewportCallOrderCase::BBOX_FIRST));