Lines Matching defs:bbox

94 static ProjectedBBox projectBoundingBox (const BoundingBox& bbox)
96 const float wMin = de::max(0.0f, bbox.min.w()); // clamp to w=0 as extension requires
97 const float wMax = de::max(0.0f, bbox.max.w());
100 retVal.min = tcu::min(bbox.min.swizzle(0, 1, 2) / wMin,
101 bbox.min.swizzle(0, 1, 2) / wMax);
102 retVal.max = tcu::max(bbox.max.swizzle(0, 1, 2) / wMin,
103 bbox.max.swizzle(0, 1, 2) / wMax);
107 static tcu::IVec4 getViewportBoundingBoxArea (const ProjectedBBox& bbox, const tcu::IVec2& viewportSize, float size = 0.0f)
112 vertexBox.x() = (bbox.min.x() * 0.5f + 0.5f) * (float)viewportSize.x();
113 vertexBox.y() = (bbox.min.y() * 0.5f + 0.5f) * (float)viewportSize.y();
114 vertexBox.z() = (bbox.max.x() * 0.5f + 0.5f) * (float)viewportSize.x();
115 vertexBox.w() = (bbox.max.y() * 0.5f + 0.5f) * (float)viewportSize.y();
283 bool verifyState (glu::CallLogWrapper& gl, const BoundingBox& bbox) const;
357 bool QueryCase::verifyState (glu::CallLogWrapper& gl, const BoundingBox& bbox) const
378 if (state[ndx] != bbox.getComponentAccess(ndx))
387 << bbox.min.x() << ", " << bbox.min.y() << ", " << bbox.min.z() << ", " << bbox.min.w() << ", "
388 << bbox.max.x() << ", " << bbox.max.y() << ", " << bbox.max.z() << ", " << bbox.max.w() << "]"
412 if (state[ndx] != StateQueryUtil::roundGLfloatToNearestIntegerHalfDown<glw::GLint>(bbox.getComponentAccess(ndx)) &&
413 state[ndx] != StateQueryUtil::roundGLfloatToNearestIntegerHalfUp<glw::GLint>(bbox.getComponentAccess(ndx)))
425 const glw::GLint roundDown = StateQueryUtil::roundGLfloatToNearestIntegerHalfDown<glw::GLint>(bbox.getComponentAccess(ndx));
426 const glw::GLint roundUp = StateQueryUtil::roundGLfloatToNearestIntegerHalfUp<glw::GLint>(bbox.getComponentAccess(ndx));
461 if (state[ndx] != StateQueryUtil::roundGLfloatToNearestIntegerHalfDown<glw::GLint64>(bbox.getComponentAccess(ndx)) &&
462 state[ndx] != StateQueryUtil::roundGLfloatToNearestIntegerHalfUp<glw::GLint64>(bbox.getComponentAccess(ndx)))
474 const glw::GLint64 roundDown = StateQueryUtil::roundGLfloatToNearestIntegerHalfDown<glw::GLint64>(bbox.getComponentAccess(ndx));
475 const glw::GLint64 roundUp = StateQueryUtil::roundGLfloatToNearestIntegerHalfUp<glw::GLint64>(bbox.getComponentAccess(ndx));
512 if (state[ndx] != ((bbox.getComponentAccess(ndx) != 0.0f) ? (GL_TRUE) : (GL_FALSE)))
527 builder << ((bbox.getComponentAccess(ndx) != 0.0f) ? ("GL_TRUE") : ("GL_FALSE"));
609 BoundingBox bbox;
855 config.bbox.min = tcu::Vec4(config.patternPos.x(), config.patternPos.y(), 0.0f, 1.0f);
856 config.bbox.max = tcu::Vec4(config.patternPos.x() + config.patternSize.x(), config.patternPos.y() + config.patternSize.y(), 0.0f, 1.0f);
860 // increase bbox size
861 config.bbox.min.x() -= rnd.getFloat() * 0.5f;
862 config.bbox.min.y() -= rnd.getFloat() * 0.5f;
863 config.bbox.min.z() -= rnd.getFloat() * 0.5f;
865 config.bbox.max.x() += rnd.getFloat() * 0.5f;
866 config.bbox.max.y() += rnd.getFloat() * 0.5f;
867 config.bbox.max.z() += rnd.getFloat() * 0.5f;
871 // reduce bbox size
872 config.bbox.min.x() += rnd.getFloat() * 0.4f * config.patternSize.x();
873 config.bbox.min.y() += rnd.getFloat() * 0.4f * config.patternSize.y();
875 config.bbox.max.x() -= rnd.getFloat() * 0.4f * config.patternSize.x();
876 config.bbox.max.y() -= rnd.getFloat() * 0.4f * config.patternSize.y();
938 << "\t" << config.bbox.min << "\n"
939 << "\t" << config.bbox.max << "\n"
943 m_boundingBoxFunc(config.bbox.min.x(), config.bbox.min.y(), config.bbox.min.z(), config.bbox.min.w(),
944 config.bbox.max.x(), config.bbox.max.y(), config.bbox.max.z(), config.bbox.max.w());
946 // state is overriden by the tessellation output, set bbox to invisible area to imitiate dirty state left by application
969 gl.uniform4f(bboxMinPos, config.bbox.min.x(), config.bbox.min.y(), config.bbox.min.z(), config.bbox.min.w());
970 gl.uniform4f(bboxMaxPos, config.bbox.max.x(), config.bbox.max.y(), config.bbox.max.z(), config.bbox.max.w());
1388 const ProjectedBBox projectedBBox = projectBoundingBox(config.bbox);
1910 const ProjectedBBox projectedBBox = projectBoundingBox(config.bbox);
2364 // Line is allowed to be be thinner if it borders the bbox boundary (since part of the line might have been discarded).
2485 bool verifyNarrowPointPattern (const tcu::Surface& viewport, const std::vector<GeneratedPoint>& refPoints, const ProjectedBBox& bbox, int& logFloodCounter);
2486 bool verifyWidePointPattern (const tcu::Surface& viewport, const std::vector<GeneratedPoint>& refPoints, const ProjectedBBox& bbox, int& logFloodCounter);
2487 bool verifyWidePoint (const tcu::Surface& viewport, const GeneratedPoint& refPoint, const ProjectedBBox& bbox, ResultPointType pointType, int& logFloodCounter);
2488 bool verifyWidePointAt (const tcu::IVec2& pointPos, const tcu::Surface& viewport, const GeneratedPoint& refPoint, const tcu::IVec4& bbox, ResultPointType pointType, int componentNdx, int& logFloodCounter);
2830 config.bbox.min -= tcu::Vec4(0.07f * patternScale.x(), 0.07f * patternScale.y(), 0.0f, 0.0f);
2831 config.bbox.max += tcu::Vec4(0.07f * patternScale.x(), 0.07f * patternScale.y(), 0.0f, 0.0f);
2835 config.bbox.min -= tcu::Vec4(0.05f * patternScale.x(), 0.02f * patternScale.y(), 0.0f, 0.0f);
2836 config.bbox.max += tcu::Vec4(0.05f * patternScale.x(), 0.03f * patternScale.y(), 0.0f, 0.0f);
2913 const ProjectedBBox projectedBBox = projectBoundingBox(config.bbox);
3069 bool PointRenderCase::verifyNarrowPointPattern (const tcu::Surface& viewport, const std::vector<GeneratedPoint>& refPoints, const ProjectedBBox& bbox, int& logFloodCounter)
3079 // skip points not in the the bbox, treat boundary as "in"
3080 if (refPoint.center.x() < bbox.min.x() - epsilon ||
3081 refPoint.center.y() < bbox.min.y() - epsilon ||
3082 refPoint.center.x() > bbox.max.x() + epsilon ||
3083 refPoint.center.y() > bbox.max.y() + epsilon)
3131 bool PointRenderCase::verifyWidePointPattern (const tcu::Surface& viewport, const std::vector<GeneratedPoint>& refPoints, const ProjectedBBox& bbox, int& logFloodCounter)
3140 if (refPoint.center.x() >= bbox.min.x() &&
3141 refPoint.center.y() >= bbox.min.y() &&
3142 refPoint.center.x() <= bbox.max.x() &&
3143 refPoint.center.y() <= bbox.max.y())
3146 anyError |= !verifyWidePoint(viewport, refPoint, bbox, POINT_FULL, logFloodCounter);
3148 else if (refPoint.center.x() >= bbox.min.x() + (float)refPoint.size / 2.0f &&
3149 refPoint.center.y() >= bbox.min.y() - (float)refPoint.size / 2.0f &&
3150 refPoint.center.x() <= bbox.max.x() + (float)refPoint.size / 2.0f &&
3151 refPoint.center.y() <= bbox.max.y() - (float)refPoint.size / 2.0f)
3154 anyError |= !verifyWidePoint(viewport, refPoint, bbox, POINT_PARTIAL, logFloodCounter);
3161 bool PointRenderCase::verifyWidePoint (const tcu::Surface& viewport, const GeneratedPoint& refPoint, const ProjectedBBox& bbox, ResultPointType pointType, int& logFloodCounter)
3166 const tcu::IVec4 viewportBBoxArea = getViewportBoundingBoxArea(bbox, tcu::IVec2(viewport.getWidth(), viewport.getHeight()), (float)refPoint.size);
3174 // find any fragment within the point that is inside the bbox, start search at the center
3221 bool PointRenderCase::verifyWidePointAt (const tcu::IVec2& pointPos, const tcu::Surface& viewport, const GeneratedPoint& refPoint, const tcu::IVec4& bbox, ResultPointType pointType, int componentNdx, int& logFloodCounter)
3235 if (y < bbox.y() || y < 0)
3237 if (y < bbox.y())
3263 const bool widthClipped = (pointType == POINT_PARTIAL) && (range.x() <= bbox.x() || range.y() >= bbox.z());
3272 if (y >= bbox.w() || y >= viewport.getHeight())
3274 if (y >= bbox.w())
3300 const bool bboxClipped = (pointType == POINT_PARTIAL) && (range.x() <= bbox.x() || range.y() >= bbox.z()-1);
3328 const bool bboxClipped = (pointType == POINT_PARTIAL) && (unionRange.x() <= bbox.x() || unionRange.y() >= bbox.z()-1);
4312 DE_ASSERT(m_useGlobalState || m_drawTriangles); // per-triangle bbox requires triangles
4369 // render with and without bbox set
4530 // calc bbox
5333 "Test tight bounding box with global bbox state",
5339 "Test padded bounding box with global bbox state",
5345 "Test tight bounding box with tessellation output bbox",
5351 "Test padded bounding box with tessellation output bbox",
5403 callOrderGroup->addChild(new ViewportCallOrderCase(m_context, "viewport_first_bbox_second", "Set up viewport first and bbox after", ViewportCallOrderCase::VIEWPORT_FIRST));
5404 callOrderGroup->addChild(new ViewportCallOrderCase(m_context, "bbox_first_viewport_second", "Set up bbox first and viewport after", ViewportCallOrderCase::BBOX_FIRST));