renders a single screen tile */
| 628 | |
| 629 | /* renders a single screen tile */ |
| 630 | void renderTileStandard(int taskIndex, |
| 631 | int threadIndex, |
| 632 | int* pixels, |
| 633 | const unsigned int width, |
| 634 | const unsigned int height, |
| 635 | const float time, |
| 636 | const ISPCCamera& camera, |
| 637 | const int numTilesX, |
| 638 | const int numTilesY) |
| 639 | { |
| 640 | const unsigned int tileY = taskIndex / numTilesX; |
| 641 | const unsigned int tileX = taskIndex - tileY * numTilesX; |
| 642 | const unsigned int x0 = tileX * TILE_SIZE_X; |
| 643 | const unsigned int x1 = min(x0+TILE_SIZE_X,width); |
| 644 | const unsigned int y0 = tileY * TILE_SIZE_Y; |
| 645 | const unsigned int y1 = min(y0+TILE_SIZE_Y,height); |
| 646 | |
| 647 | for (unsigned int y=y0; y<y1; y++) for (unsigned int x=x0; x<x1; x++) |
| 648 | { |
| 649 | renderPixelStandard(data,x,y,pixels,width,height,time,camera,g_stats[threadIndex]); |
| 650 | } |
| 651 | } |
| 652 | |
| 653 | /* task that renders a single screen tile */ |
| 654 | void renderTileTask (int taskIndex, int threadIndex, int* pixels, |
no test coverage detected