Closed
Bug 1009965
Opened 11 years ago
Closed 11 years ago
be explicit about whether we're quering for core GL symbols or extension GL symbols
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: vlad, Assigned: vlad)
References
Details
Attachments
(2 files)
22.39 KB,
patch
|
bjacob
:
review+
|
Details | Diff | Splinter Review |
34.63 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
This comes up with some things like framebuffer_multisample -- it might be core, or it might be in an extension.
If it's core, like in ES 3, then we'll have a symbol without a suffix. But it might not be (is not) legal to call that symbol on an ES2 context, even though it exists. ANGLE enforces this. So this patch makes it so that we check and see if a feature is core or not, and if it is, then we only query the undecorated symbols.
To be 100% correct we should only query for symbols for the specific extension that we found first, but I don't think that's needed.
Attachment #8422117 -
Flags: review?(bjacob)
Comment 1•11 years ago
|
||
Comment on attachment 8422117 [details] [diff] [review]
do explicit extension/core queries
Review of attachment 8422117 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/gl/GLContext.cpp
@@ +49,5 @@
> namespace mozilla {
> namespace gl {
>
> +// from GLContextFeatures.cpp
> +bool IsFeaturePartOfProfileVersion(GLFeature feature, ContextProfile profile, unsigned int version);
It would be nice to have this prototype in a header.
Attachment #8422117 -
Flags: review?(bjacob) → review+
Assignee | ||
Comment 2•11 years ago
|
||
Ugh. It turns out there are some ARB extensions that don't use symbols with ARB in the suffix; specifically, extensions that were created to match existing core GL functionality (or simultaneously released along with a new GL version, in order to provide the feature on downrev GL versions). For these, the functions are defined to behave exactly like core, so there is no ARB suffix.
ARB_vertex_array_object is one of these. The compounding issue is that Mesa/Gallium/llvmpipe seems to *never* return NULL from glXGetProcAddress(); instead it generates dummy dispatch table entries that are supposed to be filled in when a context is actually made current. So we were querying for, for example, glGenVertexArraysARB which shouldn't exist, but getting a pointer back.
Some docs we found say that actually calling those functions should crash, but it definitely doesn't crash for us; they just seem to set a GL error and continue. Likewise, it's always the same function pointer that's returned (no new entries were created).
This patch handles these ARB extensions and uses the core symbol tables for looking them up.
Attachment #8434371 -
Flags: review?(jmuizelaar)
Updated•11 years ago
|
Attachment #8434371 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•