Bugzilla – Attachment 655 Details for
Bug 1078
No rendering on Intel Q35 Express under Windows 7
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch of my attempt based on caps blacklisting (skipping)
bug1078_blacklisting_caps.patch (text/plain), 8.18 KB, created by
Julien Gouesse
on 2014-10-02 15:49:21 CEST
(
hide
)
Description:
Patch of my attempt based on caps blacklisting (skipping)
Filename:
MIME Type:
Creator:
Julien Gouesse
Created:
2014-10-02 15:49:21 CEST
Size:
8.18 KB
patch
obsolete
>diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java >index 5d925fe..775e293 100644 >--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java >+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java >@@ -123,7 +123,7 @@ > final WGLExt wglExt = ((WindowsWGLContext)sharedResource.getContext()).getWGLExt(); > > if (DEBUG) { >- System.out.println(getThreadName()+": Pbuffer config: " + config); >+ System.err.println(getThreadName()+": Pbuffer config: " + config); > } > > final int winattrPbuffer = GLGraphicsConfigurationUtil.getExclusiveWinAttributeBits(false /* onscreen */, false /* fbo */, true /* pbuffer */, false /* bitmap */); >@@ -138,8 +138,8 @@ > final AbstractGraphicsDevice device = config.getScreen().getDevice(); > > if (DEBUG) { >- System.out.println(getThreadName()+": Pbuffer parentHdc = " + toHexString(sharedHdc)); >- System.out.println(getThreadName()+": Pbuffer chosenCaps: " + chosenCaps); >+ System.err.println(getThreadName()+": Pbuffer parentHdc = " + toHexString(sharedHdc)); >+ System.err.println(getThreadName()+": Pbuffer chosenCaps: " + chosenCaps); > } > > if( !WindowsWGLGraphicsConfiguration.GLCapabilities2AttribList( sharedResource, chosenCaps, >@@ -162,7 +162,7 @@ > if (DEBUG) { > System.err.println("" + nformats + " suitable pixel formats found"); > for (int i = 0; i < nformats; i++) { >- final WGLGLCapabilities dbgCaps = WindowsWGLGraphicsConfiguration.wglARBPFID2GLCapabilities(sharedResource, device, glProfile, >+ final WGLGLCapabilities dbgCaps = WindowsWGLGraphicsConfiguration.wglARBPFID2GLCapabilitiesNoCheck(sharedResource, device, glProfile, > sharedHdc, pformats.get(i), winattrPbuffer); > System.err.println("pixel format " + pformats.get(i) + " (index " + i + "): " + dbgCaps); > } >diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java >index 24d44b5..0dde1ad 100644 >--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java >+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java >@@ -321,6 +321,25 @@ > } > return AttribList2GLCapabilities(device, glp, hdc, pfdID, iattributes, niattribs, iresults, winattrbits); > } >+ >+ static WGLGLCapabilities wglARBPFID2GLCapabilitiesNoCheck(final WindowsWGLDrawableFactory.SharedResource sharedResource, >+ final AbstractGraphicsDevice device, final GLProfile glp, final long hdc, final int pfdID, >+ final int winattrbits) { >+ if (!sharedResource.hasARBPixelFormat()) { >+ return null; >+ } >+ >+ final IntBuffer iattributes = Buffers.newDirectIntBuffer(2 * MAX_ATTRIBS); >+ final IntBuffer iresults = Buffers.newDirectIntBuffer(2 * MAX_ATTRIBS); >+ final int niattribs = fillAttribsForGeneralWGLARBQuery(sharedResource, iattributes); >+ >+ if (!((WindowsWGLContext) sharedResource.getContext()).getWGLExt().wglGetPixelFormatAttribivARB(hdc, pfdID, 0, >+ niattribs, iattributes, iresults)) { >+ throw new GLException("wglARBPFID2GLCapabilities: Error getting pixel format attributes for pixel format " >+ + pfdID + " of device context " + toHexString(hdc) + ", werr " + GDI.GetLastError()); >+ } >+ return AttribList2GLCapabilitiesNoCheck(device, glp, hdc, pfdID, iattributes, niattribs, iresults, winattrbits); >+ } > > static int[] wglChoosePixelFormatARB(final WindowsWGLDrawableFactory.SharedResource sharedResource, final AbstractGraphicsDevice device, > final GLCapabilitiesImmutable capabilities, >@@ -396,7 +415,7 @@ > break; > } > } else if(DEBUG) { >- final GLCapabilitiesImmutable skipped = AttribList2GLCapabilities(device, glp, hdc, pfdIDs[i], iattributes, niattribs, iresults, GLGraphicsConfigurationUtil.ALL_BITS); >+ final GLCapabilitiesImmutable skipped = AttribList2GLCapabilitiesNoCheck(device, glp, hdc, pfdIDs[i], iattributes, niattribs, iresults, GLGraphicsConfigurationUtil.ALL_BITS); > System.err.println("wglARBPFIDs2GLCapabilities: bucket["+i+" -> skip]: pfdID "+pfdIDs[i]+", "+skipped+", winattr "+GLGraphicsConfigurationUtil.winAttributeBits2String(null, winattrbits).toString()); > } > } else if (DEBUG) { >@@ -560,10 +579,39 @@ > } > // non displayable requested (pbuffer) > } >+ if (/* >+ * (GLGraphicsConfigurationUtil.BITMAP_BIT & drawableTypeBits) != 0 >+ * && >+ *//* >+ * GLRendererQuirks.existStickyDeviceQuirk(device, >+ * GLRendererQuirks.NoPBufferWithAccum) && >+ */(pfd.getCAccumAlphaBits() != 0 || pfd.getCAccumRedBits() != 0 || pfd.getCAccumGreenBits() != 0 || pfd >+ .getCAccumBlueBits() != 0)) { >+ return null; >+ } >+ > final WGLGLCapabilities res = new WGLGLCapabilities(pfd, pfdID, glp); > res.setValuesByARB(iattribs, niattribs, iresults); > return (WGLGLCapabilities) GLGraphicsConfigurationUtil.fixWinAttribBitsAndHwAccel(device, drawableTypeBits, res); > } >+ >+ static WGLGLCapabilities AttribList2GLCapabilitiesNoCheck(final AbstractGraphicsDevice device, final GLProfile glp, >+ final long hdc, final int pfdID, final IntBuffer iattribs, final int niattribs, final IntBuffer iresults, >+ final int winattrmask) { >+ final int allDrawableTypeBits = AttribList2DrawableTypeBits(iattribs, niattribs, iresults); >+ int drawableTypeBits = winattrmask & allDrawableTypeBits; >+ >+ if (0 == drawableTypeBits) { >+ return null; >+ } >+ final PIXELFORMATDESCRIPTOR pfd = createPixelFormatDescriptor(); >+ >+ WGLUtil.DescribePixelFormat(hdc, pfdID, PIXELFORMATDESCRIPTOR.size(), pfd); >+ final WGLGLCapabilities res = new WGLGLCapabilities(pfd, pfdID, glp); >+ res.setValuesByARB(iattribs, niattribs, iresults); >+ return (WGLGLCapabilities) GLGraphicsConfigurationUtil >+ .fixWinAttribBitsAndHwAccel(device, drawableTypeBits, res); >+ } > > // > // GDI PIXELFORMAT >@@ -624,6 +672,13 @@ > return null; > } > } >+ if (/* (GLGraphicsConfigurationUtil.BITMAP_BIT & drawableTypeBits) != 0 && *//*(GLRendererQuirks.existStickyDeviceQuirk(device, GLRendererQuirks.NoPBufferWithAccum)) &&*/ (pfd.getCAccumAlphaBits() != 0 || pfd.getCAccumRedBits() != 0 || pfd.getCAccumGreenBits() != 0 || pfd.getCAccumBlueBits() != 0) ) { >+ if(DEBUG) { >+ System.err.println("Quirks: " + GLRendererQuirks.getStickyDeviceQuirks(device) + " on device " + device); >+ System.err.println("Drop [accum bits PBUFFER]: " + WGLGLCapabilities.PFD2String(pfd, pfdID)); >+ } >+ return null; >+ } > > final WGLGLCapabilities res = new WGLGLCapabilities(pfd, pfdID, glp); > res.setValuesByGDI(); >diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java >index ea92b38..03d14f7 100644 >--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java >+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java >@@ -521,9 +521,13 @@ > if( 0 <= chosenIdx ) { > if( _skipCapsChooser ) { > final WGLGLCapabilities caps = WindowsWGLGraphicsConfiguration.PFD2GLCapabilities(device, glProfile, hdc, chosenPFDID, winattrmask); >- availableCaps.add(caps); >- recommendedIndex = 0; >- skipCapsChooser = true; >+ if(null != caps) { >+ availableCaps.add(caps); >+ recommendedIndex = 0; >+ skipCapsChooser = true; >+ } else { >+ skipCapsChooser = false; >+ } > } else { > skipCapsChooser = false; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1078
:
640
|
641
|
642
|
643
|
644
|
645
|
646
|
647
|
648
|
649
|
650
|
651
|
652
|
654
| 655