renders a single screen tile */
| 218 | |
| 219 | /* renders a single screen tile */ |
| 220 | void renderTileStandard(int taskIndex, |
| 221 | int threadIndex, |
| 222 | int* pixels, |
| 223 | const unsigned int width, |
| 224 | const unsigned int height, |
| 225 | const float time, |
| 226 | const ISPCCamera& camera, |
| 227 | const int numTilesX, |
| 228 | const int numTilesY) |
| 229 | { |
| 230 | const unsigned int tileY = taskIndex / numTilesX; |
| 231 | const unsigned int tileX = taskIndex - tileY * numTilesX; |
| 232 | const unsigned int x0 = tileX * TILE_SIZE_X; |
| 233 | const unsigned int x1 = min(x0+TILE_SIZE_X,width); |
| 234 | const unsigned int y0 = tileY * TILE_SIZE_Y; |
| 235 | const unsigned int y1 = min(y0+TILE_SIZE_Y,height); |
| 236 | |
| 237 | for (unsigned int y=y0; y<y1; y++) for (unsigned int x=x0; x<x1; x++) |
| 238 | { |
| 239 | renderPixelStandard(data,x,y,pixels,width,height,time,camera,g_stats[threadIndex]); |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | /* task that renders a single screen tile */ |
| 244 | void renderTileTask (int taskIndex, int threadIndex, int* pixels, |
no test coverage detected