renders a single screen tile */
| 423 | |
| 424 | /* renders a single screen tile */ |
| 425 | void renderTileStandard(int taskIndex, |
| 426 | int threadIndex, |
| 427 | int* pixels, |
| 428 | const unsigned int width, |
| 429 | const unsigned int height, |
| 430 | const float time, |
| 431 | const ISPCCamera& camera, |
| 432 | const int numTilesX, |
| 433 | const int numTilesY) |
| 434 | { |
| 435 | const int t = taskIndex; |
| 436 | const unsigned int tileY = t / numTilesX; |
| 437 | const unsigned int tileX = t - 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],g_feature_mask); |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | /* task that renders a single screen tile */ |
| 450 | void renderTileTask (int taskIndex, int threadIndex, int* pixels, |
no test coverage detected