fixed bug by multiplying task_id by UNIT_TASK_SIZE
git-svn-id: svn://anubis/fart/trunk@229 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
parent
8424e34a91
commit
c9c3c942fb
@ -186,8 +186,9 @@ void Scene::taskLoop()
|
|||||||
int task_id = m_distrib.getTask();
|
int task_id = m_distrib.getTask();
|
||||||
if (task_id < 0)
|
if (task_id < 0)
|
||||||
break;
|
break;
|
||||||
int i = task_id / m_width;
|
int pixel = task_id * UNIT_TASK_SIZE;
|
||||||
int j = task_id % m_width;
|
int i = pixel / m_width;
|
||||||
|
int j = pixel % m_width;
|
||||||
for (int t = 0; t < UNIT_TASK_SIZE; t++)
|
for (int t = 0; t < UNIT_TASK_SIZE; t++)
|
||||||
{
|
{
|
||||||
renderPixel(j, i, &data[3 * t]);
|
renderPixel(j, i, &data[3 * t]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user