Works around broken Intel Windows video drivers.

Just use regular boolean negation in our pixel shader's depth test everywhere except on Qualcomm.
This works around a bug in the Intel Windows driver where comparing a boolean value against true or false fails but boolean negation works fine.
Quite silly.

Should fix issues #7830 and #7899.
This commit is contained in:
Ryan Houdek
2014-12-03 00:29:50 -06:00
parent 22209bcc62
commit 5c3bbf7409
3 changed files with 36 additions and 5 deletions

View File

@ -178,6 +178,31 @@ namespace DriverDetails
// This was fixed in a v66 development version, the first shipping driver version with the release was v95.
// To be safe, make v95 the minimum version to work around this issue
BUG_BROKENATTRIBUTELESS,
// Bug: Qualcomm has broken boolean negation
// Affected devices: Adreno
// Started Version: -1
// Ended Version: -1
// Qualcomm has the boolean negation broken in their shader compiler
// Instead of inverting the boolean value it does a binary negation on the full 32bit register
// This causes a compare against zero to fail in their shader since it is no longer a 0 or 1 value
// but 0xFFFFFFFF or 0xFFFFFFFE depending on what the boolean value was before the negation.
//
// This bug has a secondary issue tied to it unlike other bugs.
// The correction of this bug is to check the boolean value against false which results in us
// not doing a negation of the source but instead checking against the boolean value we want.
// The issue with this is that Intel's Window driver is broken when checking if a boolean value is
// equal to true or false, so one has to do a boolean negation of the source
//
// eg.
// Broken on Qualcomm
// Works on Windows Intel
// if (!cond)
//
// Works on Qualcomm
// Broken on Windows Intel
// if (cond == false)
BUG_BROKENNEGATEDBOOLEAN,
};
// Initializes our internal vendor, device family, and driver version