MCPcopy Create free account
hub / github.com/RenderKit/ospray / PerformRenderTest

Method PerformRenderTest

modules/mpi/testing/distributed_test_fixture.cpp:61–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void MPIDistribBase::PerformRenderTest()
62{
63 SetLights();
64
65 if (!instances.empty()) {
66 world.setParam("instance", cpp::CopiedData(instances));
67
68 // Determine the bounds of this rank's region in world space
69 const vec3f regionDims = worldBounds.size() / vec3f(rankGridDims);
70 box3f localRegion(rankBrickId * regionDims + worldBounds.lower,
71 rankBrickId * regionDims + regionDims + worldBounds.lower);
72
73 // Special case for the ospray test data: we might have geometry right at
74 // the region bounding box which will z-fight with the clipping region. If
75 // we have a region at the edge of the domain, apply some padding
76 for (int i = 0; i < 3; ++i) {
77 if (localRegion.lower[i] == worldBounds.lower[i]) {
78 localRegion.lower[i] -= 0.001;
79 }
80 if (localRegion.upper[i] == worldBounds.upper[i]) {
81 localRegion.upper[i] += 0.001;
82 }
83 }
84
85 world.setParam("region", cpp::CopiedData(localRegion));
86 }
87
88 camera.commit();
89 world.commit();
90 renderer.commit();
91
92 framebuffer.resetAccumulation();
93
94 RenderFrame();
95
96 if (mpiRank == 0) {
97 auto *framebuffer_data = (uint32_t *)framebuffer.map(OSP_FB_COLOR);
98
99 if (ospEnv->GetDumpImg()) {
100 EXPECT_EQ(imageTool->saveTestImage(framebuffer_data), OsprayStatus::Ok);
101 } else {
102 EXPECT_EQ(imageTool->compareImgWithBaseline(framebuffer_data),
103 OsprayStatus::Ok);
104 }
105
106 framebuffer.unmap(framebuffer_data);
107 }
108}
109
110MPIFromOsprayTesting::MPIFromOsprayTesting()
111{

Callers

nothing calls this directly

Calls 9

mapMethod · 0.80
GetDumpImgMethod · 0.80
saveTestImageMethod · 0.80
setParamMethod · 0.45
sizeMethod · 0.45
commitMethod · 0.45
resetAccumulationMethod · 0.45
unmapMethod · 0.45

Tested by

no test coverage detected