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

Function renderTileTask

tutorials/point_geometry/point_geometry_device.cpp:165–184  ·  view source on GitHub ↗

task that renders a single screen tile */

Source from the content-addressed store, hash-verified

163
164/* task that renders a single screen tile */
165void renderTileTask (int taskIndex, int threadIndex, int* pixels,
166 const unsigned int width,
167 const unsigned int height,
168 const float time,
169 const ISPCCamera& camera,
170 const int numTilesX,
171 const int numTilesY)
172{
173 const unsigned int tileY = taskIndex / numTilesX;
174 const unsigned int tileX = taskIndex - tileY * numTilesX;
175 const unsigned int x0 = tileX * TILE_SIZE_X;
176 const unsigned int x1 = min(x0+TILE_SIZE_X,width);
177 const unsigned int y0 = tileY * TILE_SIZE_Y;
178 const unsigned int y1 = min(y0+TILE_SIZE_Y,height);
179
180 for (unsigned int y=y0; y<y1; y++) for (unsigned int x=x0; x<x1; x++)
181 {
182 renderPixelStandard(data,x,y,pixels,width,height,time,camera,g_stats[threadIndex]);
183 }
184}
185
186extern "C" void renderFrameStandard (int* pixels,
187 const unsigned int width,

Callers 1

renderFrameStandardFunction · 0.70

Calls 2

renderPixelStandardFunction · 0.70
minFunction · 0.50

Tested by

no test coverage detected