Lines Matching +full:log +full:-

1 /*-------------------------------------------------------------------------
3 * ----------------------------
11 * http://www.apache.org/licenses/LICENSE-2.0
22 *//*--------------------------------------------------------------------*/
88 return stack->numElements == 0; in ContainerStack_isEmpty()
93 if (stack->numElements == MAX_CONTAINER_STACK_DEPTH) in ContainerStack_push()
96 if (stack->numElements > 0 && !childContainersOk(stack->elements[stack->numElements-1])) in ContainerStack_push()
99 stack->elements[stack->numElements] = type; in ContainerStack_push()
100 stack->numElements += 1; in ContainerStack_push()
107 DE_ASSERT(stack->numElements > 0); in ContainerStack_pop()
108 stack->numElements -= 1; in ContainerStack_pop()
109 return stack->elements[stack->numElements]; in ContainerStack_pop()
114 if (stack->numElements > 0) in ContainerStack_getTop()
115 return stack->elements[stack->numElements-1]; in ContainerStack_getTop()
251 static void qpTestLog_flushFile (qpTestLog* log) in qpTestLog_flushFile() argument
253 DE_ASSERT(log && log->outputFile); in qpTestLog_flushFile()
254 fflush(log->outputFile); in qpTestLog_flushFile()
257 FlushFileBuffers((HANDLE)_get_osfhandle(_fileno(log->outputFile))); in qpTestLog_flushFile()
292 static deBool beginSession (qpTestLog* log) in beginSession() argument
294 DE_ASSERT(log && !log->isSessionOpen); in beginSession()
297 fprintf(log->outputFile, "#sessionInfo releaseName %s\n", qpGetReleaseName()); in beginSession()
298 fprintf(log->outputFile, "#sessionInfo releaseId 0x%08x\n", qpGetReleaseId()); in beginSession()
299 fprintf(log->outputFile, "#sessionInfo targetName \"%s\"\n", qpGetTargetName()); in beginSession()
302 fprintf(log->outputFile, "#beginSession\n"); in beginSession()
303 qpTestLog_flushFile(log); in beginSession()
305 log->isSessionOpen = DE_TRUE; in beginSession()
310 static deBool endSession (qpTestLog* log) in endSession() argument
312 DE_ASSERT(log && log->isSessionOpen); in endSession()
315 qpXmlWriter_flush(log->writer); in endSession()
318 fprintf(log->outputFile, "\n#endSession\n"); in endSession()
319 qpTestLog_flushFile(log); in endSession()
321 log->isSessionOpen = DE_FALSE; in endSession()
326 /*--------------------------------------------------------------------*//*!
330 *//*--------------------------------------------------------------------*/
333 qpTestLog* log = (qpTestLog*)deCalloc(sizeof(qpTestLog)); in qpTestLog_createFileLog() local
334 if (!log) in qpTestLog_createFileLog()
340 ContainerStack_reset(&log->containerStack); in qpTestLog_createFileLog()
343 qpPrintf("Writing test log into %s\n", fileName); in qpTestLog_createFileLog()
346 log->outputFile = fopen(fileName, "wb"); in qpTestLog_createFileLog()
347 if (!log->outputFile) in qpTestLog_createFileLog()
349 qpPrintf("ERROR: Unable to open test log output file '%s'.\n", fileName); in qpTestLog_createFileLog()
350 qpTestLog_destroy(log); in qpTestLog_createFileLog()
354 log->flags = flags; in qpTestLog_createFileLog()
355 log->writer = qpXmlWriter_createFileWriter(log->outputFile, 0, !(flags & QP_TEST_LOG_NO_FLUSH)); in qpTestLog_createFileLog()
356 log->lock = deMutex_create(DE_NULL); in qpTestLog_createFileLog()
357 log->isSessionOpen = DE_FALSE; in qpTestLog_createFileLog()
358 log->isCaseOpen = DE_FALSE; in qpTestLog_createFileLog()
360 if (!log->writer) in qpTestLog_createFileLog()
363 qpTestLog_destroy(log); in qpTestLog_createFileLog()
367 if (!log->lock) in qpTestLog_createFileLog()
370 qpTestLog_destroy(log); in qpTestLog_createFileLog()
374 beginSession(log); in qpTestLog_createFileLog()
376 return log; in qpTestLog_createFileLog()
379 /*--------------------------------------------------------------------*//*!
382 *//*--------------------------------------------------------------------*/
383 void qpTestLog_destroy (qpTestLog* log) in qpTestLog_destroy() argument
385 DE_ASSERT(log); in qpTestLog_destroy()
387 if (log->isSessionOpen) in qpTestLog_destroy()
388 endSession(log); in qpTestLog_destroy()
390 if (log->writer) in qpTestLog_destroy()
391 qpXmlWriter_destroy(log->writer); in qpTestLog_destroy()
393 if (log->outputFile) in qpTestLog_destroy()
394 fclose(log->outputFile); in qpTestLog_destroy()
396 if (log->lock) in qpTestLog_destroy()
397 deMutex_destroy(log->lock); in qpTestLog_destroy()
399 deFree(log); in qpTestLog_destroy()
402 /*--------------------------------------------------------------------*//*!
403 * \brief Log start of test case
404 * \param log qpTestLog instance
408 *//*--------------------------------------------------------------------*/
409 deBool qpTestLog_startCase (qpTestLog* log, const char* testCasePath, qpTestCaseType testCaseType) in qpTestLog_startCase() argument
415 DE_ASSERT(log && testCasePath && (testCasePath[0] != 0)); in qpTestLog_startCase()
416 deMutex_lock(log->lock); in qpTestLog_startCase()
418 DE_ASSERT(!log->isCaseOpen); in qpTestLog_startCase()
419 DE_ASSERT(ContainerStack_isEmpty(&log->containerStack)); in qpTestLog_startCase()
422 qpXmlWriter_flush(log->writer); in qpTestLog_startCase()
423 fprintf(log->outputFile, "\n#beginTestCaseResult %s\n", testCasePath); in qpTestLog_startCase()
424 if (!(log->flags & QP_TEST_LOG_NO_FLUSH)) in qpTestLog_startCase()
425 qpTestLog_flushFile(log); in qpTestLog_startCase()
427 log->isCaseOpen = DE_TRUE; in qpTestLog_startCase()
434 if (!qpXmlWriter_startDocument(log->writer) || in qpTestLog_startCase()
435 !qpXmlWriter_startElement(log->writer, "TestCaseResult", numResultAttribs, resultAttribs)) in qpTestLog_startCase()
438 deMutex_unlock(log->lock); in qpTestLog_startCase()
442 deMutex_unlock(log->lock); in qpTestLog_startCase()
446 /*--------------------------------------------------------------------*//*!
447 * \brief Log end of test case
448 * \param log qpTestLog instance
452 *//*--------------------------------------------------------------------*/
453 deBool qpTestLog_endCase (qpTestLog* log, qpTestResult result, const char* resultDetails) in qpTestLog_endCase() argument
458 deMutex_lock(log->lock); in qpTestLog_endCase()
460 DE_ASSERT(log->isCaseOpen); in qpTestLog_endCase()
461 DE_ASSERT(ContainerStack_isEmpty(&log->containerStack)); in qpTestLog_endCase()
466 if (!qpXmlWriter_startElement(log->writer, "Result", 1, &statusAttrib) || in qpTestLog_endCase()
467 (resultDetails && !qpXmlWriter_writeString(log->writer, resultDetails)) || in qpTestLog_endCase()
468 !qpXmlWriter_endElement(log->writer, "Result") || in qpTestLog_endCase()
469 !qpXmlWriter_endElement(log->writer, "TestCaseResult") || in qpTestLog_endCase()
470 !qpXmlWriter_endDocument(log->writer)) /* Close any XML elements still open */ in qpTestLog_endCase()
473 deMutex_unlock(log->lock); in qpTestLog_endCase()
478 qpXmlWriter_flush(log->writer); in qpTestLog_endCase()
479 fprintf(log->outputFile, "\n#endTestCaseResult\n"); in qpTestLog_endCase()
480 if (!(log->flags & QP_TEST_LOG_NO_FLUSH)) in qpTestLog_endCase()
481 qpTestLog_flushFile(log); in qpTestLog_endCase()
483 log->isCaseOpen = DE_FALSE; in qpTestLog_endCase()
485 deMutex_unlock(log->lock); in qpTestLog_endCase()
489 deBool qpTestLog_startTestsCasesTime (qpTestLog* log) in qpTestLog_startTestsCasesTime() argument
491 DE_ASSERT(log); in qpTestLog_startTestsCasesTime()
492 deMutex_lock(log->lock); in qpTestLog_startTestsCasesTime()
495 qpXmlWriter_flush(log->writer); in qpTestLog_startTestsCasesTime()
496 fprintf(log->outputFile, "\n#beginTestsCasesTime\n"); in qpTestLog_startTestsCasesTime()
498 log->isCaseOpen = DE_TRUE; in qpTestLog_startTestsCasesTime()
500 if (!qpXmlWriter_startDocument(log->writer) || in qpTestLog_startTestsCasesTime()
501 !qpXmlWriter_startElement(log->writer, "TestsCasesTime", 0, (const qpXmlAttribute*)DE_NULL)) in qpTestLog_startTestsCasesTime()
504 deMutex_unlock(log->lock); in qpTestLog_startTestsCasesTime()
508 deMutex_unlock(log->lock); in qpTestLog_startTestsCasesTime()
512 deBool qpTestLog_endTestsCasesTime (qpTestLog* log) in qpTestLog_endTestsCasesTime() argument
514 DE_ASSERT(log); in qpTestLog_endTestsCasesTime()
515 deMutex_lock(log->lock); in qpTestLog_endTestsCasesTime()
517 DE_ASSERT(log->isCaseOpen); in qpTestLog_endTestsCasesTime()
519 if (!qpXmlWriter_endElement(log->writer, "TestsCasesTime") || in qpTestLog_endTestsCasesTime()
520 !qpXmlWriter_endDocument(log->writer)) in qpTestLog_endTestsCasesTime()
523 deMutex_unlock(log->lock); in qpTestLog_endTestsCasesTime()
527 qpXmlWriter_flush(log->writer); in qpTestLog_endTestsCasesTime()
529 fprintf(log->outputFile, "\n#endTestsCasesTime\n"); in qpTestLog_endTestsCasesTime()
531 log->isCaseOpen = DE_FALSE; in qpTestLog_endTestsCasesTime()
533 deMutex_unlock(log->lock); in qpTestLog_endTestsCasesTime()
538 /*--------------------------------------------------------------------*//*!
540 * \param log qpTestLog instance
543 *//*--------------------------------------------------------------------*/
544 deBool qpTestLog_terminateCase (qpTestLog* log, qpTestResult result) in qpTestLog_terminateCase() argument
548 DE_ASSERT(log); in qpTestLog_terminateCase()
551 deMutex_lock(log->lock); in qpTestLog_terminateCase()
553 if (!log->isCaseOpen) in qpTestLog_terminateCase()
555 deMutex_unlock(log->lock); in qpTestLog_terminateCase()
560 qpXmlWriter_flush(log->writer); in qpTestLog_terminateCase()
561 fprintf(log->outputFile, "\n#terminateTestCaseResult %s\n", resultStr); in qpTestLog_terminateCase()
562 qpTestLog_flushFile(log); in qpTestLog_terminateCase()
564 log->isCaseOpen = DE_FALSE; in qpTestLog_terminateCase()
567 ContainerStack_reset(&log->containerStack); in qpTestLog_terminateCase()
570 deMutex_unlock(log->lock); in qpTestLog_terminateCase()
574 static deBool qpTestLog_writeKeyValuePair (qpTestLog* log, const char* elementName, const char* nam… in qpTestLog_writeKeyValuePair() argument
580 DE_ASSERT(log && elementName && text); in qpTestLog_writeKeyValuePair()
581 deMutex_lock(log->lock); in qpTestLog_writeKeyValuePair()
589 if (!qpXmlWriter_startElement(log->writer, elementName, numAttribs, attribs) || in qpTestLog_writeKeyValuePair()
590 !qpXmlWriter_writeString(log->writer, text) || in qpTestLog_writeKeyValuePair()
591 !qpXmlWriter_endElement(log->writer, elementName)) in qpTestLog_writeKeyValuePair()
594 deMutex_unlock(log->lock); in qpTestLog_writeKeyValuePair()
598 deMutex_unlock(log->lock); in qpTestLog_writeKeyValuePair()
602 /*--------------------------------------------------------------------*//*!
603 * \brief Write key-value-pair into log
604 * \param log qpTestLog instance
608 * \param value Value of the key-value-pair
610 *//*--------------------------------------------------------------------*/
611 deBool qpTestLog_writeText (qpTestLog* log, const char* name, const char* description, qpKeyValueTa… in qpTestLog_writeText() argument
614 return qpTestLog_writeKeyValuePair(log, "Text", name, description, DE_NULL, tag, text); in qpTestLog_writeText()
617 /*--------------------------------------------------------------------*//*!
618 * \brief Write key-value-pair into log
619 * \param log qpTestLog instance
623 * \param value Value of the key-value-pair
625 *//*--------------------------------------------------------------------*/
626 deBool qpTestLog_writeInteger (qpTestLog* log, const char* name, const char* description, const cha… in qpTestLog_writeInteger() argument
632 return qpTestLog_writeKeyValuePair(log, "Number", name, description, unit, tag, tmpString); in qpTestLog_writeInteger()
635 /*--------------------------------------------------------------------*//*!
636 * \brief Write key-value-pair into log
637 * \param log qpTestLog instance
641 * \param value Value of the key-value-pair
643 *//*--------------------------------------------------------------------*/
644 deBool qpTestLog_writeFloat (qpTestLog* log, const char* name, const char* description, const char*… in qpTestLog_writeFloat() argument
650 return qpTestLog_writeKeyValuePair(log, "Number", name, description, unit, tag, tmpString); in qpTestLog_writeFloat()
662 buffer->capacity = 0; in Buffer_init()
663 buffer->size = 0; in Buffer_init()
664 buffer->data = DE_NULL; in Buffer_init()
669 deFree(buffer->data); in Buffer_deinit()
676 if (newSize > buffer->capacity) in Buffer_resize()
678 size_t newCapacity = (size_t)deAlign32(deMax32(2*(int)buffer->capacity, (int)newSize), 512); in Buffer_resize()
683 memcpy(newData, buffer->data, buffer->size); in Buffer_resize()
684 deFree(buffer->data); in Buffer_resize()
685 buffer->data = newData; in Buffer_resize()
686 buffer->capacity = newCapacity; in Buffer_resize()
689 buffer->size = newSize; in Buffer_resize()
695 size_t offset = buffer->size; in Buffer_append()
697 if (!Buffer_resize(buffer, buffer->size + numBytes)) in Buffer_append()
701 memcpy(&buffer->data[offset], data, numBytes); in Buffer_append()
786 /*--------------------------------------------------------------------*//*!
788 * \param log qpTestLog instance
792 *//*--------------------------------------------------------------------*/
793 deBool qpTestLog_startImageSet (qpTestLog* log, const char* name, const char* description) in qpTestLog_startImageSet() argument
798 DE_ASSERT(log && name); in qpTestLog_startImageSet()
799 deMutex_lock(log->lock); in qpTestLog_startImageSet()
806 if (!qpXmlWriter_startElement(log->writer, "ImageSet", numAttribs, attribs)) in qpTestLog_startImageSet()
809 deMutex_unlock(log->lock); in qpTestLog_startImageSet()
813 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_IMAGESET)); in qpTestLog_startImageSet()
815 deMutex_unlock(log->lock); in qpTestLog_startImageSet()
819 /*--------------------------------------------------------------------*//*!
821 * \param log qpTestLog instance
823 *//*--------------------------------------------------------------------*/
824 deBool qpTestLog_endImageSet (qpTestLog* log) in qpTestLog_endImageSet() argument
826 DE_ASSERT(log); in qpTestLog_endImageSet()
827 deMutex_lock(log->lock); in qpTestLog_endImageSet()
830 if (!qpXmlWriter_endElement(log->writer, "ImageSet")) in qpTestLog_endImageSet()
833 deMutex_unlock(log->lock); in qpTestLog_endImageSet()
837 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_IMAGESET); in qpTestLog_endImageSet()
839 deMutex_unlock(log->lock); in qpTestLog_endImageSet()
843 /*--------------------------------------------------------------------*//*!
844 * \brief Write base64 encoded raw image data into log
845 * \param log qpTestLog instance
855 *//*--------------------------------------------------------------------*/
857 qpTestLog* log, in qpTestLog_writeImage() argument
875 DE_ASSERT(log && name); in qpTestLog_writeImage()
880 if (log->flags & QP_TEST_LOG_EXCLUDE_IMAGES) in qpTestLog_writeImage()
907 /* Fall-back to default compression. */ in qpTestLog_writeImage()
908 qpPrintf("WARNING: PNG compression failed -- storing image uncompressed.\n"); in qpTestLog_writeImage()
926 /* Need to re-pack pixels. */ in qpTestLog_writeImage()
967 /* \note Log lock is acquired after compression! */ in qpTestLog_writeImage()
968 deMutex_lock(log->lock); in qpTestLog_writeImage()
971 if (!qpXmlWriter_startElement(log->writer, "Image", numAttribs, attribs) || in qpTestLog_writeImage()
972 !qpXmlWriter_writeBase64(log->writer, (const deUint8*)writeDataPtr, writeDataBytes) || in qpTestLog_writeImage()
973 !qpXmlWriter_endElement(log->writer, "Image")) in qpTestLog_writeImage()
976 deMutex_unlock(log->lock); in qpTestLog_writeImage()
981 deMutex_unlock(log->lock); in qpTestLog_writeImage()
989 /*--------------------------------------------------------------------*//*!
990 * \brief Write a OpenGL ES shader program into the log.
992 * \param linkInfoLog Implementation provided linkage log
993 *//*--------------------------------------------------------------------*/
994 deBool qpTestLog_startShaderProgram (qpTestLog* log, deBool linkOk, const char* linkInfoLog) in qpTestLog_startShaderProgram() argument
999 DE_ASSERT(log); in qpTestLog_startShaderProgram()
1000 deMutex_lock(log->lock); in qpTestLog_startShaderProgram()
1004 if (!qpXmlWriter_startElement(log->writer, "ShaderProgram", numProgramAttribs, programAttribs) || in qpTestLog_startShaderProgram()
1005 !qpXmlWriter_writeStringElement(log->writer, "InfoLog", linkInfoLog)) in qpTestLog_startShaderProgram()
1008 deMutex_unlock(log->lock); in qpTestLog_startShaderProgram()
1012 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_SHADERPROGRAM)); in qpTestLog_startShaderProgram()
1014 deMutex_unlock(log->lock); in qpTestLog_startShaderProgram()
1018 /*--------------------------------------------------------------------*//*!
1020 * \param log qpTestLog instance
1022 *//*--------------------------------------------------------------------*/
1023 deBool qpTestLog_endShaderProgram (qpTestLog* log) in qpTestLog_endShaderProgram() argument
1025 DE_ASSERT(log); in qpTestLog_endShaderProgram()
1026 deMutex_lock(log->lock); in qpTestLog_endShaderProgram()
1029 if (!qpXmlWriter_endElement(log->writer, "ShaderProgram")) in qpTestLog_endShaderProgram()
1032 deMutex_unlock(log->lock); in qpTestLog_endShaderProgram()
1036 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_SHADERPROGRAM); in qpTestLog_endShaderProgram()
1038 deMutex_unlock(log->lock); in qpTestLog_endShaderProgram()
1042 /*--------------------------------------------------------------------*//*!
1043 * \brief Write a OpenGL ES shader into the log.
1047 * \param infoLog Implementation provided shader compilation log
1048 *//*--------------------------------------------------------------------*/
1049 deBool qpTestLog_writeShader (qpTestLog* log, qpShaderType type, const char* source, deBool compile… in qpTestLog_writeShader() argument
1052 …const char* sourceStr = ((log->flags & QP_TEST_LOG_EXCLUDE_SHADER_SOURCES) == 0 || !compileOk) … in qpTestLog_writeShader()
1056 deMutex_lock(log->lock); in qpTestLog_writeShader()
1059 DE_ASSERT(ContainerStack_getTop(&log->containerStack) == CONTAINERTYPE_SHADERPROGRAM); in qpTestLog_writeShader()
1063 if (!qpXmlWriter_startElement(log->writer, tagName, numShaderAttribs, shaderAttribs) || in qpTestLog_writeShader()
1064 !qpXmlWriter_writeStringElement(log->writer, "ShaderSource", sourceStr) || in qpTestLog_writeShader()
1065 !qpXmlWriter_writeStringElement(log->writer, "InfoLog", infoLog) || in qpTestLog_writeShader()
1066 !qpXmlWriter_endElement(log->writer, tagName)) in qpTestLog_writeShader()
1069 deMutex_unlock(log->lock); in qpTestLog_writeShader()
1073 deMutex_unlock(log->lock); in qpTestLog_writeShader()
1077 /*--------------------------------------------------------------------*//*!
1078 * \brief Start writing a set of EGL configurations into the log.
1079 *//*--------------------------------------------------------------------*/
1080 deBool qpTestLog_startEglConfigSet (qpTestLog* log, const char* name, const char* description) in qpTestLog_startEglConfigSet() argument
1085 DE_ASSERT(log && name); in qpTestLog_startEglConfigSet()
1086 deMutex_lock(log->lock); in qpTestLog_startEglConfigSet()
1093 if (!qpXmlWriter_startElement(log->writer, "EglConfigSet", numAttribs, attribs)) in qpTestLog_startEglConfigSet()
1096 deMutex_unlock(log->lock); in qpTestLog_startEglConfigSet()
1100 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_EGLCONFIGSET)); in qpTestLog_startEglConfigSet()
1102 deMutex_unlock(log->lock); in qpTestLog_startEglConfigSet()
1106 /*--------------------------------------------------------------------*//*!
1108 *//*--------------------------------------------------------------------*/
1109 deBool qpTestLog_endEglConfigSet (qpTestLog* log) in qpTestLog_endEglConfigSet() argument
1111 DE_ASSERT(log); in qpTestLog_endEglConfigSet()
1112 deMutex_lock(log->lock); in qpTestLog_endEglConfigSet()
1115 if (!qpXmlWriter_endElement(log->writer, "EglConfigSet")) in qpTestLog_endEglConfigSet()
1118 deMutex_unlock(log->lock); in qpTestLog_endEglConfigSet()
1122 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_EGLCONFIGSET); in qpTestLog_endEglConfigSet()
1124 deMutex_unlock(log->lock); in qpTestLog_endEglConfigSet()
1128 /*--------------------------------------------------------------------*//*!
1131 *//*--------------------------------------------------------------------*/
1132 deBool qpTestLog_writeEglConfig (qpTestLog* log, const qpEglConfigInfo* config) in qpTestLog_writeEglConfig() argument
1137 DE_ASSERT(log && config); in qpTestLog_writeEglConfig()
1138 deMutex_lock(log->lock); in qpTestLog_writeEglConfig()
1140 attribs[numAttribs++] = qpSetIntAttrib ("BufferSize", config->bufferSize); in qpTestLog_writeEglConfig()
1141 attribs[numAttribs++] = qpSetIntAttrib ("RedSize", config->redSize); in qpTestLog_writeEglConfig()
1142 attribs[numAttribs++] = qpSetIntAttrib ("GreenSize", config->greenSize); in qpTestLog_writeEglConfig()
1143 attribs[numAttribs++] = qpSetIntAttrib ("BlueSize", config->blueSize); in qpTestLog_writeEglConfig()
1144 attribs[numAttribs++] = qpSetIntAttrib ("LuminanceSize", config->luminanceSize); in qpTestLog_writeEglConfig()
1145 attribs[numAttribs++] = qpSetIntAttrib ("AlphaSize", config->alphaSize); in qpTestLog_writeEglConfig()
1146 attribs[numAttribs++] = qpSetIntAttrib ("AlphaMaskSize", config->alphaMaskSize); in qpTestLog_writeEglConfig()
1147 attribs[numAttribs++] = qpSetBoolAttrib ("BindToTextureRGB", config->bindToTextureRGB); in qpTestLog_writeEglConfig()
1148 attribs[numAttribs++] = qpSetBoolAttrib ("BindToTextureRGBA", config->bindToTextureRGBA); in qpTestLog_writeEglConfig()
1149 attribs[numAttribs++] = qpSetStringAttrib ("ColorBufferType", config->colorBufferType); in qpTestLog_writeEglConfig()
1150 attribs[numAttribs++] = qpSetStringAttrib ("ConfigCaveat", config->configCaveat); in qpTestLog_writeEglConfig()
1151 attribs[numAttribs++] = qpSetIntAttrib ("ConfigID", config->configID); in qpTestLog_writeEglConfig()
1152 attribs[numAttribs++] = qpSetStringAttrib ("Conformant", config->conformant); in qpTestLog_writeEglConfig()
1153 attribs[numAttribs++] = qpSetIntAttrib ("DepthSize", config->depthSize); in qpTestLog_writeEglConfig()
1154 attribs[numAttribs++] = qpSetIntAttrib ("Level", config->level); in qpTestLog_writeEglConfig()
1155 attribs[numAttribs++] = qpSetIntAttrib ("MaxPBufferWidth", config->maxPBufferWidth); in qpTestLog_writeEglConfig()
1156 attribs[numAttribs++] = qpSetIntAttrib ("MaxPBufferHeight", config->maxPBufferHeight); in qpTestLog_writeEglConfig()
1157 attribs[numAttribs++] = qpSetIntAttrib ("MaxPBufferPixels", config->maxPBufferPixels); in qpTestLog_writeEglConfig()
1158 attribs[numAttribs++] = qpSetIntAttrib ("MaxSwapInterval", config->maxSwapInterval); in qpTestLog_writeEglConfig()
1159 attribs[numAttribs++] = qpSetIntAttrib ("MinSwapInterval", config->minSwapInterval); in qpTestLog_writeEglConfig()
1160 attribs[numAttribs++] = qpSetBoolAttrib ("NativeRenderable", config->nativeRenderable); in qpTestLog_writeEglConfig()
1161 attribs[numAttribs++] = qpSetStringAttrib ("RenderableType", config->renderableType); in qpTestLog_writeEglConfig()
1162 attribs[numAttribs++] = qpSetIntAttrib ("SampleBuffers", config->sampleBuffers); in qpTestLog_writeEglConfig()
1163 attribs[numAttribs++] = qpSetIntAttrib ("Samples", config->samples); in qpTestLog_writeEglConfig()
1164 attribs[numAttribs++] = qpSetIntAttrib ("StencilSize", config->stencilSize); in qpTestLog_writeEglConfig()
1165 attribs[numAttribs++] = qpSetStringAttrib ("SurfaceTypes", config->surfaceTypes); in qpTestLog_writeEglConfig()
1166 attribs[numAttribs++] = qpSetStringAttrib ("TransparentType", config->transparentType); in qpTestLog_writeEglConfig()
1167 attribs[numAttribs++] = qpSetIntAttrib ("TransparentRedValue", config->transparentRedValue); in qpTestLog_writeEglConfig()
1168 attribs[numAttribs++] = qpSetIntAttrib ("TransparentGreenValue", config->transparentGreenValue); in qpTestLog_writeEglConfig()
1169 attribs[numAttribs++] = qpSetIntAttrib ("TransparentBlueValue", config->transparentBlueValue); in qpTestLog_writeEglConfig()
1172 if (!qpXmlWriter_startElement(log->writer, "EglConfig", numAttribs, attribs) || in qpTestLog_writeEglConfig()
1173 !qpXmlWriter_endElement(log->writer, "EglConfig")) in qpTestLog_writeEglConfig()
1176 deMutex_unlock(log->lock); in qpTestLog_writeEglConfig()
1180 deMutex_unlock(log->lock); in qpTestLog_writeEglConfig()
1184 /*--------------------------------------------------------------------*//*!
1185 * \brief Start section in log.
1186 * \param log qpTestLog instance
1190 *//*--------------------------------------------------------------------*/
1191 deBool qpTestLog_startSection (qpTestLog* log, const char* name, const char* description) in qpTestLog_startSection() argument
1196 DE_ASSERT(log && name); in qpTestLog_startSection()
1197 deMutex_lock(log->lock); in qpTestLog_startSection()
1204 if (!qpXmlWriter_startElement(log->writer, "Section", numAttribs, attribs)) in qpTestLog_startSection()
1207 deMutex_unlock(log->lock); in qpTestLog_startSection()
1211 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_SECTION)); in qpTestLog_startSection()
1213 deMutex_unlock(log->lock); in qpTestLog_startSection()
1217 /*--------------------------------------------------------------------*//*!
1218 * \brief End section in log.
1219 * \param log qpTestLog instance
1221 *//*--------------------------------------------------------------------*/
1222 deBool qpTestLog_endSection (qpTestLog* log) in qpTestLog_endSection() argument
1224 DE_ASSERT(log); in qpTestLog_endSection()
1225 deMutex_lock(log->lock); in qpTestLog_endSection()
1228 if (!qpXmlWriter_endElement(log->writer, "Section")) in qpTestLog_endSection()
1231 deMutex_unlock(log->lock); in qpTestLog_endSection()
1235 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_SECTION); in qpTestLog_endSection()
1237 deMutex_unlock(log->lock); in qpTestLog_endSection()
1241 /*--------------------------------------------------------------------*//*!
1242 * \brief Write OpenCL compute kernel source into the log.
1243 *//*--------------------------------------------------------------------*/
1244 deBool qpTestLog_writeKernelSource (qpTestLog* log, const char* source) in qpTestLog_writeKernelSource() argument
1246 const char* sourceStr = (log->flags & QP_TEST_LOG_EXCLUDE_SHADER_SOURCES) != 0 ? "" : source; in qpTestLog_writeKernelSource()
1248 DE_ASSERT(log); in qpTestLog_writeKernelSource()
1249 deMutex_lock(log->lock); in qpTestLog_writeKernelSource()
1251 if (!qpXmlWriter_writeStringElement(log->writer, "KernelSource", sourceStr)) in qpTestLog_writeKernelSource()
1254 deMutex_unlock(log->lock); in qpTestLog_writeKernelSource()
1258 deMutex_unlock(log->lock); in qpTestLog_writeKernelSource()
1262 /*--------------------------------------------------------------------*//*!
1263 * \brief Write a SPIR-V module assembly source into the log.
1264 *//*--------------------------------------------------------------------*/
1265 deBool qpTestLog_writeSpirVAssemblySource (qpTestLog* log, const char* source) in qpTestLog_writeSpirVAssemblySource() argument
1267 const char* const sourceStr = (log->flags & QP_TEST_LOG_EXCLUDE_SHADER_SOURCES) != 0 ? "" : source; in qpTestLog_writeSpirVAssemblySource()
1269 deMutex_lock(log->lock); in qpTestLog_writeSpirVAssemblySource()
1271 DE_ASSERT(ContainerStack_getTop(&log->containerStack) == CONTAINERTYPE_SHADERPROGRAM); in qpTestLog_writeSpirVAssemblySource()
1273 if (!qpXmlWriter_writeStringElement(log->writer, "SpirVAssemblySource", sourceStr)) in qpTestLog_writeSpirVAssemblySource()
1276 deMutex_unlock(log->lock); in qpTestLog_writeSpirVAssemblySource()
1280 deMutex_unlock(log->lock); in qpTestLog_writeSpirVAssemblySource()
1284 /*--------------------------------------------------------------------*//*!
1285 * \brief Write OpenCL kernel compilation results into the log
1286 *//*--------------------------------------------------------------------*/
1287 deBool qpTestLog_writeCompileInfo (qpTestLog* log, const char* name, const char* description, deBoo… in qpTestLog_writeCompileInfo() argument
1292 DE_ASSERT(log && name && description && infoLog); in qpTestLog_writeCompileInfo()
1293 deMutex_lock(log->lock); in qpTestLog_writeCompileInfo()
1299 if (!qpXmlWriter_startElement(log->writer, "CompileInfo", numAttribs, attribs) || in qpTestLog_writeCompileInfo()
1300 !qpXmlWriter_writeStringElement(log->writer, "InfoLog", infoLog) || in qpTestLog_writeCompileInfo()
1301 !qpXmlWriter_endElement(log->writer, "CompileInfo")) in qpTestLog_writeCompileInfo()
1304 deMutex_unlock(log->lock); in qpTestLog_writeCompileInfo()
1308 deMutex_unlock(log->lock); in qpTestLog_writeCompileInfo()
1312 deBool qpTestLog_startSampleList (qpTestLog* log, const char* name, const char* description) in qpTestLog_startSampleList() argument
1317 DE_ASSERT(log && name && description); in qpTestLog_startSampleList()
1318 deMutex_lock(log->lock); in qpTestLog_startSampleList()
1323 if (!qpXmlWriter_startElement(log->writer, "SampleList", numAttribs, attribs)) in qpTestLog_startSampleList()
1326 deMutex_unlock(log->lock); in qpTestLog_startSampleList()
1330 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_SAMPLELIST)); in qpTestLog_startSampleList()
1332 deMutex_unlock(log->lock); in qpTestLog_startSampleList()
1336 deBool qpTestLog_startSampleInfo (qpTestLog* log) in qpTestLog_startSampleInfo() argument
1338 DE_ASSERT(log); in qpTestLog_startSampleInfo()
1339 deMutex_lock(log->lock); in qpTestLog_startSampleInfo()
1341 if (!qpXmlWriter_startElement(log->writer, "SampleInfo", 0, DE_NULL)) in qpTestLog_startSampleInfo()
1344 deMutex_unlock(log->lock); in qpTestLog_startSampleInfo()
1348 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_SAMPLEINFO)); in qpTestLog_startSampleInfo()
1350 deMutex_unlock(log->lock); in qpTestLog_startSampleInfo()
1354 deBool qpTestLog_writeValueInfo (qpTestLog* log, const char* name, const char* description, const c… in qpTestLog_writeValueInfo() argument
1360 DE_ASSERT(log && name && description && tagName); in qpTestLog_writeValueInfo()
1361 deMutex_lock(log->lock); in qpTestLog_writeValueInfo()
1363 DE_ASSERT(ContainerStack_getTop(&log->containerStack) == CONTAINERTYPE_SAMPLEINFO); in qpTestLog_writeValueInfo()
1372 if (!qpXmlWriter_startElement(log->writer, "ValueInfo", numAttribs, attribs) || in qpTestLog_writeValueInfo()
1373 !qpXmlWriter_endElement(log->writer, "ValueInfo")) in qpTestLog_writeValueInfo()
1376 deMutex_unlock(log->lock); in qpTestLog_writeValueInfo()
1380 deMutex_unlock(log->lock); in qpTestLog_writeValueInfo()
1384 deBool qpTestLog_endSampleInfo (qpTestLog* log) in qpTestLog_endSampleInfo() argument
1386 DE_ASSERT(log); in qpTestLog_endSampleInfo()
1387 deMutex_lock(log->lock); in qpTestLog_endSampleInfo()
1389 if (!qpXmlWriter_endElement(log->writer, "SampleInfo")) in qpTestLog_endSampleInfo()
1392 deMutex_unlock(log->lock); in qpTestLog_endSampleInfo()
1396 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_SAMPLEINFO); in qpTestLog_endSampleInfo()
1398 deMutex_unlock(log->lock); in qpTestLog_endSampleInfo()
1402 deBool qpTestLog_startSample (qpTestLog* log) in qpTestLog_startSample() argument
1404 DE_ASSERT(log); in qpTestLog_startSample()
1405 deMutex_lock(log->lock); in qpTestLog_startSample()
1407 DE_ASSERT(ContainerStack_getTop(&log->containerStack) == CONTAINERTYPE_SAMPLELIST); in qpTestLog_startSample()
1409 if (!qpXmlWriter_startElement(log->writer, "Sample", 0, DE_NULL)) in qpTestLog_startSample()
1412 deMutex_unlock(log->lock); in qpTestLog_startSample()
1416 DE_ASSERT(ContainerStack_push(&log->containerStack, CONTAINERTYPE_SAMPLE)); in qpTestLog_startSample()
1418 deMutex_unlock(log->lock); in qpTestLog_startSample()
1422 deBool qpTestLog_writeValueFloat (qpTestLog* log, double value) in qpTestLog_writeValueFloat() argument
1427 deMutex_lock(log->lock); in qpTestLog_writeValueFloat()
1429 DE_ASSERT(ContainerStack_getTop(&log->containerStack) == CONTAINERTYPE_SAMPLE); in qpTestLog_writeValueFloat()
1431 if (!qpXmlWriter_writeStringElement(log->writer, "Value", &tmpString[0])) in qpTestLog_writeValueFloat()
1434 deMutex_unlock(log->lock); in qpTestLog_writeValueFloat()
1438 deMutex_unlock(log->lock); in qpTestLog_writeValueFloat()
1442 deBool qpTestLog_writeValueInteger (qpTestLog* log, deInt64 value) in qpTestLog_writeValueInteger() argument
1447 deMutex_lock(log->lock); in qpTestLog_writeValueInteger()
1449 DE_ASSERT(ContainerStack_getTop(&log->containerStack) == CONTAINERTYPE_SAMPLE); in qpTestLog_writeValueInteger()
1451 if (!qpXmlWriter_writeStringElement(log->writer, "Value", &tmpString[0])) in qpTestLog_writeValueInteger()
1454 deMutex_unlock(log->lock); in qpTestLog_writeValueInteger()
1458 deMutex_unlock(log->lock); in qpTestLog_writeValueInteger()
1462 deBool qpTestLog_endSample (qpTestLog* log) in qpTestLog_endSample() argument
1464 DE_ASSERT(log); in qpTestLog_endSample()
1465 deMutex_lock(log->lock); in qpTestLog_endSample()
1467 if (!qpXmlWriter_endElement(log->writer, "Sample")) in qpTestLog_endSample()
1470 deMutex_unlock(log->lock); in qpTestLog_endSample()
1474 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_SAMPLE); in qpTestLog_endSample()
1476 deMutex_unlock(log->lock); in qpTestLog_endSample()
1480 deBool qpTestLog_endSampleList (qpTestLog* log) in qpTestLog_endSampleList() argument
1482 DE_ASSERT(log); in qpTestLog_endSampleList()
1483 deMutex_lock(log->lock); in qpTestLog_endSampleList()
1485 if (!qpXmlWriter_endElement(log->writer, "SampleList")) in qpTestLog_endSampleList()
1488 deMutex_unlock(log->lock); in qpTestLog_endSampleList()
1492 DE_ASSERT(ContainerStack_pop(&log->containerStack) == CONTAINERTYPE_SAMPLELIST); in qpTestLog_endSampleList()
1494 deMutex_unlock(log->lock); in qpTestLog_endSampleList()
1498 deUint32 qpTestLog_getLogFlags (const qpTestLog* log) in qpTestLog_getLogFlags() argument
1500 DE_ASSERT(log); in qpTestLog_getLogFlags()
1501 return log->flags; in qpTestLog_getLogFlags()