task that renders a single screen tile */
| 421 | |
| 422 | /* task that renders a single screen tile */ |
| 423 | void renderTileTask (int taskIndex, int threadIndex, int* pixels, |
| 424 | const unsigned int width, |
| 425 | const unsigned int height, |
| 426 | const float time, |
| 427 | const ISPCCamera& camera, |
| 428 | const int numTilesX, |
| 429 | const int numTilesY) |
| 430 | { |
| 431 | const unsigned int tileY = taskIndex / numTilesX; |
| 432 | const unsigned int tileX = taskIndex - tileY * numTilesX; |
| 433 | const unsigned int x0 = tileX * TILE_SIZE_X; |
| 434 | const unsigned int x1 = min(x0+TILE_SIZE_X,width); |
| 435 | const unsigned int y0 = tileY * TILE_SIZE_Y; |
| 436 | const unsigned int y1 = min(y0+TILE_SIZE_Y,height); |
| 437 | |
| 438 | for (unsigned int y=y0; y<y1; y++) for (unsigned int x=x0; x<x1; x++) |
| 439 | { |
| 440 | renderPixelStandard(data,x,y,pixels,width,height,time,camera,g_stats[threadIndex]); |
| 441 | } |
| 442 | } |
| 443 | |
| 444 | /* called by the C++ code to render */ |
| 445 | extern "C" void renderFrameStandard (int* pixels, |
no test coverage detected