qopengldebug.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopengldebug.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4static QOpenGLDebugMessage::Source qt_messageSourceFromGL(GLenum source)-
5{-
6 switch (source) {-
7 case
never executed: case 0x8246:
0x8246:
never executed: case 0x8246:
0
8 return
never executed: return QOpenGLDebugMessage::APISource;
QOpenGLDebugMessage::APISource;
never executed: return QOpenGLDebugMessage::APISource;
0
9 case
never executed: case 0x8247:
0x8247:
never executed: case 0x8247:
0
10 return
never executed: return QOpenGLDebugMessage::WindowSystemSource;
QOpenGLDebugMessage::WindowSystemSource;
never executed: return QOpenGLDebugMessage::WindowSystemSource;
0
11 case
never executed: case 0x8248:
0x8248:
never executed: case 0x8248:
0
12 return
never executed: return QOpenGLDebugMessage::ShaderCompilerSource;
QOpenGLDebugMessage::ShaderCompilerSource;
never executed: return QOpenGLDebugMessage::ShaderCompilerSource;
0
13 case
never executed: case 0x8249:
0x8249:
never executed: case 0x8249:
0
14 return
never executed: return QOpenGLDebugMessage::ThirdPartySource;
QOpenGLDebugMessage::ThirdPartySource;
never executed: return QOpenGLDebugMessage::ThirdPartySource;
0
15 case
never executed: case 0x824A:
0x824A:
never executed: case 0x824A:
0
16 return
never executed: return QOpenGLDebugMessage::ApplicationSource;
QOpenGLDebugMessage::ApplicationSource;
never executed: return QOpenGLDebugMessage::ApplicationSource;
0
17 case
never executed: case 0x824B:
0x824B:
never executed: case 0x824B:
0
18 return
never executed: return QOpenGLDebugMessage::OtherSource;
QOpenGLDebugMessage::OtherSource;
never executed: return QOpenGLDebugMessage::OtherSource;
0
19 }-
20-
21 ((!(false)) ? qt_assert_x(__PRETTY_FUNCTION__, "Unknown message source from GL",__FILE__,631) : qt_noop());-
22 return
never executed: return QOpenGLDebugMessage::OtherSource;
QOpenGLDebugMessage::OtherSource;
never executed: return QOpenGLDebugMessage::OtherSource;
0
23}-
24-
25-
26-
27-
28static GLenum qt_messageSourceToGL(QOpenGLDebugMessage::Source source)-
29{-
30 switch (source) {-
31 case
never executed: case QOpenGLDebugMessage::InvalidSource:
QOpenGLDebugMessage::InvalidSource:
never executed: case QOpenGLDebugMessage::InvalidSource:
0
32 break;
never executed: break;
0
33 case
never executed: case QOpenGLDebugMessage::APISource:
QOpenGLDebugMessage::APISource:
never executed: case QOpenGLDebugMessage::APISource:
0
34 return
never executed: return 0x8246;
0x8246;
never executed: return 0x8246;
0
35 case
never executed: case QOpenGLDebugMessage::WindowSystemSource:
QOpenGLDebugMessage::WindowSystemSource:
never executed: case QOpenGLDebugMessage::WindowSystemSource:
0
36 return
never executed: return 0x8247;
0x8247;
never executed: return 0x8247;
0
37 case
never executed: case QOpenGLDebugMessage::ShaderCompilerSource:
QOpenGLDebugMessage::ShaderCompilerSource:
never executed: case QOpenGLDebugMessage::ShaderCompilerSource:
0
38 return
never executed: return 0x8248;
0x8248;
never executed: return 0x8248;
0
39 case
never executed: case QOpenGLDebugMessage::ThirdPartySource:
QOpenGLDebugMessage::ThirdPartySource:
never executed: case QOpenGLDebugMessage::ThirdPartySource:
0
40 return
never executed: return 0x8249;
0x8249;
never executed: return 0x8249;
0
41 case
never executed: case QOpenGLDebugMessage::ApplicationSource:
QOpenGLDebugMessage::ApplicationSource:
never executed: case QOpenGLDebugMessage::ApplicationSource:
0
42 return
never executed: return 0x824A;
0x824A;
never executed: return 0x824A;
0
43 case
never executed: case QOpenGLDebugMessage::OtherSource:
QOpenGLDebugMessage::OtherSource:
never executed: case QOpenGLDebugMessage::OtherSource:
0
44 return
never executed: return 0x824B;
0x824B;
never executed: return 0x824B;
0
45 case
never executed: case QOpenGLDebugMessage::AnySource:
QOpenGLDebugMessage::AnySource:
never executed: case QOpenGLDebugMessage::AnySource:
0
46 break;
never executed: break;
0
47 }-
48-
49 ((!(false)) ? qt_assert_x(__PRETTY_FUNCTION__, "Invalid message source",__FILE__,659) : qt_noop());-
50 return
never executed: return 0x824B;
0x824B;
never executed: return 0x824B;
0
51}-
52-
53-
54-
55-
56static QString qt_messageSourceToString(QOpenGLDebugMessage::Source source)-
57{-
58 switch (source) {-
59 case
never executed: case QOpenGLDebugMessage::InvalidSource:
QOpenGLDebugMessage::InvalidSource:
never executed: case QOpenGLDebugMessage::InvalidSource:
0
60 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "InvalidSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "InvalidSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "InvalidSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "InvalidSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "InvalidSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "InvalidSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
61 case
never executed: case QOpenGLDebugMessage::APISource:
QOpenGLDebugMessage::APISource:
never executed: case QOpenGLDebugMessage::APISource:
0
62 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "APISource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "APISource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "APISource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "APISource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "APISource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "APISource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
63 case
never executed: case QOpenGLDebugMessage::WindowSystemSource:
QOpenGLDebugMessage::WindowSystemSource:
never executed: case QOpenGLDebugMessage::WindowSystemSource:
0
64 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "WindowSystemSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "WindowSystemSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "WindowSystemSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "WindowSystemSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "WindowSystemSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "WindowSystemSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
65 case
never executed: case QOpenGLDebugMessage::ShaderCompilerSource:
QOpenGLDebugMessage::ShaderCompilerSource:
never executed: case QOpenGLDebugMessage::ShaderCompilerSource:
0
66 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "ShaderCompilerSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ShaderCompilerSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "ShaderCompilerSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ShaderCompilerSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "ShaderCompilerSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ShaderCompilerSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
67 case
never executed: case QOpenGLDebugMessage::ThirdPartySource:
QOpenGLDebugMessage::ThirdPartySource:
never executed: case QOpenGLDebugMessage::ThirdPartySource:
0
68 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "ThirdPartySource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ThirdPartySource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "ThirdPartySource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ThirdPartySource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "ThirdPartySource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ThirdPartySource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
69 case
never executed: case QOpenGLDebugMessage::ApplicationSource:
QOpenGLDebugMessage::ApplicationSource:
never executed: case QOpenGLDebugMessage::ApplicationSource:
0
70 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "ApplicationSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ApplicationSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "ApplicationSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ApplicationSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "ApplicationSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ApplicationSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
71 case
never executed: case QOpenGLDebugMessage::OtherSource:
QOpenGLDebugMessage::OtherSource:
never executed: case QOpenGLDebugMessage::OtherSource:
0
72 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "OtherSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "OtherSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "OtherSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "OtherSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "OtherSource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "OtherSource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
73 case
never executed: case QOpenGLDebugMessage::AnySource:
QOpenGLDebugMessage::AnySource:
never executed: case QOpenGLDebugMessage::AnySource:
0
74 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "AnySource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "AnySource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "AnySource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "AnySource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "AnySource")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "AnySource" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
75 }-
76-
77 ((!(false)) ? qt_assert_x(__PRETTY_FUNCTION__, "Unknown message source",__FILE__,687) : qt_noop());-
78 return
never executed: return QString();
QString();
never executed: return QString();
0
79}-
80-
81-
82-
83-
84static QOpenGLDebugMessage::Type qt_messageTypeFromGL(GLenum type)-
85{-
86 switch (type) {-
87 case
never executed: case 0x824C:
0x824C:
never executed: case 0x824C:
0
88 return
never executed: return QOpenGLDebugMessage::ErrorType;
QOpenGLDebugMessage::ErrorType;
never executed: return QOpenGLDebugMessage::ErrorType;
0
89 case
never executed: case 0x824D:
0x824D:
never executed: case 0x824D:
0
90 return
never executed: return QOpenGLDebugMessage::DeprecatedBehaviorType;
QOpenGLDebugMessage::DeprecatedBehaviorType;
never executed: return QOpenGLDebugMessage::DeprecatedBehaviorType;
0
91 case
never executed: case 0x824E:
0x824E:
never executed: case 0x824E:
0
92 return
never executed: return QOpenGLDebugMessage::UndefinedBehaviorType;
QOpenGLDebugMessage::UndefinedBehaviorType;
never executed: return QOpenGLDebugMessage::UndefinedBehaviorType;
0
93 case
never executed: case 0x824F:
0x824F:
never executed: case 0x824F:
0
94 return
never executed: return QOpenGLDebugMessage::PortabilityType;
QOpenGLDebugMessage::PortabilityType;
never executed: return QOpenGLDebugMessage::PortabilityType;
0
95 case
never executed: case 0x8250:
0x8250:
never executed: case 0x8250:
0
96 return
never executed: return QOpenGLDebugMessage::PerformanceType;
QOpenGLDebugMessage::PerformanceType;
never executed: return QOpenGLDebugMessage::PerformanceType;
0
97 case
never executed: case 0x8251:
0x8251:
never executed: case 0x8251:
0
98 return
never executed: return QOpenGLDebugMessage::OtherType;
QOpenGLDebugMessage::OtherType;
never executed: return QOpenGLDebugMessage::OtherType;
0
99 case
never executed: case 0x8268:
0x8268:
never executed: case 0x8268:
0
100 return
never executed: return QOpenGLDebugMessage::MarkerType;
QOpenGLDebugMessage::MarkerType;
never executed: return QOpenGLDebugMessage::MarkerType;
0
101 case
never executed: case 0x8269:
0x8269:
never executed: case 0x8269:
0
102 return
never executed: return QOpenGLDebugMessage::GroupPushType;
QOpenGLDebugMessage::GroupPushType;
never executed: return QOpenGLDebugMessage::GroupPushType;
0
103 case
never executed: case 0x826A:
0x826A:
never executed: case 0x826A:
0
104 return
never executed: return QOpenGLDebugMessage::GroupPopType;
QOpenGLDebugMessage::GroupPopType;
never executed: return QOpenGLDebugMessage::GroupPopType;
0
105 }-
106-
107 ((!(false)) ? qt_assert_x(__PRETTY_FUNCTION__, "Unknown message type from GL",__FILE__,717) : qt_noop());-
108 return
never executed: return QOpenGLDebugMessage::OtherType;
QOpenGLDebugMessage::OtherType;
never executed: return QOpenGLDebugMessage::OtherType;
0
109}-
110-
111-
112-
113-
114static GLenum qt_messageTypeToGL(QOpenGLDebugMessage::Type type)-
115{-
116 switch (type) {-
117 case
never executed: case QOpenGLDebugMessage::InvalidType:
QOpenGLDebugMessage::InvalidType:
never executed: case QOpenGLDebugMessage::InvalidType:
0
118 break;
never executed: break;
0
119 case
never executed: case QOpenGLDebugMessage::ErrorType:
QOpenGLDebugMessage::ErrorType:
never executed: case QOpenGLDebugMessage::ErrorType:
0
120 return
never executed: return 0x824C;
0x824C;
never executed: return 0x824C;
0
121 case
never executed: case QOpenGLDebugMessage::DeprecatedBehaviorType:
QOpenGLDebugMessage::DeprecatedBehaviorType:
never executed: case QOpenGLDebugMessage::DeprecatedBehaviorType:
0
122 return
never executed: return 0x824D;
0x824D;
never executed: return 0x824D;
0
123 case
never executed: case QOpenGLDebugMessage::UndefinedBehaviorType:
QOpenGLDebugMessage::UndefinedBehaviorType:
never executed: case QOpenGLDebugMessage::UndefinedBehaviorType:
0
124 return
never executed: return 0x824E;
0x824E;
never executed: return 0x824E;
0
125 case
never executed: case QOpenGLDebugMessage::PortabilityType:
QOpenGLDebugMessage::PortabilityType:
never executed: case QOpenGLDebugMessage::PortabilityType:
0
126 return
never executed: return 0x824F;
0x824F;
never executed: return 0x824F;
0
127 case
never executed: case QOpenGLDebugMessage::PerformanceType:
QOpenGLDebugMessage::PerformanceType:
never executed: case QOpenGLDebugMessage::PerformanceType:
0
128 return
never executed: return 0x8250;
0x8250;
never executed: return 0x8250;
0
129 case
never executed: case QOpenGLDebugMessage::OtherType:
QOpenGLDebugMessage::OtherType:
never executed: case QOpenGLDebugMessage::OtherType:
0
130 return
never executed: return 0x8251;
0x8251;
never executed: return 0x8251;
0
131 case
never executed: case QOpenGLDebugMessage::MarkerType:
QOpenGLDebugMessage::MarkerType:
never executed: case QOpenGLDebugMessage::MarkerType:
0
132 return
never executed: return 0x8268;
0x8268;
never executed: return 0x8268;
0
133 case
never executed: case QOpenGLDebugMessage::GroupPushType:
QOpenGLDebugMessage::GroupPushType:
never executed: case QOpenGLDebugMessage::GroupPushType:
0
134 return
never executed: return 0x8269;
0x8269;
never executed: return 0x8269;
0
135 case
never executed: case QOpenGLDebugMessage::GroupPopType:
QOpenGLDebugMessage::GroupPopType:
never executed: case QOpenGLDebugMessage::GroupPopType:
0
136 return
never executed: return 0x826A;
0x826A;
never executed: return 0x826A;
0
137 case
never executed: case QOpenGLDebugMessage::AnyType:
QOpenGLDebugMessage::AnyType:
never executed: case QOpenGLDebugMessage::AnyType:
0
138 break;
never executed: break;
0
139 }-
140-
141 ((!(false)) ? qt_assert_x(__PRETTY_FUNCTION__, "Invalid message type",__FILE__,751) : qt_noop());-
142 return
never executed: return 0x8251;
0x8251;
never executed: return 0x8251;
0
143}-
144-
145-
146-
147-
148static QString qt_messageTypeToString(QOpenGLDebugMessage::Type type)-
149{-
150 switch (type) {-
151 case
never executed: case QOpenGLDebugMessage::InvalidType:
QOpenGLDebugMessage::InvalidType:
never executed: case QOpenGLDebugMessage::InvalidType:
0
152 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "InvalidType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "InvalidType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "InvalidType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "InvalidType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "InvalidType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "InvalidType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
153 case
never executed: case QOpenGLDebugMessage::ErrorType:
QOpenGLDebugMessage::ErrorType:
never executed: case QOpenGLDebugMessage::ErrorType:
0
154 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "ErrorType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ErrorType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "ErrorType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ErrorType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "ErrorType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ErrorType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
155 case
never executed: case QOpenGLDebugMessage::DeprecatedBehaviorType:
QOpenGLDebugMessage::DeprecatedBehaviorType:
never executed: case QOpenGLDebugMessage::DeprecatedBehaviorType:
0
156 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "DeprecatedBehaviorType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "DeprecatedBehaviorType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "DeprecatedBehaviorType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "DeprecatedBehaviorType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "DeprecatedBehaviorType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "DeprecatedBehaviorType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
157 case
never executed: case QOpenGLDebugMessage::UndefinedBehaviorType:
QOpenGLDebugMessage::UndefinedBehaviorType:
never executed: case QOpenGLDebugMessage::UndefinedBehaviorType:
0
158 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "UndefinedBehaviorType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "UndefinedBehaviorType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "UndefinedBehaviorType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "UndefinedBehaviorType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "UndefinedBehaviorType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "UndefinedBehaviorType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
159 case
never executed: case QOpenGLDebugMessage::PortabilityType:
QOpenGLDebugMessage::PortabilityType:
never executed: case QOpenGLDebugMessage::PortabilityType:
0
160 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "PortabilityType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "PortabilityType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "PortabilityType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "PortabilityType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "PortabilityType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "PortabilityType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
161 case
never executed: case QOpenGLDebugMessage::PerformanceType:
QOpenGLDebugMessage::PerformanceType:
never executed: case QOpenGLDebugMessage::PerformanceType:
0
162 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "PerformanceType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "PerformanceType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "PerformanceType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "PerformanceType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "PerformanceType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "PerformanceType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
163 case
never executed: case QOpenGLDebugMessage::OtherType:
QOpenGLDebugMessage::OtherType:
never executed: case QOpenGLDebugMessage::OtherType:
0
164 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "OtherType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "OtherType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "OtherType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "OtherType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "OtherType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "OtherType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
165 case
never executed: case QOpenGLDebugMessage::MarkerType:
QOpenGLDebugMessage::MarkerType:
never executed: case QOpenGLDebugMessage::MarkerType:
0
166 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "MarkerType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "MarkerType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "MarkerType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "MarkerType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "MarkerType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "MarkerType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
167 case
never executed: case QOpenGLDebugMessage::GroupPushType:
QOpenGLDebugMessage::GroupPushType:
never executed: case QOpenGLDebugMessage::GroupPushType:
0
168 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "GroupPushType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "GroupPushType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "GroupPushType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "GroupPushType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "GroupPushType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "GroupPushType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
169 case
never executed: case QOpenGLDebugMessage::GroupPopType:
QOpenGLDebugMessage::GroupPopType:
never executed: case QOpenGLDebugMessage::GroupPopType:
0
170 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "GroupPopType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "GroupPopType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "GroupPopType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "GroupPopType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "GroupPopType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "GroupPopType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
171 case
never executed: case QOpenGLDebugMessage::AnyType:
QOpenGLDebugMessage::AnyType:
never executed: case QOpenGLDebugMessage::AnyType:
0
172 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "AnyType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "AnyType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "AnyType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "AnyType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "AnyType")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "AnyType" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
173 }-
174-
175 ((!(false)) ? qt_assert_x(__PRETTY_FUNCTION__, "Unknown message type",__FILE__,785) : qt_noop());-
176 return
never executed: return QString();
QString();
never executed: return QString();
0
177}-
178-
179-
180-
181-
182static QOpenGLDebugMessage::Severity qt_messageSeverityFromGL(GLenum severity)-
183{-
184 switch (severity) {-
185 case
never executed: case 0x9146:
0x9146:
never executed: case 0x9146:
0
186 return
never executed: return QOpenGLDebugMessage::HighSeverity;
QOpenGLDebugMessage::HighSeverity;
never executed: return QOpenGLDebugMessage::HighSeverity;
0
187 case
never executed: case 0x9147:
0x9147:
never executed: case 0x9147:
0
188 return
never executed: return QOpenGLDebugMessage::MediumSeverity;
QOpenGLDebugMessage::MediumSeverity;
never executed: return QOpenGLDebugMessage::MediumSeverity;
0
189 case
never executed: case 0x9148:
0x9148:
never executed: case 0x9148:
0
190 return
never executed: return QOpenGLDebugMessage::LowSeverity;
QOpenGLDebugMessage::LowSeverity;
never executed: return QOpenGLDebugMessage::LowSeverity;
0
191 case
never executed: case 0x826B:
0x826B:
never executed: case 0x826B:
0
192 return
never executed: return QOpenGLDebugMessage::NotificationSeverity;
QOpenGLDebugMessage::NotificationSeverity;
never executed: return QOpenGLDebugMessage::NotificationSeverity;
0
193 }-
194-
195 ((!(false)) ? qt_assert_x(__PRETTY_FUNCTION__, "Unknown message severity from GL",__FILE__,805) : qt_noop());-
196 return
never executed: return QOpenGLDebugMessage::NotificationSeverity;
QOpenGLDebugMessage::NotificationSeverity;
never executed: return QOpenGLDebugMessage::NotificationSeverity;
0
197}-
198-
199-
200-
201-
202static GLenum qt_messageSeverityToGL(QOpenGLDebugMessage::Severity severity)-
203{-
204 switch (severity) {-
205 case
never executed: case QOpenGLDebugMessage::InvalidSeverity:
QOpenGLDebugMessage::InvalidSeverity:
never executed: case QOpenGLDebugMessage::InvalidSeverity:
0
206 break;
never executed: break;
0
207 case
never executed: case QOpenGLDebugMessage::HighSeverity:
QOpenGLDebugMessage::HighSeverity:
never executed: case QOpenGLDebugMessage::HighSeverity:
0
208 return
never executed: return 0x9146;
0x9146;
never executed: return 0x9146;
0
209 case
never executed: case QOpenGLDebugMessage::MediumSeverity:
QOpenGLDebugMessage::MediumSeverity:
never executed: case QOpenGLDebugMessage::MediumSeverity:
0
210 return
never executed: return 0x9147;
0x9147;
never executed: return 0x9147;
0
211 case
never executed: case QOpenGLDebugMessage::LowSeverity:
QOpenGLDebugMessage::LowSeverity:
never executed: case QOpenGLDebugMessage::LowSeverity:
0
212 return
never executed: return 0x9148;
0x9148;
never executed: return 0x9148;
0
213 case
never executed: case QOpenGLDebugMessage::NotificationSeverity:
QOpenGLDebugMessage::NotificationSeverity:
never executed: case QOpenGLDebugMessage::NotificationSeverity:
0
214 return
never executed: return 0x826B;
0x826B;
never executed: return 0x826B;
0
215 case
never executed: case QOpenGLDebugMessage::AnySeverity:
QOpenGLDebugMessage::AnySeverity:
never executed: case QOpenGLDebugMessage::AnySeverity:
0
216 break;
never executed: break;
0
217 }-
218-
219 ((!(false)) ? qt_assert_x(__PRETTY_FUNCTION__, "Invalid message severity",__FILE__,829) : qt_noop());-
220 return
never executed: return 0x826B;
0x826B;
never executed: return 0x826B;
0
221}-
222-
223-
224-
225-
226static QString qt_messageSeverityToString(QOpenGLDebugMessage::Severity severity)-
227{-
228 switch (severity) {-
229 case
never executed: case QOpenGLDebugMessage::InvalidSeverity:
QOpenGLDebugMessage::InvalidSeverity:
never executed: case QOpenGLDebugMessage::InvalidSeverity:
0
230 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "InvalidSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "InvalidSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "InvalidSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "InvalidSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "InvalidSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "InvalidSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
231 case
never executed: case QOpenGLDebugMessage::HighSeverity:
QOpenGLDebugMessage::HighSeverity:
never executed: case QOpenGLDebugMessage::HighSeverity:
0
232 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "HighSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "HighSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "HighSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "HighSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "HighSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "HighSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
233 case
never executed: case QOpenGLDebugMessage::MediumSeverity:
QOpenGLDebugMessage::MediumSeverity:
never executed: case QOpenGLDebugMessage::MediumSeverity:
0
234 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "MediumSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "MediumSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "MediumSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "MediumSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "MediumSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "MediumSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
235 case
never executed: case QOpenGLDebugMessage::LowSeverity:
QOpenGLDebugMessage::LowSeverity:
never executed: case QOpenGLDebugMessage::LowSeverity:
0
236 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "LowSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "LowSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "LowSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "LowSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "LowSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "LowSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
237 case
never executed: case QOpenGLDebugMessage::NotificationSeverity:
QOpenGLDebugMessage::NotificationSeverity:
never executed: case QOpenGLDebugMessage::NotificationSeverity:
0
238 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "NotificationSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "NotificationSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "NotificationSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "NotificationSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "NotificationSeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "NotificationSeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
239 case
never executed: case QOpenGLDebugMessage::AnySeverity:
QOpenGLDebugMessage::AnySeverity:
never executed: case QOpenGLDebugMessage::AnySeverity:
0
240 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "AnySeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "AnySeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
([]() -> QString { enum { Size = sizeof(u"" "AnySeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "AnySeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "AnySeverity")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "AnySeverity" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
241 }-
242-
243 ((!(false)) ? qt_assert_x(__PRETTY_FUNCTION__, "Unknown message severity",__FILE__,853) : qt_noop());-
244 return
never executed: return QString();
QString();
never executed: return QString();
0
245}-
246-
247class QOpenGLDebugMessagePrivate : public QSharedData-
248{-
249public:-
250 QOpenGLDebugMessagePrivate();-
251-
252 QString message;-
253 GLuint id;-
254 QOpenGLDebugMessage::Source source;-
255 QOpenGLDebugMessage::Type type;-
256 QOpenGLDebugMessage::Severity severity;-
257};-
258-
259-
260-
261-
262QOpenGLDebugMessagePrivate::QOpenGLDebugMessagePrivate()-
263 : message(),-
264 id(0),-
265 source(QOpenGLDebugMessage::InvalidSource),-
266 type(QOpenGLDebugMessage::InvalidType),-
267 severity(QOpenGLDebugMessage::InvalidSeverity)-
268{-
269}
never executed: end of block
0
270QOpenGLDebugMessage::QOpenGLDebugMessage()-
271 : d(new QOpenGLDebugMessagePrivate)-
272{-
273}
never executed: end of block
0
274-
275-
276-
277-
278-
279-
280QOpenGLDebugMessage::QOpenGLDebugMessage(const QOpenGLDebugMessage &debugMessage)-
281 : d(debugMessage.d)-
282{-
283}
never executed: end of block
0
284-
285-
286-
287-
288QOpenGLDebugMessage::~QOpenGLDebugMessage()-
289{-
290}-
291-
292-
293-
294-
295-
296QOpenGLDebugMessage &QOpenGLDebugMessage::operator=(const QOpenGLDebugMessage &debugMessage)-
297{-
298 d = debugMessage.d;-
299 return
never executed: return *this;
*this;
never executed: return *this;
0
300}-
301QOpenGLDebugMessage::Source QOpenGLDebugMessage::source() const-
302{-
303 return
never executed: return d->source;
d->source;
never executed: return d->source;
0
304}-
305-
306-
307-
308-
309QOpenGLDebugMessage::Type QOpenGLDebugMessage::type() const-
310{-
311 return
never executed: return d->type;
d->type;
never executed: return d->type;
0
312}-
313-
314-
315-
316-
317QOpenGLDebugMessage::Severity QOpenGLDebugMessage::severity() const-
318{-
319 return
never executed: return d->severity;
d->severity;
never executed: return d->severity;
0
320}-
321-
322-
323-
324-
325GLuint QOpenGLDebugMessage::id() const-
326{-
327 return
never executed: return d->id;
d->id;
never executed: return d->id;
0
328}-
329-
330-
331-
332-
333QString QOpenGLDebugMessage::message() const-
334{-
335 return
never executed: return d->message;
d->message;
never executed: return d->message;
0
336}-
337QOpenGLDebugMessage QOpenGLDebugMessage::createApplicationMessage(const QString &text,-
338 GLuint id,-
339 QOpenGLDebugMessage::Severity severity,-
340 QOpenGLDebugMessage::Type type)-
341{-
342 QOpenGLDebugMessage m;-
343 m.d->message = text;-
344 m.d->id = id;-
345 m.d->severity = severity;-
346 m.d->type = type;-
347 m.d->source = ApplicationSource;-
348 return
never executed: return m;
m;
never executed: return m;
0
349}-
350QOpenGLDebugMessage QOpenGLDebugMessage::createThirdPartyMessage(const QString &text,-
351 GLuint id,-
352 QOpenGLDebugMessage::Severity severity,-
353 QOpenGLDebugMessage::Type type)-
354{-
355 QOpenGLDebugMessage m;-
356 m.d->message = text;-
357 m.d->id = id;-
358 m.d->severity = severity;-
359 m.d->type = type;-
360 m.d->source = ThirdPartySource;-
361 return
never executed: return m;
m;
never executed: return m;
0
362}-
363bool QOpenGLDebugMessage::operator==(const QOpenGLDebugMessage &debugMessage) const-
364{-
365 return
never executed: return (d == debugMessage.d) || (d->id == debugMessage.d->id && d->source == debugMessage.d->source && d->type == debugMessage.d->type && d->severity == debugMessage.d->severity && d->message == debugMessage.d->message);
(d == debugMessage.d)
never executed: return (d == debugMessage.d) || (d->id == debugMessage.d->id && d->source == debugMessage.d->source && d->type == debugMessage.d->type && d->severity == debugMessage.d->severity && d->message == debugMessage.d->message);
0
366 || (d->id == debugMessage.d->id
never executed: return (d == debugMessage.d) || (d->id == debugMessage.d->id && d->source == debugMessage.d->source && d->type == debugMessage.d->type && d->severity == debugMessage.d->severity && d->message == debugMessage.d->message);
0
367 && d->source == debugMessage.d->source
never executed: return (d == debugMessage.d) || (d->id == debugMessage.d->id && d->source == debugMessage.d->source && d->type == debugMessage.d->type && d->severity == debugMessage.d->severity && d->message == debugMessage.d->message);
0
368 && d->type == debugMessage.d->type
never executed: return (d == debugMessage.d) || (d->id == debugMessage.d->id && d->source == debugMessage.d->source && d->type == debugMessage.d->type && d->severity == debugMessage.d->severity && d->message == debugMessage.d->message);
0
369 && d->severity == debugMessage.d->severity
never executed: return (d == debugMessage.d) || (d->id == debugMessage.d->id && d->source == debugMessage.d->source && d->type == debugMessage.d->type && d->severity == debugMessage.d->severity && d->message == debugMessage.d->message);
0
370 && d->message == debugMessage.d->message);
never executed: return (d == debugMessage.d) || (d->id == debugMessage.d->id && d->source == debugMessage.d->source && d->type == debugMessage.d->type && d->severity == debugMessage.d->severity && d->message == debugMessage.d->message);
0
371}-
372QDebug operator<<(QDebug debug, QOpenGLDebugMessage::Source source)-
373{-
374 QDebugStateSaver saver(debug);-
375 debug.nospace() << "QOpenGLDebugMessage::Source("-
376 << qt_messageSourceToString(source)-
377 << ')';-
378 return
never executed: return debug;
debug;
never executed: return debug;
0
379}-
380-
381-
382-
383-
384-
385-
386-
387QDebug operator<<(QDebug debug, QOpenGLDebugMessage::Type type)-
388{-
389 QDebugStateSaver saver(debug);-
390 debug.nospace() << "QOpenGLDebugMessage::Type("-
391 << qt_messageTypeToString(type)-
392 << ')';-
393 return
never executed: return debug;
debug;
never executed: return debug;
0
394}-
395-
396-
397-
398-
399-
400-
401-
402QDebug operator<<(QDebug debug, QOpenGLDebugMessage::Severity severity)-
403{-
404 QDebugStateSaver saver(debug);-
405 debug.nospace() << "QOpenGLDebugMessage::Severity("-
406 << qt_messageSeverityToString(severity)-
407 << ')';-
408 return
never executed: return debug;
debug;
never executed: return debug;
0
409}-
410-
411-
412-
413-
414-
415-
416-
417QDebug operator<<(QDebug debug, const QOpenGLDebugMessage &message)-
418{-
419 QDebugStateSaver saver(debug);-
420 debug.nospace() << "QOpenGLDebugMessage("-
421 << qt_messageSourceToString(message.source()) << ", "-
422 << message.id() << ", "-
423 << message.message() << ", "-
424 << qt_messageSeverityToString(message.severity()) << ", "-
425 << qt_messageTypeToString(message.type()) << ')';-
426 return
never executed: return debug;
debug;
never executed: return debug;
0
427-
428}-
429-
430-
431typedef void ( * qt_glDebugMessageControl_t)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);-
432typedef void ( * qt_glDebugMessageInsert_t)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);-
433typedef void ( * qt_glDebugMessageCallback_t)(GLDEBUGPROC callback, const void *userParam);-
434typedef GLuint ( * qt_glGetDebugMessageLog_t)(GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);-
435typedef void ( * qt_glPushDebugGroup_t)(GLenum source, GLuint id, GLsizei length, const GLchar *message);-
436typedef void ( * qt_glPopDebugGroup_t)();-
437typedef void ( * qt_glGetPointerv_t)(GLenum pname, GLvoid **params);-
438-
439class QOpenGLDebugLoggerPrivate : public QObjectPrivate-
440{-
441 inline QOpenGLDebugLogger* q_func() { return static_cast<QOpenGLDebugLogger *>(q_ptr); } inline const QOpenGLDebugLogger* q_func() const { return static_cast<const QOpenGLDebugLogger *>(q_ptr); } friend class QOpenGLDebugLogger;-
442public:-
443 QOpenGLDebugLoggerPrivate();-
444-
445 void handleMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *rawMessage);-
446 void controlDebugMessages(QOpenGLDebugMessage::Sources sources,-
447 QOpenGLDebugMessage::Types types,-
448 QOpenGLDebugMessage::Severities severities,-
449 const QVector<GLuint> &ids,-
450 const QByteArray &callerName,-
451 bool enable);-
452 void _q_contextAboutToBeDestroyed();-
453-
454 qt_glDebugMessageControl_t glDebugMessageControl;-
455 qt_glDebugMessageInsert_t glDebugMessageInsert;-
456 qt_glDebugMessageCallback_t glDebugMessageCallback;-
457 qt_glGetDebugMessageLog_t glGetDebugMessageLog;-
458 qt_glPushDebugGroup_t glPushDebugGroup;-
459 qt_glPopDebugGroup_t glPopDebugGroup;-
460 qt_glGetPointerv_t glGetPointerv;-
461-
462 GLDEBUGPROC oldDebugCallbackFunction;-
463 void *oldDebugCallbackParameter;-
464 QOpenGLContext *context;-
465 GLint maxMessageLength;-
466 QOpenGLDebugLogger::LoggingMode loggingMode;-
467 bool initialized : 1;-
468 bool isLogging : 1;-
469 bool debugWasEnabled : 1;-
470 bool syncDebugWasEnabled : 1;-
471};-
472-
473-
474-
475-
476QOpenGLDebugLoggerPrivate::QOpenGLDebugLoggerPrivate()-
477 : glDebugMessageControl(0),-
478 glDebugMessageInsert(0),-
479 glDebugMessageCallback(0),-
480 glGetDebugMessageLog(0),-
481 glPushDebugGroup(0),-
482 glPopDebugGroup(0),-
483 oldDebugCallbackFunction(0),-
484 context(0),-
485 maxMessageLength(0),-
486 loggingMode(QOpenGLDebugLogger::AsynchronousLogging),-
487 initialized(false),-
488 isLogging(false),-
489 debugWasEnabled(false),-
490 syncDebugWasEnabled(false)-
491{-
492}
never executed: end of block
0
493-
494-
495-
496-
497void QOpenGLDebugLoggerPrivate::handleMessage(GLenum source,-
498 GLenum type,-
499 GLuint id,-
500 GLenum severity,-
501 GLsizei length,-
502 const GLchar *rawMessage)-
503{-
504 if (oldDebugCallbackFunction
oldDebugCallbackFunctionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
505 oldDebugCallbackFunction(source, type, id, severity, length, rawMessage, oldDebugCallbackParameter);
never executed: oldDebugCallbackFunction(source, type, id, severity, length, rawMessage, oldDebugCallbackParameter);
0
506-
507 QOpenGLDebugMessage message;-
508-
509 QOpenGLDebugMessagePrivate *messagePrivate = message.d.data();-
510 messagePrivate->source = qt_messageSourceFromGL(source);-
511 messagePrivate->type = qt_messageTypeFromGL(type);-
512 messagePrivate->id = id;-
513 messagePrivate->severity = qt_messageSeverityFromGL(severity);-
514-
515-
516 messagePrivate->message = QString::fromUtf8(rawMessage);-
517-
518 QOpenGLDebugLogger * const q = q_func();-
519 q->messageLogged(message);-
520}
never executed: end of block
0
521-
522-
523-
524-
525void QOpenGLDebugLoggerPrivate::controlDebugMessages(QOpenGLDebugMessage::Sources sources,-
526 QOpenGLDebugMessage::Types types,-
527 QOpenGLDebugMessage::Severities severities,-
528 const QVector<GLuint> &ids,-
529 const QByteArray &callerName,-
530 bool enable)-
531{-
532 if (!initialized
!initializedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
533 QMessageLogger(__FILE__, 1214, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::%s(): object must be initialized before enabling/disabling messages", callerName.constData());-
534 return;
never executed: return;
0
535 }-
536 if (sources == QOpenGLDebugMessage::InvalidSource
sources == QOp...:InvalidSourceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
537 QMessageLogger(__FILE__, 1218, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::%s(): invalid source specified", callerName.constData());-
538 return;
never executed: return;
0
539 }-
540 if (types == QOpenGLDebugMessage::InvalidType
types == QOpen...e::InvalidTypeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
541 QMessageLogger(__FILE__, 1222, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::%s(): invalid type specified", callerName.constData());-
542 return;
never executed: return;
0
543 }-
544 if (severities == QOpenGLDebugMessage::InvalidSeverity
severities == ...nvalidSeverityDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
545 QMessageLogger(__FILE__, 1226, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::%s(): invalid severity specified", callerName.constData());-
546 return;
never executed: return;
0
547 }-
548-
549 QVarLengthArray<GLenum, 8> glSources;-
550 QVarLengthArray<GLenum, 8> glTypes;-
551 QVarLengthArray<GLenum, 8> glSeverities;-
552-
553 if (ids.count() > 0
ids.count() > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
554 ((!(severities == QOpenGLDebugMessage::AnySeverity)) ? qt_assert("severities == QOpenGLDebugMessage::AnySeverity",__FILE__,1235) : qt_noop());-
555 if (sources == QOpenGLDebugMessage::AnySource
sources == QOp...age::AnySourceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
556 sources = QOpenGLDebugMessage::InvalidSource;-
557 for (uint i = 1; i <= QOpenGLDebugMessage::LastSource
i <= QOpenGLDe...ge::LastSourceDescription
TRUEnever evaluated
FALSEnever evaluated
; i = i << 1)
0
558 sources |= QOpenGLDebugMessage::Source(i);
never executed: sources |= QOpenGLDebugMessage::Source(i);
0
559 }
never executed: end of block
0
560-
561 if (types == QOpenGLDebugMessage::AnyType
types == QOpen...ssage::AnyTypeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
562 types = QOpenGLDebugMessage::InvalidType;-
563 for (uint i = 1; i <= QOpenGLDebugMessage::LastType
i <= QOpenGLDe...sage::LastTypeDescription
TRUEnever evaluated
FALSEnever evaluated
; i = i << 1)
0
564 types |= QOpenGLDebugMessage::Type(i);
never executed: types |= QOpenGLDebugMessage::Type(i);
0
565 }
never executed: end of block
0
566 }
never executed: end of block
0
567 if (sources == QOpenGLDebugMessage::AnySource
sources == QOp...age::AnySourceDescription
TRUEnever evaluated
FALSEnever evaluated
) { glSources << 0x1100; }
never executed: end of block
else { for (uint i = 1; i <= QOpenGLDebugMessage::LastSource
i <= QOpenGLDe...ge::LastSourceDescription
TRUEnever evaluated
FALSEnever evaluated
; i = i << 1) if (sources.testFlag(QOpenGLDebugMessage:: Source (i))
sources.testFl...:: Source (i))Description
TRUEnever evaluated
FALSEnever evaluated
) glSources << qt_messageSourceToGL (QOpenGLDebugMessage:: Source (i));
never executed: glSources << qt_messageSourceToGL (QOpenGLDebugMessage:: Source (i));
}
never executed: end of block
0
568 if (types == QOpenGLDebugMessage::AnyType
types == QOpen...ssage::AnyTypeDescription
TRUEnever evaluated
FALSEnever evaluated
) { glTypes << 0x1100; }
never executed: end of block
else { for (uint i = 1; i <= QOpenGLDebugMessage::LastType
i <= QOpenGLDe...sage::LastTypeDescription
TRUEnever evaluated
FALSEnever evaluated
; i = i << 1) if (types.testFlag(QOpenGLDebugMessage:: Type (i))
types.testFlag...ge:: Type (i))Description
TRUEnever evaluated
FALSEnever evaluated
) glTypes << qt_messageTypeToGL (QOpenGLDebugMessage:: Type (i));
never executed: glTypes << qt_messageTypeToGL (QOpenGLDebugMessage:: Type (i));
}
never executed: end of block
0
569 if (severities == QOpenGLDebugMessage::AnySeverity
severities == ...e::AnySeverityDescription
TRUEnever evaluated
FALSEnever evaluated
) { glSeverities << 0x1100; }
never executed: end of block
else { for (uint i = 1; i <= QOpenGLDebugMessage::LastSeverity
i <= QOpenGLDe...::LastSeverityDescription
TRUEnever evaluated
FALSEnever evaluated
; i = i << 1) if (severities.testFlag(QOpenGLDebugMessage:: Severity (i))
severities.tes... Severity (i))Description
TRUEnever evaluated
FALSEnever evaluated
) glSeverities << qt_messageSeverityToGL (QOpenGLDebugMessage:: Severity (i));
never executed: glSeverities << qt_messageSeverityToGL (QOpenGLDebugMessage:: Severity (i));
}
never executed: end of block
0
570-
571-
572 const GLsizei idCount = ids.count();-
573-
574-
575 const GLuint * const idPtr = idCount
idCountDescription
TRUEnever evaluated
FALSEnever evaluated
? ids.constData() : 0;
0
576-
577 for (GLenum source : glSources)-
578 for (GLenum type : glTypes)-
579 for (GLenum severity : glSeverities)-
580 glDebugMessageControl(source, type, severity, idCount, idPtr, GLboolean(enable));
never executed: glDebugMessageControl(source, type, severity, idCount, idPtr, GLboolean(enable));
0
581}
never executed: end of block
0
582-
583-
584-
585-
586void QOpenGLDebugLoggerPrivate::_q_contextAboutToBeDestroyed()-
587{-
588 ((!(context)) ? qt_assert("context",__FILE__,1291) : qt_noop());-
589-
590-
591-
592-
593 QOpenGLContext *currentContext = QOpenGLContext::currentContext();-
594 QSurface *currentSurface = 0;-
595-
596 QScopedPointer<QOffscreenSurface> offscreenSurface;-
597-
598 if (context != currentContext
context != currentContextDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
599-
600 if (currentContext
currentContextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
601 currentSurface = currentContext->surface();
never executed: currentSurface = currentContext->surface();
0
602-
603 offscreenSurface.reset(new QOffscreenSurface);-
604 offscreenSurface->setFormat(context->format());-
605 offscreenSurface->create();-
606 if (!context->makeCurrent(offscreenSurface.data())
!context->make...urface.data())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
607 QMessageLogger(__FILE__, 1310, __PRETTY_FUNCTION__).warning("QOpenGLDebugLoggerPrivate::_q_contextAboutToBeDestroyed(): could not make the owning GL context current for cleanup");
never executed: QMessageLogger(__FILE__, 1310, __PRETTY_FUNCTION__).warning("QOpenGLDebugLoggerPrivate::_q_contextAboutToBeDestroyed(): could not make the owning GL context current for cleanup");
0
608 }
never executed: end of block
0
609-
610 QOpenGLDebugLogger * const q = q_func();-
611 q->stopLogging();-
612-
613 if (offscreenSurface
offscreenSurfaceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
614-
615 if (currentContext
currentContextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
616 currentContext->makeCurrent(currentSurface);
never executed: currentContext->makeCurrent(currentSurface);
0
617 else-
618 context->doneCurrent();
never executed: context->doneCurrent();
0
619 }-
620-
621 QObject::disconnect(context, qFlagLocation("2""aboutToBeDestroyed()" "\0" __FILE__ ":" "1324"), q, qFlagLocation("1""_q_contextAboutToBeDestroyed()" "\0" __FILE__ ":" "1324"));-
622 context = 0;-
623 initialized = false;-
624}
never executed: end of block
0
625-
626extern "C" {-
627static void qt_opengl_debug_callback(GLenum source,-
628 GLenum type,-
629 GLuint id,-
630 GLenum severity,-
631 GLsizei length,-
632 const GLchar *rawMessage,-
633 const GLvoid *userParam)-
634{-
635 QOpenGLDebugLoggerPrivate *loggerPrivate = static_cast<QOpenGLDebugLoggerPrivate *>(const_cast<GLvoid *>(userParam));-
636 loggerPrivate->handleMessage(source, type, id, severity, length, rawMessage);-
637}
never executed: end of block
0
638}-
639QOpenGLDebugLogger::QOpenGLDebugLogger(QObject *parent)-
640 : QObject(*new QOpenGLDebugLoggerPrivate, parent)-
641{-
642-
643-
644-
645 qRegisterMetaType<QOpenGLDebugMessage>();-
646}
never executed: end of block
0
647-
648-
649-
650-
651QOpenGLDebugLogger::~QOpenGLDebugLogger()-
652{-
653 stopLogging();-
654}
never executed: end of block
0
655bool QOpenGLDebugLogger::initialize()-
656{-
657 QOpenGLContext *context = QOpenGLContext::currentContext();-
658 if (!context
!contextDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
659 QMessageLogger(__FILE__, 1386, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::initialize(): no current OpenGL context found.");-
660 return
never executed: return false;
false;
never executed: return false;
0
661 }-
662-
663 QOpenGLDebugLoggerPrivate * const d = d_func();-
664 if (d->context == context
d->context == contextDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
665-
666 ((!(d->initialized)) ? qt_assert("d->initialized",__FILE__,1393) : qt_noop());-
667 return
never executed: return true;
true;
never executed: return true;
0
668 }-
669-
670 if (d->isLogging
d->isLoggingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
671 QMessageLogger(__FILE__, 1398, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::initialize(): cannot initialize the object while logging. Please stop the logging first.");-
672 return
never executed: return false;
false;
never executed: return false;
0
673 }-
674-
675 if (d->context
d->contextDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
676 disconnect(d->context, qFlagLocation("2""aboutToBeDestroyed()" "\0" __FILE__ ":" "1403"), this, qFlagLocation("1""_q_contextAboutToBeDestroyed()" "\0" __FILE__ ":" "1403"));
never executed: disconnect(d->context, qFlagLocation("2""aboutToBeDestroyed()" "\0" __FILE__ ":" "1403"), this, qFlagLocation("1""_q_contextAboutToBeDestroyed()" "\0" __FILE__ ":" "1403"));
0
677-
678 d->initialized = false;-
679 d->context = 0;-
680-
681 if (!context->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_KHR_debug") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_KHR_debug" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
!context->hasE...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
682 return
never executed: return false;
false;
never executed: return false;
0
683-
684 d->context = context;-
685 connect(d->context, qFlagLocation("2""aboutToBeDestroyed()" "\0" __FILE__ ":" "1412"), this, qFlagLocation("1""_q_contextAboutToBeDestroyed()" "\0" __FILE__ ":" "1412"));-
686-
687-
688-
689-
690-
691-
692 d->glDebugMessageControl = reinterpret_cast< qt_glDebugMessageControl_t >( d->context->getProcAddress("glDebugMessageControl") );;-
693 d->glDebugMessageInsert = reinterpret_cast< qt_glDebugMessageInsert_t >( d->context->getProcAddress("glDebugMessageInsert") );;-
694 d->glDebugMessageCallback = reinterpret_cast< qt_glDebugMessageCallback_t >( d->context->getProcAddress("glDebugMessageCallback") );;-
695 d->glGetDebugMessageLog = reinterpret_cast< qt_glGetDebugMessageLog_t >( d->context->getProcAddress("glGetDebugMessageLog") );;-
696 d->glPushDebugGroup = reinterpret_cast< qt_glPushDebugGroup_t >( d->context->getProcAddress("glPushDebugGroup") );;-
697 d->glPopDebugGroup = reinterpret_cast< qt_glPopDebugGroup_t >( d->context->getProcAddress("glPopDebugGroup") );;-
698 d->glGetPointerv = reinterpret_cast< qt_glGetPointerv_t >( d->context->getProcAddress("glGetPointerv") );-
699-
700-
701-
702 QOpenGLContext::currentContext()->functions()->glGetIntegerv(0x9143, &d->maxMessageLength);-
703-
704-
705 if (!d->context->format().testOption(QSurfaceFormat::DebugContext)
!d->context->f...:DebugContext)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
706 QMessageLogger(__FILE__, 1433, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::initialize(): the current context is not a debug context:\n"-
707 " this means that the GL may not generate any debug output at all.\n"-
708 " To avoid this warning, try creating the context with the\n"-
709 " QSurfaceFormat::DebugContext surface format option.");-
710 }
never executed: end of block
0
711-
712-
713 d->initialized = true;-
714 return
never executed: return true;
true;
never executed: return true;
0
715}-
716-
717-
718-
719-
720-
721-
722bool QOpenGLDebugLogger::isLogging() const-
723{-
724 const QOpenGLDebugLoggerPrivate * const d = d_func();-
725 return
never executed: return d->isLogging;
d->isLogging;
never executed: return d->isLogging;
0
726}-
727void QOpenGLDebugLogger::startLogging(QOpenGLDebugLogger::LoggingMode loggingMode)-
728{-
729 QOpenGLDebugLoggerPrivate * const d = d_func();-
730 if (!d->initialized
!d->initializedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
731 QMessageLogger(__FILE__, 1481, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::startLogging(): object must be initialized before logging can start");-
732 return;
never executed: return;
0
733 }-
734 if (d->isLogging
d->isLoggingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
735 QMessageLogger(__FILE__, 1485, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::startLogging(): this object is already logging");-
736 return;
never executed: return;
0
737 }-
738-
739 d->isLogging = true;-
740 d->loggingMode = loggingMode;-
741-
742 d->glGetPointerv(0x8244, reinterpret_cast<void **>(&d->oldDebugCallbackFunction));-
743 d->glGetPointerv(0x8245, &d->oldDebugCallbackParameter);-
744-
745 d->glDebugMessageCallback(&qt_opengl_debug_callback, d);-
746-
747 QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();-
748 d->debugWasEnabled = funcs->glIsEnabled(0x92E0);-
749 d->syncDebugWasEnabled = funcs->glIsEnabled(0x8242);-
750-
751 if (d->loggingMode == SynchronousLogging
d->loggingMode...hronousLoggingDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
752 funcs->glEnable(0x8242);
never executed: funcs->glEnable(0x8242);
0
753 else-
754 funcs->glDisable(0x8242);
never executed: funcs->glDisable(0x8242);
0
755-
756 funcs->glEnable(0x92E0);-
757}
never executed: end of block
0
758-
759-
760-
761-
762-
763-
764QOpenGLDebugLogger::LoggingMode QOpenGLDebugLogger::loggingMode() const-
765{-
766 const QOpenGLDebugLoggerPrivate * const d = d_func();-
767 return
never executed: return d->loggingMode;
d->loggingMode;
never executed: return d->loggingMode;
0
768}-
769-
770-
771-
772-
773-
774-
775void QOpenGLDebugLogger::stopLogging()-
776{-
777 QOpenGLDebugLoggerPrivate * const d = d_func();-
778 if (!d->isLogging
!d->isLoggingDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
779 return;
never executed: return;
0
780-
781 QOpenGLContext *currentContext = QOpenGLContext::currentContext();-
782 if (!currentContext
!currentContextDescription
TRUEnever evaluated
FALSEnever evaluated
|| currentContext != d->context
currentContext != d->contextDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
783 QMessageLogger(__FILE__, 1533, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::stopLogging(): attempting to stop logging with the wrong OpenGL context current");-
784 return;
never executed: return;
0
785 }-
786-
787 d->isLogging = false;-
788-
789 d->glDebugMessageCallback(d->oldDebugCallbackFunction, d->oldDebugCallbackParameter);-
790-
791 QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();-
792 if (!d->debugWasEnabled
!d->debugWasEnabledDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
793 funcs->glDisable(0x92E0);
never executed: funcs->glDisable(0x92E0);
0
794-
795 if (d->syncDebugWasEnabled
d->syncDebugWasEnabledDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
796 funcs->glEnable(0x8242);
never executed: funcs->glEnable(0x8242);
0
797 else-
798 funcs->glDisable(0x8242);
never executed: funcs->glDisable(0x8242);
0
799}-
800void QOpenGLDebugLogger::logMessage(const QOpenGLDebugMessage &debugMessage)-
801{-
802 QOpenGLDebugLoggerPrivate * const d = d_func();-
803 if (!d->initialized
!d->initializedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
804 QMessageLogger(__FILE__, 1568, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::logMessage(): object must be initialized before logging messages");-
805 return;
never executed: return;
0
806 }-
807 if (debugMessage.source() != QOpenGLDebugMessage::ApplicationSource
debugMessage.s...licationSourceDescription
TRUEnever evaluated
FALSEnever evaluated
0
808 && debugMessage.source() != QOpenGLDebugMessage::ThirdPartySource
debugMessage.s...irdPartySourceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
809 QMessageLogger(__FILE__, 1573, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::logMessage(): using a message source different from ApplicationSource\n"-
810 " or ThirdPartySource is not supported by GL_KHR_debug. The message will not be logged.");-
811 return;
never executed: return;
0
812 }-
813 if (debugMessage.type() == QOpenGLDebugMessage::InvalidType
debugMessage.t...e::InvalidTypeDescription
TRUEnever evaluated
FALSEnever evaluated
0
814 || debugMessage.type() == QOpenGLDebugMessage::AnyType
debugMessage.t...ssage::AnyTypeDescription
TRUEnever evaluated
FALSEnever evaluated
0
815 || debugMessage.severity() == QOpenGLDebugMessage::InvalidSeverity
debugMessage.s...nvalidSeverityDescription
TRUEnever evaluated
FALSEnever evaluated
0
816 || debugMessage.severity() == QOpenGLDebugMessage::AnySeverity
debugMessage.s...e::AnySeverityDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
817 QMessageLogger(__FILE__, 1581, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::logMessage(): the message has a non-valid type and/or severity. The message will not be logged.");-
818 return;
never executed: return;
0
819 }-
820-
821 const GLenum source = qt_messageSourceToGL(debugMessage.source());-
822 const GLenum type = qt_messageTypeToGL(debugMessage.type());-
823 const GLenum severity = qt_messageSeverityToGL(debugMessage.severity());-
824 QByteArray rawMessage = debugMessage.message().toUtf8();-
825 rawMessage.append('\0');-
826-
827 if (rawMessage.length() > d->maxMessageLength
rawMessage.len...xMessageLengthDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
828 QMessageLogger(__FILE__, 1592, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::logMessage(): message too long, truncating it\n"-
829 " (%d bytes long, but the GL accepts up to %d bytes)", rawMessage.length(), d->maxMessageLength);-
830 rawMessage.resize(d->maxMessageLength - 1);-
831 rawMessage.append('\0');-
832 }
never executed: end of block
0
833-
834-
835-
836-
837 d->glDebugMessageInsert(source,-
838 type,-
839 debugMessage.id(),-
840 severity,-
841 -1,-
842 rawMessage.constData());-
843}
never executed: end of block
0
844void QOpenGLDebugLogger::pushGroup(const QString &name, GLuint id, QOpenGLDebugMessage::Source source)-
845{-
846 QOpenGLDebugLoggerPrivate * const d = d_func();-
847 if (!d->initialized
!d->initializedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
848 QMessageLogger(__FILE__, 1631, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::pushGroup(): object must be initialized before pushing a debug group");-
849 return;
never executed: return;
0
850 }-
851 if (source != QOpenGLDebugMessage::ApplicationSource
source != QOpe...licationSourceDescription
TRUEnever evaluated
FALSEnever evaluated
0
852 && source != QOpenGLDebugMessage::ThirdPartySource
source != QOpe...irdPartySourceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
853 QMessageLogger(__FILE__, 1636, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::pushGroup(): using a source different from ApplicationSource\n"-
854 " or ThirdPartySource is not supported by GL_KHR_debug. The group will not be pushed.");-
855 return;
never executed: return;
0
856 }-
857-
858 QByteArray rawName = name.toUtf8();-
859 rawName.append('\0');-
860 if (rawName.length() > d->maxMessageLength
rawName.length...xMessageLengthDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
861 QMessageLogger(__FILE__, 1644, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::pushGroup(): group name too long, truncating it\n"-
862 " (%d bytes long, but the GL accepts up to %d bytes)", rawName.length(), d->maxMessageLength);-
863 rawName.resize(d->maxMessageLength - 1);-
864 rawName.append('\0');-
865 }
never executed: end of block
0
866-
867-
868-
869-
870 d->glPushDebugGroup(qt_messageSourceToGL(source), id, -1, rawName.constData());-
871}
never executed: end of block
0
872void QOpenGLDebugLogger::popGroup()-
873{-
874 QOpenGLDebugLoggerPrivate * const d = d_func();-
875 if (!d->initialized
!d->initializedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
876 QMessageLogger(__FILE__, 1674, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::pushGroup(): object must be initialized before popping a debug group");-
877 return;
never executed: return;
0
878 }-
879-
880 d->glPopDebugGroup();-
881}
never executed: end of block
0
882void QOpenGLDebugLogger::enableMessages(QOpenGLDebugMessage::Sources sources,-
883 QOpenGLDebugMessage::Types types,-
884 QOpenGLDebugMessage::Severities severities)-
885{-
886 QOpenGLDebugLoggerPrivate * const d = d_func();-
887 d->controlDebugMessages(sources,-
888 types,-
889 severities,-
890 QVector<GLuint>(),-
891 ([]() -> QByteArray { enum { Size = sizeof("enableMessages") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "enableMessages" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()),
0
892 true);-
893}
never executed: end of block
0
894void QOpenGLDebugLogger::enableMessages(const QVector<GLuint> &ids,-
895 QOpenGLDebugMessage::Sources sources,-
896 QOpenGLDebugMessage::Types types)-
897{-
898 QOpenGLDebugLoggerPrivate * const d = d_func();-
899 d->controlDebugMessages(sources,-
900 types,-
901 QOpenGLDebugMessage::AnySeverity,-
902 ids,-
903 ([]() -> QByteArray { enum { Size = sizeof("enableMessages") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "enableMessages" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()),
0
904 true);-
905}
never executed: end of block
0
906void QOpenGLDebugLogger::disableMessages(QOpenGLDebugMessage::Sources sources,-
907 QOpenGLDebugMessage::Types types,-
908 QOpenGLDebugMessage::Severities severities)-
909{-
910 QOpenGLDebugLoggerPrivate * const d = d_func();-
911 d->controlDebugMessages(sources,-
912 types,-
913 severities,-
914 QVector<GLuint>(),-
915 ([]() -> QByteArray { enum { Size = sizeof("disableMessages") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "disableMessages" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()),
0
916 false);-
917}
never executed: end of block
0
918void QOpenGLDebugLogger::disableMessages(const QVector<GLuint> &ids,-
919 QOpenGLDebugMessage::Sources sources,-
920 QOpenGLDebugMessage::Types types)-
921{-
922 QOpenGLDebugLoggerPrivate * const d = d_func();-
923 d->controlDebugMessages(sources,-
924 types,-
925 QOpenGLDebugMessage::AnySeverity,-
926 ids,-
927 ([]() -> QByteArray { enum { Size = sizeof("disableMessages") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "disableMessages" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()),
0
928 false);-
929}
never executed: end of block
0
930QList<QOpenGLDebugMessage> QOpenGLDebugLogger::loggedMessages() const-
931{-
932 const QOpenGLDebugLoggerPrivate * const d = d_func();-
933 if (!d->initialized
!d->initializedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
934 QMessageLogger(__FILE__, 1777, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::loggedMessages(): object must be initialized before reading logged messages");-
935 return
never executed: return QList<QOpenGLDebugMessage>();
QList<QOpenGLDebugMessage>();
never executed: return QList<QOpenGLDebugMessage>();
0
936 }-
937-
938 static const GLuint maxMessageCount = 128;-
939 GLuint messagesRead;-
940 GLenum messageSources[maxMessageCount];-
941 GLenum messageTypes[maxMessageCount];-
942 GLuint messageIds[maxMessageCount];-
943 GLenum messageSeverities[maxMessageCount];-
944 GLsizei messageLengths[maxMessageCount];-
945-
946 QByteArray messagesBuffer;-
947 messagesBuffer.resize(maxMessageCount * d->maxMessageLength);-
948-
949 QList<QOpenGLDebugMessage> messages;-
950 do {-
951 messagesRead = d->glGetDebugMessageLog(maxMessageCount,-
952 GLsizei(messagesBuffer.size()),-
953 messageSources,-
954 messageTypes,-
955 messageIds,-
956 messageSeverities,-
957 messageLengths,-
958 messagesBuffer.data());-
959-
960 const char *messagesBufferPtr = messagesBuffer.constData();-
961 for (GLuint i = 0; i < messagesRead
i < messagesReadDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
962 QOpenGLDebugMessage message;-
963-
964 QOpenGLDebugMessagePrivate *messagePrivate = message.d.data();-
965 messagePrivate->source = qt_messageSourceFromGL(messageSources[i]);-
966 messagePrivate->type = qt_messageTypeFromGL(messageTypes[i]);-
967 messagePrivate->id = messageIds[i];-
968 messagePrivate->severity = qt_messageSeverityFromGL(messageSeverities[i]);-
969 messagePrivate->message = QString::fromUtf8(messagesBufferPtr, messageLengths[i] - 1);-
970-
971 messagesBufferPtr += messageLengths[i];-
972 messages << message;-
973 }
never executed: end of block
0
974 }
never executed: end of block
while (messagesRead == maxMessageCount
messagesRead =...axMessageCountDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
975-
976 return
never executed: return messages;
messages;
never executed: return messages;
0
977}-
978qint64 QOpenGLDebugLogger::maximumMessageLength() const-
979{-
980 const QOpenGLDebugLoggerPrivate * const d = d_func();-
981 if (!d->initialized
!d->initializedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
982 QMessageLogger(__FILE__, 1864, __PRETTY_FUNCTION__).warning("QOpenGLDebugLogger::maximumMessageLength(): object must be initialized before reading the maximum message length");-
983 return
never executed: return -1;
-1;
never executed: return -1;
0
984 }-
985 return
never executed: return d->maxMessageLength;
d->maxMessageLength;
never executed: return d->maxMessageLength;
0
986}-
987-
988-
989-
990-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9