|
|
Chromium Code Reviews
DescriptionFix context creation problems in dm
Fixes these issues:
1. The glXCreateContextAttribsARB call seems to modify the
context_attrib parameter upon failure. Since context_attrib was static,
if it first tried to create an OpenGL 4.4 context and it failed, further
attempts to create a context with lower versions would also fail.
2. Getting an OpenGL 3.0 context was never tried.
3. Context creation for ES 3.0 was failing on my machine. Since ES 2.0
looks like the intended version from the surrounding code, I set it to
that. It could be rewritten to use a similar loop as standard OpenGL and
try from the highest version to the lowest.
BUG=skia:5403
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147513002
Committed: https://skia.googlesource.com/skia/+/7b70156334629c083040f4d175e23b8743f53153
Patch Set 1 #Patch Set 2 : fix space #Patch Set 3 : add comment about static #Messages
Total messages: 18 (13 generated)
Description was changed from ========== Fix context creation problems in dm Fixes these issues: 1. The glXCreateContextAttribsARB call seems to modify the context_attrib parameter upon failure. Since context_attrib was static, if it first tried to create an OpenGL 4.4 context and it failed, further attempts to create a context with lower versions would also fail. 2. Getting an OpenGL 3.0 context was never tried. 3. Context creation for ES 3.0 was failing on my machine. Since ES 2.0 looks like the intended version from the surrounding code, I set it to that. It could be rewritten to use a similar loop as standard OpenGL and try from the highest version to the lowest. BUG=skia:5403 ========== to ========== Fix context creation problems in dm Fixes these issues: 1. The glXCreateContextAttribsARB call seems to modify the context_attrib parameter upon failure. Since context_attrib was static, if it first tried to create an OpenGL 4.4 context and it failed, further attempts to create a context with lower versions would also fail. 2. Getting an OpenGL 3.0 context was never tried. 3. Context creation for ES 3.0 was failing on my machine. Since ES 2.0 looks like the intended version from the surrounding code, I set it to that. It could be rewritten to use a similar loop as standard OpenGL and try from the highest version to the lowest. BUG=skia:5403 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147513002 ==========
martina.kollarova@intel.com changed reviewers: + bsalomon@google.com, reed@google.com
I'm thinking about rewriting it into a single loop that would try creating the highest version standard OpenGL or ES context. The fallback 2.0 context creation is probably just a leftover from copy-pasting [1] and could be merged into it. What do you think? [1] https://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)
The CQ bit was checked by martina.kollarova@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on master.client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_6...)
On 2016/07/12 14:08:31, mkollaro wrote: > I'm thinking about rewriting it into a single loop that would try creating the > highest version standard OpenGL or ES context. The fallback 2.0 context creation > is probably just a leftover from copy-pasting [1] and could be merged into it. > What do you think? > > [1] https://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX) Rewriting as one loops sounds like a good idea.. This lgtm, but could you add a comment about glXCreateContextAttribsARB modifying the attribs? I'd just like to capture that so we don't readd the same bug in the future.
The CQ bit was checked by martina.kollarova@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/07/12 15:22:05, bsalomon wrote: > On 2016/07/12 14:08:31, mkollaro wrote: > > I'm thinking about rewriting it into a single loop that would try creating the > > highest version standard OpenGL or ES context. The fallback 2.0 context > creation > > is probably just a leftover from copy-pasting [1] and could be merged into it. > > What do you think? > > > > [1] https://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX) > > Rewriting as one loops sounds like a good idea.. This lgtm, but could you add a > comment about glXCreateContextAttribsARB modifying the attribs? I'd just like to > capture that so we don't readd the same bug in the future. Done. I'll try the single-loop rewrite in another commit.
The CQ bit was checked by bsalomon@google.com
The patchset sent to the CQ was uploaded after l-g-t-m from bsalomon@google.com Link to the patchset: https://codereview.chromium.org/2147513002/#ps40001 (title: "add comment about static")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Fix context creation problems in dm Fixes these issues: 1. The glXCreateContextAttribsARB call seems to modify the context_attrib parameter upon failure. Since context_attrib was static, if it first tried to create an OpenGL 4.4 context and it failed, further attempts to create a context with lower versions would also fail. 2. Getting an OpenGL 3.0 context was never tried. 3. Context creation for ES 3.0 was failing on my machine. Since ES 2.0 looks like the intended version from the surrounding code, I set it to that. It could be rewritten to use a similar loop as standard OpenGL and try from the highest version to the lowest. BUG=skia:5403 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147513002 ========== to ========== Fix context creation problems in dm Fixes these issues: 1. The glXCreateContextAttribsARB call seems to modify the context_attrib parameter upon failure. Since context_attrib was static, if it first tried to create an OpenGL 4.4 context and it failed, further attempts to create a context with lower versions would also fail. 2. Getting an OpenGL 3.0 context was never tried. 3. Context creation for ES 3.0 was failing on my machine. Since ES 2.0 looks like the intended version from the surrounding code, I set it to that. It could be rewritten to use a similar loop as standard OpenGL and try from the highest version to the lowest. BUG=skia:5403 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147513002 Committed: https://skia.googlesource.com/skia/+/7b70156334629c083040f4d175e23b8743f53153 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://skia.googlesource.com/skia/+/7b70156334629c083040f4d175e23b8743f53153 |
