MCPcopy Create free account
hub / github.com/RenderKit/embree / run

Method run

tutorials/verify/verify.cpp:4563–4629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4561 {}
4562
4563 VerifyApplication::TestReturnValue run(VerifyApplication* state, bool silent)
4564 {
4565 std::string cfg = state->rtcore + ",isa=" + stringOfISA(isa);
4566 RTCDeviceRef device = rtcNewDevice(cfg.c_str());
4567 errorHandler(nullptr, rtcGetDeviceError(device));
4568
4569 RTCSceneRef scene = rtcNewScene(device);
4570 AssertNoError(device);
4571
4572 RTCGeometry geom0 = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_TRIANGLE);
4573 AssertNoError(device);
4574 RTCGeometry geom1 = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_TRIANGLE);
4575 AssertNoError(device);
4576 RTCGeometry geom2 = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_TRIANGLE);
4577 AssertNoError(device);
4578 RTCGeometry geom3 = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_TRIANGLE);
4579 AssertNoError(device);
4580
4581 rtcAttachGeometry(scene, geom0);
4582 rtcAttachGeometry(scene, geom1);
4583 rtcAttachGeometry(scene, geom2);
4584 rtcAttachGeometry(scene, geom3);
4585
4586 auto scene0 = (TestScene*)scene.scene;
4587 auto geometry0 = (Geometry*) geom0;
4588 auto geometry1 = (Geometry*) geom1;
4589 auto geometry2 = (Geometry*) geom2;
4590 auto geometry3 = (Geometry*) geom3;
4591
4592 for (size_t geomID = 0; geomID < 4; ++geomID) {
4593 scene0->setGeomCounter(geomID, 1);
4594 }
4595
4596 scene0->setModified();
4597 scene0->checkIfModifiedAndSet();
4598 if (!scene0->isModified()) {
4599 return VerifyApplication::FAILED;
4600 }
4601
4602 scene0->setModified(false);
4603 geometry0->enable();
4604 geometry1->enable();
4605 geometry2->enable();
4606 geometry3->enable();
4607 scene0->checkIfModifiedAndSet();
4608 if (scene0->isModified()) {
4609 return VerifyApplication::FAILED;
4610 }
4611
4612 geometry2->modCounter_ += 2;
4613
4614 scene0->checkIfModifiedAndSet();
4615 if (!scene0->isModified()) {
4616 return VerifyApplication::FAILED;
4617 }
4618
4619 rtcReleaseGeometry(geom0);
4620 AssertNoError(device);

Callers

nothing calls this directly

Calls 14

stringOfISAFunction · 0.85
rtcNewDeviceFunction · 0.85
errorHandlerFunction · 0.85
rtcGetDeviceErrorFunction · 0.85
rtcNewSceneFunction · 0.85
AssertNoErrorFunction · 0.85
rtcAttachGeometryFunction · 0.85
rtcReleaseGeometryFunction · 0.85
setGeomCounterMethod · 0.80
setModifiedMethod · 0.80
isModifiedMethod · 0.80
enableMethod · 0.80

Tested by

no test coverage detected