diff options
author | Erik Faye-Lund <[email protected]> | 2019-06-13 12:03:27 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-07-25 17:20:10 +0200 |
commit | c5f14322965cc006038e293902412e76ad268767 (patch) | |
tree | eb654f38e1edbeb699c288f971bb4ddfc951b2b4 /src/drm-shim/README.md | |
parent | 7e1fe81f565fb72c63705b516d3e3b4c06184fc5 (diff) |
glsl: report no function instead of empty candidate list
When generating the error message for a missing function error where
all available overloads were missing due to a too low GLSL version, we
used to report something like this:
---8<---
0:224(14): error: no matching function for call to
`textureCubeLod(samplerCube, vec3, float)'; candidates are:
0:224(14): error: type mismatch
---8<---
This is a pretty confusing error message, and can throw people off when
debugging. So let's instead check if any overload is available before we
decide what to print. This allow us to report something like this
instead:
---8<---
0:224(14): error: no function with name 'textureCubeLod'
0:224(14): error: type mismatch
---8<---
This is arguably easier to understand for programmers, and doesn't send
you on a wild goose chase to figure out what argument is wrong just
because you stopped reading the message prematurely. I'm of course
referring to a friend, not me. For sure. I would never do that.
Signed-off-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/drm-shim/README.md')
0 files changed, 0 insertions, 0 deletions