2 Replies Latest reply on Sep 21, 2011 6:13 AM by messerli_mike

    Intel HD Graphics OpenGL driver bug: GL_QUADS not drawn

    elmar

      Dear support team,

       

      I just tested our OpenGL based molecular modeling application www.yasara.org with a Medion Akoya Core i3 notebook.

       

      The notebook has Windows 7 64bit with Intel HD graphics driver 8.15.10.2372 pre-installed.

       

      This driver worked fine except one major bug: Drawing GL_QUADS with fragment shader enabled results either in nothing (the GL_QUADS are not drawn at all) or draws them at the wrong spot (vertex coordinates are not updated correctly).

       

      Since this makes our application more or less unusable, I implemented a workaround, i.e. our application checks the OpenGL driver string for "Intel(R) HD Graphics" and - if found - draws GL_TRIANGLES instead of GL_QUADS (using the slow glArrayElement call, so it's kind of a hack and no permanent solution).

       

      The next step was to update to the latest driver 8.15.10.2509. There, the GL_QUADS problem was still present, and another serious issue showed up: the graphics got slower and slower. Starting at around 60 frames per second, the framerate slowly dropped to 3 frames per second. This did not happen with the pre-installed driver 8.15.10.2372. And again, it only happens with fragment shader enabled.

       

      I'll be happy to provide you with a download link to test yourself, just tell me. (Don't download YASARA yourself, since the workaround will be released shortly).

       

      Best regards,

      Elmar

        • 1. Re: Intel HD Graphics OpenGL driver bug: GL_QUADS not drawn
          elmar

          Just a little extra info: GL_QUAD_STRIP also doesn't work, but this can easily be solved by using GL_TRIANGLE_STRIP instead (since the vertex order is the same, there is essentially no difference between these two drawing modes).

          • 2. Re: Intel HD Graphics OpenGL driver bug: GL_QUADS not drawn
            messerli_mike

            Hi Elmar!

             

            If I had to create a workaround, I would avoid glArrayElement like the plague.

             

            Instead, I would try to allocate an index - list with 6 x  #QUADs (perhaps a static list,

            to minimize reallocations), fill the index - list with the exact same indices you otherwise

            use with glArrayElement, and then call

             

            glDrawElements, or better still, glDrawRangeElements

             

            at the end.

             

            This will give the OpenGL driver the opportunity to reuse vertices and saves a lot

            of transfer and transform overhead, and should result in MUCH higher performance,

            provided there is a reasonable large number of primitives per draw call.

             

            It perhaps could also fix the performance degredation you see.

             

            Not speaking for Intel.

             

             

            Regards,

             

            Michael