task that renders a single screen tile */
| 163 | |
| 164 | /* task that renders a single screen tile */ |
| 165 | void renderTileTask (int taskIndex, int threadIndex, int* pixels, |
| 166 | const unsigned int width, |
| 167 | const unsigned int height, |
| 168 | const float time, |
| 169 | const ISPCCamera& camera, |
| 170 | const int numTilesX, |
| 171 | const int numTilesY) |
| 172 | { |
| 173 | const unsigned int tileY = taskIndex / numTilesX; |
| 174 | const unsigned int tileX = taskIndex - tileY * numTilesX; |
| 175 | const unsigned int x0 = tileX * TILE_SIZE_X; |
| 176 | const unsigned int x1 = min(x0+TILE_SIZE_X,width); |
| 177 | const unsigned int y0 = tileY * TILE_SIZE_Y; |
| 178 | const unsigned int y1 = min(y0+TILE_SIZE_Y,height); |
| 179 | |
| 180 | for (unsigned int y=y0; y<y1; y++) for (unsigned int x=x0; x<x1; x++) |
| 181 | { |
| 182 | renderPixelStandard(data,x,y,pixels,width,height,time,camera,g_stats[threadIndex]); |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | extern "C" void renderFrameStandard (int* pixels, |
| 187 | const unsigned int width, |
no test coverage detected