task that renders a single screen tile */
| 426 | |
| 427 | /* task that renders a single screen tile */ |
| 428 | void 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 | |
| 449 | extern "C" void renderFrameStandard (int* pixels, |
| 450 | const unsigned int width, |
no test coverage detected