Created
August 13, 2013 16:53
-
-
Save jacres/6223194 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clEnqueueReadBuffer(m_clCmdQueue, m_clDeviceLightsPerTile, CL_TRUE, 0, sizeof(cl_int) * skMaxLightsPerTile * globalWorkSize[0] *globalWorkSize[1], m_clHostLightsPerTile, 0, NULL, NULL); | |
/* | |
for (int y=0; y<globalWorkSize[1]; ++y) { | |
for (int x=0; x<globalWorkSize[0]; ++x) { | |
int tile_index = y * globalWorkSize[0] + x; | |
for (int i=0; i<skMaxLightsPerTile; ++i) { | |
int lightIndex = m_clHostLightsPerTile[tile_index * skMaxLightsPerTile + i]; | |
if (lightIndex != -1) { | |
if (i==0) { | |
cout << "Lights in tile " << tile_index << " -> "; | |
} | |
cout << lightIndex << ", "; | |
} else { | |
if (i > 0) { | |
cout << endl; | |
} | |
break; | |
} | |
} | |
} | |
} | |
cout << endl;*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment