Posted by
Sven Gothel on
Sep 29, 2014; 9:46pm
URL: https://forum.jogamp.org/Jogl-Using-Wrong-Generic-Graphics-Adapter-tp4033216p4033245.html
On 09/29/2014 10:17 PM, sfriend [via jogamp] wrote:
> Attached is a log with profile initialization, my logging had not been setup
> yet so I had missed that. Same symptoms in this log.
>
> Yes just a vanilla Jogl version, Currently running 2.2.1
>
> Thanks for your help, let me know if you need anything else.
Note that on Windows, we use GetDC and ReleaseDC
at lock/unlock surface. It is OK if implementation
changes the HDC handle 'name'.
However, even if changing the handle 'name'
its PFD shall remain set and valid.
Next time, pls attach your log file produced
by piping stderr/stdout to a file to preserve line numbers.
This simplifies finding the differences and reading the logs A LOT.
java -classpath %CP_ALL% %D_ARGS% %* > java-win.log 2>&1
Sure you have set all debug flags?
set D_ARGS="-Djogl.debug=all" "-Dnativewindow.debug=all"
++++
> test-gears-win7_64bit-amd:
Setup Shared ..
> test-gears-win7_64bit-amd.log#197:
ProxySurfaceImpl: surface change 0x0 -> 0x67010731
updateGraphicsConfiguration(using target): hdc 0x67010731
> test-gears-win7_64bit-amd.log#206:
setPixelFormat: hdc 0x67010731, GLCaps[wgl vid 2 gdi: rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/8/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]]
*** setCapsPFD: GLCaps[wgl vid 2 gdi: rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/8/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]]
^^ setting the shared surface's PFD, OK
.. Probing GL profiles w/ shared surface
.. Init JAWT based config .. (pre-selection)
> test-gears-win7_64bit-amd.log#1107:
ProxySurfaceImpl: surface change 0x67010731 -> 0xffffffffe4010739
^^ the shared HDC handle switches, OK
> test-gears-win7_64bit-amd.log#1108:
updateGraphicsConfiguration(using shared): hdc 0xffffffffe4010739
> test-gears-win7_64bit-amd.log#1138:
*** setCapsPFD: GLCaps[wgl vid 2 arb: rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/8/0, dbl, mono , hw, GLProfile[GL2/GL4bc.hw], on-scr[.]]
^^ the preselect stage using the shared HDC,
even thought its handle changed .. its PFD is still valid, OK
.. Init JAWT based config .. (final selection)
> test-gears-win7_64bit-amd.log#1225:
AWT-EventQueue-0: setRealized: drawable WindowsOnscreenWGLDrawable, surface WindowsJAWTWindow, isProxySurface false: false -> true
> test-gears-win7_64bit-amd.log#1263:
setPixelFormat (post): hdc 0x67010731, 0 -> 2, set: true
^^ final PFD setting on JAWT surface HDC.
Note the HDC handle name is reused .. however, its PFD state is 'vanilla',
i.e. unset. *** This is different w/ your test case ***
> test-gears-win7_64bit-amd.log#1342:
JAWTWindow: surface change 0x67010731 -> 0xffffffffe4010739
^^ HDC name changes again ..
++++
++++
Differences w/ your output
- no surface HDC handle change
- Already set PFD on supposed new HDC surface,
which actually seem to be the shared surface,
see below!
Setup Shared ..
> your_log_02#157:
setPixelFormat: hdc 0xffffffff9501062b, GLCaps[wgl vid 2 gdi: rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/8/0, dbl, mono , hw,
...
> your_log_02#2084:
Done setting up shared.
.. 3x Init JAWT based config .. (pre-selection)
> your_log_02#2383:
updateGraphicsConfiguration(using shared): hdc 0xffffffffd8010b22
user chosen caps GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
updateGraphicsConfigurationARB: hdc 0xffffffffd8010b22, pfdIDCount(hdc) 107, capsChosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]], WINDOW
isOpaque true (translucency requested: false, compositioning enabled: true)
extHDC true, chooser true, pformatsNum -1
> your_log_02#3258:
updateGraphicsConfiguration(using shared): hdc 0x620109cd
user chosen caps GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
updateGraphicsConfigurationARB: hdc 0x620109cd, pfdIDCount(hdc) 107, capsChosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]], WINDOW
isOpaque true (translucency requested: false, compositioning enabled: true)
extHDC true, chooser true, pformatsNum -1
> your_log_02#4203:
updateGraphicsConfiguration(using shared): hdc 0xffffffffa9010913
user chosen caps GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
updateGraphicsConfigurationARB: hdc 0xffffffffa9010913, pfdIDCount(hdc) 107, capsChosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]], WINDOW
isOpaque true (translucency requested: false, compositioning enabled: true)
extHDC true, chooser true, pformatsNum -1
> your_log_02#2619:
chosen pfdID (ARB): native recommended 1 chosen GLCaps[wgl vid 2 arb: rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/8/0, dbl, mono, hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]], skipCapsChooser false
*** setCapsPFD: GLCaps[wgl vid 2 arb: rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/8/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw],on-scr[.]]
> your_log_02#2847:
setPixelFormat (post): hdc 0xffffffffd8010b22, 0 -> 2, set: true
> your_log_02#4203:
updateGraphicsConfiguration(using shared): hdc 0xffffffffa9010913
user chosen caps GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
updateGraphicsConfigurationARB: hdc 0xffffffffa9010913, pfdIDCount(hdc) 107, capsChosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0,
> your_log_02#4771:
setPixelFormat (post): hdc 0xffffffffa9010913, 32 -> 2, set: false
- We have no occurrence of 0xffffffffa9010913, other than here.
- We have no occurrence of having any HDC's PFD set to '32' !
Where does that HDC/PFD come from ?
I hope you don't use any 'private JOGL API' .., do you ?
Can you reproduce this issue w/ one of our unit tests ?
As you know .. ours are passing.
(I currently re-run on all tests on this AMD machine, will post results)
Can you produce a most simple unit test like our TestGearsAWT,
so I can validate ?
Thank you!
~Sven