add some clFinish for better profile timings

improved parallel batching, don't try to write for static objects,
this fixed a bug, when the hash of a static object was identical with hash of dynamic objects, causing it to be assigned a bogus 100+i batching number
The parallel batching is still not enabled, because we need to measure the batching size (todo)
This commit is contained in:
erwincoumans
2013-07-15 10:22:40 -07:00
parent 05ed1fdbcf
commit a5d00c8219
4 changed files with 28 additions and 20 deletions

View File

@@ -218,19 +218,21 @@ static const char* batchingKernelsCL= \
"\n"
" if( aUsed==0 && bUsed==0 )\n"
" {\n"
" int aAvailable;\n"
" int bAvailable;\n"
" int aAvailable=1;\n"
" int bAvailable=1;\n"
" int ea = abs(e.m_a);\n"
" int eb = abs(e.m_b);\n"
"\n"
" aAvailable = tryWrite( ldsCheckBuffer, ea );\n"
" bAvailable = tryWrite( ldsCheckBuffer, eb );\n"
"\n"
" bool aStatic = (e.m_a<0) ||(ea==m_staticIdx);\n"
" bool bStatic = (e.m_b<0) ||(eb==m_staticIdx);\n"
" \n"
" aAvailable = aStatic? 1: aAvailable;\n"
" bAvailable = bStatic? 1: bAvailable;\n"
" if (!aStatic)\n"
" aAvailable = tryWrite( ldsCheckBuffer, ea );\n"
" if (!bStatic)\n"
" bAvailable = tryWrite( ldsCheckBuffer, eb );\n"
" \n"
" //aAvailable = aStatic? 1: aAvailable;\n"
" //bAvailable = bStatic? 1: bAvailable;\n"
"\n"
" bool success = (aAvailable && bAvailable);\n"
" if(success)\n"