| Summary: | glMultTransposeMatrixd and glLoadTransposeMatrixd buggy in AMD Adrenalin drivers | ||
|---|---|---|---|
| Product: | [JogAmp] Jogl | Reporter: | Julien Gouesse <gouessej> |
| Component: | core | Assignee: | Sven Gothel <sgothel> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | sgothel |
| Priority: | P4 | ||
| Version: | 3.0.0 | ||
| Hardware: | pc_all | ||
| OS: | windows | ||
| URL: | https://forum.jogamp.org/glMultTransposeMatrixd-bug-with-AMD-graphics-card-td4042205.html | ||
| Type: | DEFECT | SCM Refs: | |
| Workaround: | --- | ||
https://docs.gl/gl3/glMultTransposeMatrix "Calling glMultTransposeMatrix with matrix M is identical in operation to glMultMatrix with MT, where T represents the transpose." https://jogamp.org/deployment/archive/rc/v2.5.0-rc-20230523/javadoc/jogl/javadoc/com/jogamp/opengl/math/Matrix4f.html#transpose(com.jogamp.opengl.math.Matrix4f) (In reply to Sven Gothel from comment #1) Since the API entry in question is of type double, perhaps we copy Matrix4f -> Matrix4d (float -> double) and use it for the SW replacement if quirk is set? (In reply to Sven Gothel from comment #2) Good idea. |
glMultTransposeMatrixd and glLoadTransposeMatrixd don't transpose correcly in some AMD Adrenalin drivers (at least since the vendor version 22.5.1) under Microsoft Windows. I suggest to detect the buggy drivers this ways (when isDriverATICatalyst is true): final VersionNumber amdSafeAdrenalinVersion = new VersionNumber(22, 5, 1); if ( vendorVersion.compareTo(amdSafeAdrenalinVersion) > 0 ) { final int quirk = GLRendererQuirks.BuggyGlMultTransposeMatrixd; if(DEBUG) { System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: OS "+Platform.getOSType()+", [Vendor "+glVendor+" or Renderer "+glRenderer+"], driverVersion "+vendorVersion); } quirks.addQuirk( quirk ); } I suggest to modify https://jogamp.org/cgit/jogl.git/tree/make/config/jogl/gl-gl4bc.cfg to override glMultTransposeMatrixd and glLoadTransposeMatrixd so that they use GLContext to know whether a workaround is needed and in this case the transposition should be done in software.