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

Function renderTileTask

tutorials/interpolation/interpolation_device.cpp:428–447  ·  view source on GitHub ↗

task that renders a single screen tile */

Source from the content-addressed store, hash-verified

426
427/* task that renders a single screen tile */
428void renderTileTask (int taskIndex, int threadIndex, int* pixels,
429 const unsigned int width,
430 const unsigned int height,
431 const float time,
432 const ISPCCamera& camera,
433 const int numTilesX,
434 const int numTilesY)
435{
436 const unsigned int tileY = taskIndex / numTilesX;
437 const unsigned int tileX = taskIndex - tileY * numTilesX;
438 const unsigned int x0 = tileX * TILE_SIZE_X;
439 const unsigned int x1 = min(x0+TILE_SIZE_X,width);
440 const unsigned int y0 = tileY * TILE_SIZE_Y;
441 const unsigned int y1 = min(y0+TILE_SIZE_Y,height);
442
443 for (unsigned int y=y0; y<y1; y++) for (unsigned int x=x0; x<x1; x++)
444 {
445 renderPixelStandard(data,x,y,pixels,width,height,time,camera,g_stats[threadIndex]);
446 }
447}
448
449extern "C" void renderFrameStandard (int* pixels,
450 const unsigned int width,

Callers 1

renderFrameStandardFunction · 0.70

Calls 2

renderPixelStandardFunction · 0.70
minFunction · 0.50

Tested by

no test coverage detected