Bug 1432 - glMultTransposeMatrixd and glLoadTransposeMatrixd buggy in AMD Adrenalin drivers
Summary: glMultTransposeMatrixd and glLoadTransposeMatrixd buggy in AMD Adrenalin drivers
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 2.4.0
Hardware: pc_all windows
: P4 normal
Assignee: Sven Gothel
URL: https://forum.jogamp.org/glMultTransp...
Depends on:
Reported: 2023-04-20 13:15 CEST by Julien Gouesse
Modified: 2023-05-23 17:10 CEST (History)
1 user (show)

See Also:
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Julien Gouesse 2023-04-20 13:15:38 CEST
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.
Comment 1 Sven Gothel 2023-05-23 17:08:55 CEST

"Calling glMultTransposeMatrix with matrix M is identical in operation to glMultMatrix with MT, where T represents the transpose."

Comment 2 Sven Gothel 2023-05-23 17:10:25 CEST
(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?