Forums - Boolean negation failure.

2 posts / 0 new
Last post
Boolean negation failure.
Sonicadvance1
Join Date: 2 Nov 12
Posts: 51
Posted: Wed, 2014-10-29 09:55
In my application I have an alpha testing routine that if the shader's alpha test fails it will discard and return early before any real work is done. In particular I had trouble with this alpha testing code in the new v95 driver that is provided in the Android 5.0 pre-release driver that came out for the Nexus 5.
The basic conditions in order to trigger this issue is to have a condition in an if statement and then negate the boolean value.
A simple shader like one that follows will fail to output anything. http://hastebin.com/jogunitenu.avrasmIf we change the boolean condition from from a negation to a simple check for false it will work. http://hastebin.com/vebesonahe.avrasm
This is clearly not intended behaviour. I have a source tree that I quickly whipped together that demonstrates the issue. This tarball contains both the source and a release built APK for your testing. http://gdurl.com/oROZ
I currently have the workaround implemented in production code on my project. https://github.com/dolphin-emu/dolphin/pull/1434I also noticed that boolean negation has an interesting effect to the program's disassembly as noted by my twitter post. https://twitter.com/sonicadvance1/status/527277298282536961
I hope this information allows you to rectify your issue.
  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Fri, 2014-10-31 12:47

Hi..

We've confirmed this problem with negation exists in current drivers, and has also been fixed recently for our newer drivers.

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.