renders a single screen tile */
| 828 | |
| 829 | /* renders a single screen tile */ |
| 830 | void renderTileStandard(int taskIndex, |
| 831 | int threadIndex, |
| 832 | int* pixels, |
| 833 | const unsigned int width, |
| 834 | const unsigned int height, |
| 835 | const float time, |
| 836 | const ISPCCamera& camera, |
| 837 | const int numTilesX, |
| 838 | const int numTilesY) |
| 839 | { |
| 840 | const unsigned int tileY = taskIndex / numTilesX; |
| 841 | const unsigned int tileX = taskIndex - tileY * numTilesX; |
| 842 | const unsigned int x0 = tileX * TILE_SIZE_X; |
| 843 | const unsigned int x1 = min(x0+TILE_SIZE_X,width); |
| 844 | const unsigned int y0 = tileY * TILE_SIZE_Y; |
| 845 | const unsigned int y1 = min(y0+TILE_SIZE_Y,height); |
| 846 | |
| 847 | for (unsigned int y=y0; y<y1; y++) for (unsigned int x=x0; x<x1; x++) |
| 848 | { |
| 849 | renderPixelStandard(data,x,y,pixels,width,height,time,camera,g_stats[threadIndex]); |
| 850 | } |
| 851 | } |
| 852 | |
| 853 | /* task that renders a single screen tile */ |
| 854 | void renderTileTask (int taskIndex, int threadIndex, int* pixels, |
no test coverage detected