New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a workaround for a bug in my graphics driver(?) whereby ... #77

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
2 participants
@wivlaro
Contributor

wivlaro commented Dec 15, 2014

glVertexArrayVertexAttribDivisorEXT was not defined. Not sure about the bindingindex parameter, re-used location, maybe that's bad.

Here's some of my glxinfo:
server glx vendor string: ATI
server glx version string: 1.4
client glx vendor string: ATI
client glx version string: 1.4
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 7800 Series
OpenGL core profile version string: 4.3.12874 Core Profile Context 13.35.1005
OpenGL core profile shading language version string: 4.30
OpenGL version string: 4.4.12874 Compatibility Profile Context 13.35.1005
OpenGL shading language version string: 4.30

And from lspci:
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn PRO [Radeon HD 7850](prog-if 00 [VGA controller])
Subsystem: Micro-Star International Co., Ltd. [MSI] Device 2733
Flags: bus master, fast devsel, latency 0, IRQ 47
Memory at e0000000 (64-bit, prefetchable) [size=256M]
Memory at feb80000 (64-bit, non-prefetchable) [size=256K]
I/O ports at e000 [size=256]
[virtual] Expansion ROM at feb00000 [disabled] [size=128K]
Capabilities: [48] Vendor Specific Information: Len=08 Capabilities: [50] Power Management version 3 Capabilities: [58] Express Legacy Endpoint, MSI 00 Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010
Capabilities: [150] Advanced Error Reporting
Capabilities: [270] #19
Capabilities: [2b0] Address Translation Service (ATS)
Capabilities: [2c0] #13
Capabilities: [2d0] #1b
Kernel driver in use: fglrx_pci

Fix for a bug in my graphics driver(?) whereb glVertexArrayVertexAttr…
…ibDivisorEXT was not defined. Not sure about the bindingindex parameter, re-used location, maybe that's bad.
@mosra

This comment has been minimized.

Show comment
Hide comment
@mosra

mosra Dec 16, 2014

Owner

Hi,

oh well. Just looking at ARB_instanced_arrays spec, this function was added as an afterthought five years later, so I guess AMD just forgot to update the driver. As said in the spec, the implementation should check for this fact:

    7) How should EXT_direct_state_access interact with this extension?

        Resolved:  Add glVertexArrayVertexAttribDivisorEXT selector-free
        vertex array object command and glGetVertexArrayIntegeri_vEXT
        query must accept VERTEX_ATTRIB_ARRAY_DIVISOR_ARB to return the
        vertex array object's vertex attrib array divisor state.

        The DSA interaction was added July 2013.  If implementations
        respond to a wglGetProcAddress, etc. query for
        "glVertexArrayVertexAttribDivisorEXT" with a NULL pointer,
        the DSA functionality is not available.

I'll put in more robust fix later as the function is used on more than one place. In the meantime (if the workaround for some reason won't work), the radical solution is to disable EXT_direct_state_access completely in src/src/Magnum/Implementation/setupDriverWorkarounds.cpp:

-    if(detectedDriver() & DetectedDriver::AMD)
+    if(detectedDriver() & DetectedDriver::AMD) {
         _setRequiredVersion(GL::ARB::explicit_uniform_location, None);
+        _setRequiredVersion(GL::EXT::direct_state_access, None); 
+    }

Also, could you please try newer drivers, if you have some time? Currently the newest ones seem to be 14.6 beta, I wonder if it is already fixed there.

Thanks for reporting!


Other than that, I'm planning to port Mesh to ARB_vertex_attrib_binding and completely replace EXT_direct_state_access with ARB_direct_state_access, but I'm currently spending all my free time on OpenGEX importer (#44), so that might take a while.

Owner

mosra commented Dec 16, 2014

Hi,

oh well. Just looking at ARB_instanced_arrays spec, this function was added as an afterthought five years later, so I guess AMD just forgot to update the driver. As said in the spec, the implementation should check for this fact:

    7) How should EXT_direct_state_access interact with this extension?

        Resolved:  Add glVertexArrayVertexAttribDivisorEXT selector-free
        vertex array object command and glGetVertexArrayIntegeri_vEXT
        query must accept VERTEX_ATTRIB_ARRAY_DIVISOR_ARB to return the
        vertex array object's vertex attrib array divisor state.

        The DSA interaction was added July 2013.  If implementations
        respond to a wglGetProcAddress, etc. query for
        "glVertexArrayVertexAttribDivisorEXT" with a NULL pointer,
        the DSA functionality is not available.

I'll put in more robust fix later as the function is used on more than one place. In the meantime (if the workaround for some reason won't work), the radical solution is to disable EXT_direct_state_access completely in src/src/Magnum/Implementation/setupDriverWorkarounds.cpp:

-    if(detectedDriver() & DetectedDriver::AMD)
+    if(detectedDriver() & DetectedDriver::AMD) {
         _setRequiredVersion(GL::ARB::explicit_uniform_location, None);
+        _setRequiredVersion(GL::EXT::direct_state_access, None); 
+    }

Also, could you please try newer drivers, if you have some time? Currently the newest ones seem to be 14.6 beta, I wonder if it is already fixed there.

Thanks for reporting!


Other than that, I'm planning to port Mesh to ARB_vertex_attrib_binding and completely replace EXT_direct_state_access with ARB_direct_state_access, but I'm currently spending all my free time on OpenGEX importer (#44), so that might take a while.

@mosra mosra added the bug label Dec 16, 2014

@mosra

This comment has been minimized.

Show comment
Hide comment
@mosra

mosra Dec 25, 2014

Owner

Should be fixed in 8446186. Please reopen if the problem persists.

Owner

mosra commented Dec 25, 2014

Should be fixed in 8446186. Please reopen if the problem persists.

@mosra mosra closed this Dec 25, 2014

@mosra mosra referenced this pull request Jan 2, 2015

Open

Dropping EXT_direct_state_access support #81

0 of 1 task complete

@mosra mosra removed this from Done in Platforms Feb 15, 2018

@mosra mosra added this to the 2015.05 milestone Feb 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment