Lines Matching refs:spec

109 …icCounterTest		(Context& context, const char* name, const char* description, const TestSpec& spec);
124 static string generateShaderSource (const TestSpec& spec);
128 …deUint32>& increments, const vector<deUint32>& decrements, int initialValue, const TestSpec& spec);
154 …omicCounterTest (Context& context, const char* name, const char* description, const TestSpec& spec) in AtomicCounterTest() argument
156 , m_spec (spec) in AtomicCounterTest()
172 string AtomicCounterTest::generateShaderSource (const TestSpec& spec) in generateShaderSource() argument
183 switch (spec.bindingType) in generateShaderSource()
195 switch (spec.offsetType) in generateShaderSource()
208 DE_ASSERT(spec.atomicCounterCount > 2); in generateShaderSource()
215 src << "offset=" << (4 * spec.atomicCounterCount/2); in generateShaderSource()
241 if ((spec.operations & OPERATION_GET) != 0 && spec.operations != OPERATION_GET) in generateShaderSource()
242 src << " uint preGet[" << spec.threadCount * spec.atomicCounterCount * spec.callCount << "];\n"; in generateShaderSource()
244 if ((spec.operations & OPERATION_INC) != 0) in generateShaderSource()
245 …src << " uint increment[" << spec.threadCount * spec.atomicCounterCount * spec.callCount << "];\n"; in generateShaderSource()
247 if ((spec.operations & OPERATION_DEC) != 0) in generateShaderSource()
248 …src << " uint decrement[" << spec.threadCount * spec.atomicCounterCount * spec.callCount << "];\n"; in generateShaderSource()
250 if ((spec.operations & OPERATION_GET) != 0 && spec.operations != OPERATION_GET) in generateShaderSource()
251 src << " uint postGet[" << spec.threadCount * spec.atomicCounterCount * spec.callCount << "];\n"; in generateShaderSource()
253 if (spec.operations == OPERATION_GET) in generateShaderSource()
254 src << " uint get[" << spec.threadCount * spec.atomicCounterCount * spec.callCount << "];\n"; in generateShaderSource()
258 for (int counterNdx = 0; counterNdx < spec.atomicCounterCount; counterNdx++) in generateShaderSource()
262 if (spec.offsetType == OFFSETTYPE_RESET_DEFAULT && counterNdx == spec.atomicCounterCount/2) in generateShaderSource()
265 switch (spec.bindingType) in generateShaderSource()
285 switch (spec.offsetType) in generateShaderSource()
339 …src << "offset=" << (spec.atomicCounterCount - counterNdx - 1) * 4 << ") uniform atomic_uint count… in generateShaderSource()
344 DE_ASSERT(spec.atomicCounterCount > 2); in generateShaderSource()
346 if (counterNdx + 1 == spec.atomicCounterCount) in generateShaderSource()
375 if (counterNdx + 1 == spec.atomicCounterCount) in generateShaderSource()
398 if (counterNdx < spec.atomicCounterCount/2) in generateShaderSource()
399 src << "uniform atomic_uint counter" << (counterNdx + spec.atomicCounterCount/2) << ";\n"; in generateShaderSource()
401 src << "uniform atomic_uint counter" << (counterNdx - spec.atomicCounterCount/2) << ";\n"; in generateShaderSource()
415 if (spec.callCount > 1) in generateShaderSource()
416 src << "\tfor (uint i = 0u; i < " << spec.callCount << "u; i++)\n"; in generateShaderSource()
422 if (spec.callCount > 1) in generateShaderSource()
423 src << " * "<< spec.callCount << "u"; in generateShaderSource()
425 if (spec.callCount > 1) in generateShaderSource()
430 if (spec.atomicCounterCount > 1) in generateShaderSource()
431 src << " * " << spec.atomicCounterCount << "u"; in generateShaderSource()
435 for (int counterNdx = 0; counterNdx < spec.atomicCounterCount; counterNdx++) in generateShaderSource()
437 if ((spec.operations & OPERATION_GET) != 0 && spec.operations != OPERATION_GET) in generateShaderSource()
440 …if (spec.useBranches && ((spec.operations & (OPERATION_INC|OPERATION_DEC)) == (OPERATION_INC|OPERA… in generateShaderSource()
443 … << "\t\tif (((gl_GlobalInvocationID.x" << (spec.callCount > 1 ? " + i" : "") << ") % 2u) == 0u)\n" in generateShaderSource()
456 if ((spec.operations & OPERATION_INC) != 0) in generateShaderSource()
458 if (spec.useBranches) in generateShaderSource()
461 … << "\t\tif (((gl_GlobalInvocationID.x" << (spec.callCount > 1 ? " + i" : "") << ") % 2u) == 0u)\n" in generateShaderSource()
475 if ((spec.operations & OPERATION_DEC) != 0) in generateShaderSource()
477 if (spec.useBranches) in generateShaderSource()
480 … << "\t\tif (((gl_GlobalInvocationID.x" << (spec.callCount > 1 ? " + i" : "") << ") % 2u) == 0u)\n" in generateShaderSource()
495 if ((spec.operations & OPERATION_GET) != 0 && spec.operations != OPERATION_GET) in generateShaderSource()
498 if ((spec.operations == OPERATION_GET) != 0) in generateShaderSource()
500 if (spec.useBranches) in generateShaderSource()
503 … << "\t\tif (((gl_GlobalInvocationID.x" << (spec.callCount > 1 ? " + i" : "") << ") % 2u) == 0u)\n" in generateShaderSource()
712 …<deUint32>& increments, const vector<deUint32>& decrements, int initialValue, const TestSpec& spec) in checkPath() argument
714 …Value + (spec.useBranches ? spec.threadCount*spec.callCount - spec.threadCount*spec.callCount/2 : … in checkPath()
1050 string specToTestName (const AtomicCounterTest::TestSpec& spec) in specToTestName() argument
1054 stream << spec.atomicCounterCount << (spec.atomicCounterCount == 1 ? "_counter" : "_counters"); in specToTestName()
1055 stream << "_" << spec.callCount << (spec.callCount == 1 ? "_call" : "_calls"); in specToTestName()
1056 stream << "_" << spec.threadCount << (spec.threadCount == 1 ? "_thread" : "_threads"); in specToTestName()
1061 string specToTestDescription (const AtomicCounterTest::TestSpec& spec) in specToTestDescription() argument
1069 if ((spec.operations & AtomicCounterTest::OPERATION_GET) != 0) in specToTestDescription()
1075 if ((spec.operations & AtomicCounterTest::OPERATION_INC) != 0) in specToTestDescription()
1084 if ((spec.operations & AtomicCounterTest::OPERATION_DEC) != 0) in specToTestDescription()
1095 if (spec.useBranches) in specToTestDescription()
1098 …stream << spec.atomicCounterCount << " atomic counters, " << spec.callCount << " calls and " << sp… in specToTestDescription()
1359 AtomicCounterTest::TestSpec spec; in AtomicCounterTests() local
1361 spec.atomicCounterCount = counterCount; in AtomicCounterTests()
1362 spec.operations = operation; in AtomicCounterTests()
1363 spec.callCount = callCount; in AtomicCounterTests()
1364 spec.useBranches = useBranch; in AtomicCounterTests()
1365 spec.threadCount = threadCount; in AtomicCounterTests()
1366 spec.bindingType = AtomicCounterTest::BINDINGTYPE_BASIC; in AtomicCounterTests()
1367 spec.offsetType = AtomicCounterTest::OFFSETTYPE_NONE; in AtomicCounterTests()
1369 …new AtomicCounterTest(m_context, specToTestName(spec).c_str(), specToTestDescription(spec).c_str()… in AtomicCounterTests()
1437 AtomicCounterTest::TestSpec spec; in AtomicCounterTests() local
1439 spec.atomicCounterCount = counterCount; in AtomicCounterTests()
1440 spec.operations = operation; in AtomicCounterTests()
1441 spec.callCount = callCount; in AtomicCounterTests()
1442 spec.useBranches = false; in AtomicCounterTests()
1443 spec.threadCount = threadCount; in AtomicCounterTests()
1444 spec.bindingType = AtomicCounterTest::BINDINGTYPE_BASIC; in AtomicCounterTests()
1445 spec.offsetType = offsetType; in AtomicCounterTests()
1447 …new AtomicCounterTest(m_context, specToTestName(spec).c_str(), specToTestDescription(spec).c_str()… in AtomicCounterTests()
1460 AtomicCounterTest::TestSpec spec; in AtomicCounterTests() local
1462 spec.atomicCounterCount = 1; in AtomicCounterTests()
1463 spec.operations = AtomicCounterTest::OPERATION_INC; in AtomicCounterTests()
1464 spec.callCount = 1; in AtomicCounterTests()
1465 spec.useBranches = false; in AtomicCounterTests()
1466 spec.threadCount = 1; in AtomicCounterTests()
1467 spec.bindingType = AtomicCounterTest::BINDINGTYPE_INVALID; in AtomicCounterTests()
1468 spec.offsetType = AtomicCounterTest::OFFSETTYPE_NONE; in AtomicCounterTests()
1470 …icCounterTest(m_context, "invalid_binding", "Test layout qualifiers with invalid binding.", spec)); in AtomicCounterTests()
1474 AtomicCounterTest::TestSpec spec; in AtomicCounterTests() local
1476 spec.atomicCounterCount = 1; in AtomicCounterTests()
1477 spec.operations = AtomicCounterTest::OPERATION_INC; in AtomicCounterTests()
1478 spec.callCount = 1; in AtomicCounterTests()
1479 spec.useBranches = false; in AtomicCounterTests()
1480 spec.threadCount = 1; in AtomicCounterTests()
1481 spec.bindingType = AtomicCounterTest::BINDINGTYPE_INVALID_DEFAULT; in AtomicCounterTests()
1482 spec.offsetType = AtomicCounterTest::OFFSETTYPE_NONE; in AtomicCounterTests()
1484 …context, "invalid_default_binding", "Test layout qualifiers with invalid default binding.", spec)); in AtomicCounterTests()
1488 AtomicCounterTest::TestSpec spec; in AtomicCounterTests() local
1490 spec.atomicCounterCount = 1; in AtomicCounterTests()
1491 spec.operations = AtomicCounterTest::OPERATION_INC; in AtomicCounterTests()
1492 spec.callCount = 1; in AtomicCounterTests()
1493 spec.useBranches = false; in AtomicCounterTests()
1494 spec.threadCount = 1; in AtomicCounterTests()
1495 spec.bindingType = AtomicCounterTest::BINDINGTYPE_BASIC; in AtomicCounterTests()
1496 spec.offsetType = AtomicCounterTest::OFFSETTYPE_INVALID; in AtomicCounterTests()
1498 …m_context, "invalid_offset_align", "Test layout qualifiers with invalid alignment offset.", spec)); in AtomicCounterTests()
1502 AtomicCounterTest::TestSpec spec; in AtomicCounterTests() local
1504 spec.atomicCounterCount = 2; in AtomicCounterTests()
1505 spec.operations = AtomicCounterTest::OPERATION_INC; in AtomicCounterTests()
1506 spec.callCount = 1; in AtomicCounterTests()
1507 spec.useBranches = false; in AtomicCounterTests()
1508 spec.threadCount = 1; in AtomicCounterTests()
1509 spec.bindingType = AtomicCounterTest::BINDINGTYPE_BASIC; in AtomicCounterTests()
1510 spec.offsetType = AtomicCounterTest::OFFSETTYPE_INVALID_OVERLAPPING; in AtomicCounterTests()
1512 …ntext, "invalid_offset_overlap", "Test layout qualifiers with invalid overlapping offset.", spec)); in AtomicCounterTests()
1516 AtomicCounterTest::TestSpec spec; in AtomicCounterTests() local
1518 spec.atomicCounterCount = 1; in AtomicCounterTests()
1519 spec.operations = AtomicCounterTest::OPERATION_INC; in AtomicCounterTests()
1520 spec.callCount = 1; in AtomicCounterTests()
1521 spec.useBranches = false; in AtomicCounterTests()
1522 spec.threadCount = 1; in AtomicCounterTests()
1523 spec.bindingType = AtomicCounterTest::BINDINGTYPE_BASIC; in AtomicCounterTests()
1524 spec.offsetType = AtomicCounterTest::OFFSETTYPE_INVALID_DEFAULT; in AtomicCounterTests()
1526 …m_context, "invalid_default_offset", "Test layout qualifiers with invalid default offset.", spec)); in AtomicCounterTests()