summaryrefslogtreecommitdiffstats
path: root/src/tools/uic/cpp/cppwriteinitialization.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-05-03 12:02:58 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2021-05-03 16:10:36 +0200
commitc28e609ff4b863d5b849749d995d503fba365fb7 (patch)
tree4f90452526c3adb0c85755277f09c19d7d119dcf /src/tools/uic/cpp/cppwriteinitialization.cpp
parent21b3b54193b9d90ee377fdfa306e21d2fdfe2837 (diff)
rhi: gl: Sanity check vertex outputs and fragment inputs
Print a warning if the name for a given location does not match. This is relevant only to OpenGL and only to < 330 GLSL versions: there the location qualifier is simply not present in the actual shader code and all matching is name-based. This leads to hard to discover problems in Qt Quick ShaderEffects for instance, where providing a custom fragment shader but using a built-in vertex shader is common, and one may be tempted to use a name other than qt_TexCoord0 for the input variable in the fragment shader. Unfortunately this breaks, sometimes silently, when not having location qualifiers. (and we won't, neither in GLSL 120 or 150 which are the standard for Qt Quick) Make this situation recognizable by printing a warning to the debug output. Pick-to: 6.1 Task-number: QTBUG-92500 Task-number: QTBUG-93370 Change-Id: I0d0bcc135e23a228783f7633f872e39c4e43bb93 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/tools/uic/cpp/cppwriteinitialization.cpp')
0 files changed, 0 insertions, 0 deletions