android ndk - Dealing with OpenGL ES 2.0 driver bugs -


I am currently Android running a 3D C ++ game from IOS via NDK. Rendering is done with GLES2 when I finish typing all platform specific stuff and playing the game for the first time, I saw the rendering of bugs - sometimes only parts of geometry will be presented, sometimes Large triangles will flick through the screen, and so on ...

I tested it on Galaxy Nexus 4.1.2. glGetError () did not return anything Additionally, the game has run well on all iOS devices. I started to suspect a driver bug and after hunting for several hours I realized that the problem was the use of VAO ( GL_OES_vertex_array_object ), the same renderer worked fine without VAOs and VAOs Produced crap with.

I found this apart, I saw the same report and a staff member confirmed that this is actually a driver bug.

All this started to think about me - how can I handle cases of confirmed driver bugs?

  • Blacklisting specific devices and driver modifications, and not using the VAO on these devices.

    I do not like both options. Option No 1 will punish all users who have a good driver. VAO really encourages performance and I think it is a very bad thing to ignore them because one device has a bug. The option number 2 is very hard to correct. I can not test every Android device for broken drivers and I hope the list will change continuously, so it will be difficult to maintain.

    Any suggestions? Can there be a way to detect such driver bugs at runtime without having to manually test every device?

    In an open GL worm Android OS driver is a famous thing, so the driver is full of bugs It is possible by the way. Especially if you are using some advanced (non-properly tested) features like GL Extensions.

    In a large Android project, we generally fight these problems using the following checklist:

    1. Check your own code thoroughly and debug it and Ensure that we are not doing any API-misuses, check against OpenGL specifications.
    2. Google for problem (!!!)
    3. Contact the chip-set vendor (usually they have a form on their website to submit bugs to developers, but one Once you've submitted 2-3 actual bugs successfully, you can learn the direct email of those who can help you) and show them your code. Sometimes they get bugs in the driver, sometimes they API gets misused ...
    4. If the feature does not work on some devices, then just create a workaround or fallback in a traditional rendering path. / Li>
    5. If the feature is not supported, then do not use it - you can add it later when the market is ready for it.

  • Comments

    Popular posts from this blog

    Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

    java - How not to audit a join table and related entities using Hibernate Envers? -

    mongodb - CakePHP paginator ignoring order, but only for certain values -