Summary: | Shader cache gives spurious linking errors on sharing between contexts of different versions | ||
---|---|---|---|
Product: | Mesa | Reporter: | Steinar H. Gunderson <sgunderson> |
Component: | glsl-compiler | Assignee: | mesa-dev |
Status: | RESOLVED WONTFIX | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Steinar H. Gunderson
2019-06-10 09:40:30 UTC
(In reply to Steinar H. Gunderson from comment #0) > It's unclear from the spec what should happen, but given that 1 and 2 were > compiled in the context of A, I would say that linking them in B should be > legal I disagree. Compiling in one context with a high GL version then linking those compiled shaders in a different context with a lower GL version is asking for trouble. The features that are missing/disabled when compiling in a lower version are likely to not be correctly handled when linking either. Just because it seems to be working with your use case when the cache is disabled doesn't mean it should or always will. Just to add the missing details here. The reason for the version mismatch is because one context is core and the other is compat were the i965 driver has a maximum compat version of 3.0, but up to 4.5 is support in core. Most other (non-mesa) drivers have always had matched core/compat versions which is likely why the spec has never bothered to cover this mismatch case. IMO the best solution is to add proper compat support to all drivers. We could improve the error messages but IMO that effort could be better spent working on adding support. I don't think there is any Mesa bug here and IMO your application needs to check the context version work around the problem. Well, at the very least, the re-linking should check the return value of the compilation. That could fail for pretty much any reason, no? Intels iris driver which will be the default driver in a future release now has compat profile support so this will be a non issue in future. Marking this as won't fix as it's unlikely we will update legacy drivers to handle this corner case. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.