View Issue Details

IDProjectCategoryView StatusLast Update
0005401Spring engineGeneralpublic2017-01-02 23:41
Reporterrah Assigned Tohokomoko  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
Product Version103.0 +git 
Target Version104.0 
Summary0005401: Issues with the handling of GL context creation make get in the way of debugging a GL problem
DescriptionTwo issues arise when setting DebugGL=1 in the spring configuration file. Firstly, the GL context debug flag is set before the GL context is created which causes the later context creation to fail. Secondly, the return value of the context creation is not checked meaning the failure goes unnoticed.

Both issues are fixed in attached patches.
Steps To ReproduceSet DebugGL=1 in the configuration file.
TagsNo tags attached.
Attached Files
0001-Check-creation-of-GL-context.patch (Attachment missing)
0002-Don-t-set-GL-debugging-flag-until-after-GL-context-i.patch (Attachment missing)
Checked infolog.txt for Errors

Activities

rah

2016-11-23 11:42

reporter   ~0016910

Second patch

rah

2016-11-23 11:44

reporter   ~0016911

Argh.. I uploaded the second patch twice, please ignore the third attachment.

hokomoko

2016-11-23 22:40

developer   ~0016912

Thanks for the patches!

This will have to wait a bit, since I'm going abroad for a week and a half or so, but I'll take care of this when I am back

hokomoko

2016-12-14 02:10

developer   ~0016961

I've applied the first patch but the second one seems to be incorrect - the flag must be set before the context's creation.

rah

2016-12-14 10:39

reporter   ~0016962

> the flag must be set before the context's creation

Can I ask how you came to that conclusion?

If this comes from testing, perhaps there is a difference in the drivers' implementations? The error I got was from the Intel driver.

Kloot

2016-12-14 16:06

developer   ~0016963

Per the SDL documentation, all OpenGL context attributes must be set before window creation.

There is no Intel-specific code path in the source of SDL_GL_SetAttribute, therefore this is a driver issue and your patch breaks functionality on other systems (as verified by manually applying it on my nvidia-equipped machine) which is not desired because it would no longer let us debug user graphics issues.

Issue History

Date Modified Username Field Change
2016-11-23 11:42 rah New Issue
2016-11-23 11:42 rah File Added: 0001-Check-creation-of-GL-context.patch
2016-11-23 11:42 rah File Added: 0002-Don-t-set-GL-debugging-flag-until-after-GL-context-i.patch
2016-11-23 11:42 rah File Added: 0002-Don-t-set-GL-debugging-flag-until-after-GL-context-i-2.patch
2016-11-23 11:42 rah Note Added: 0016910
2016-11-23 11:44 rah Note Added: 0016911
2016-11-23 11:53 abma File Deleted: 0002-Don-t-set-GL-debugging-flag-until-after-GL-context-i-2.patch
2016-11-23 12:34 abma Target Version => 104.0
2016-11-23 22:39 hokomoko Assigned To => hokomoko
2016-11-23 22:39 hokomoko Status new => assigned
2016-11-23 22:40 hokomoko Note Added: 0016912
2016-12-14 02:09 hokomoko Changeset attached => spring develop 1c96edcb
2016-12-14 02:10 hokomoko Note Added: 0016961
2016-12-14 02:10 hokomoko Status assigned => feedback
2016-12-14 10:39 rah Note Added: 0016962
2016-12-14 10:39 rah Status feedback => assigned
2016-12-14 16:06 Kloot Note Added: 0016963
2017-01-02 23:41 Kloot Status assigned => closed
2017-01-02 23:41 Kloot Resolution open => won't fix