Testing: Add new tests, and new ways of testing, for floating-point.

- Adds a pragma to see binary output of double values (not portable)
- Print decimals that show more values, but in a portable way
  (lots of portability issues)
- Expand the tests to test more double values

Note: it is quite difficult to have 100% portable tests for floating point.
The current situation works by not printing full precision, and working around
several portability issues.
This commit is contained in:
John Kessenich 2018-05-24 18:11:47 -06:00
parent 8e4b496d4a
commit 1ea1b13f38
11 changed files with 1161 additions and 78 deletions

7
glslang/MachineIndependent/localintermediate.h Normal file → Executable file
View file

@ -233,7 +233,8 @@ public:
useStorageBuffer(false),
hlslIoMapping(false),
textureSamplerTransformMode(EShTexSampTransKeep),
needToLegalize(false)
needToLegalize(false),
binaryDoubleOutput(false)
{
localSize[0] = 1;
localSize[1] = 1;
@ -634,6 +635,9 @@ public:
void setNeedsLegalization() { needToLegalize = true; }
bool needsLegalization() const { return needToLegalize; }
void setBinaryDoubleOutput() { binaryDoubleOutput = true; }
bool getBinaryDoubleOutput() { return binaryDoubleOutput; }
const char* const implicitThisName;
const char* const implicitCounterName;
@ -742,6 +746,7 @@ protected:
TProcesses processes;
bool needToLegalize;
bool binaryDoubleOutput;
private:
void operator=(TIntermediate&); // prevent assignments