SPV: Handle GLSL bool loads from a uniform buffer as a conversion from int -> bool.

SPIR-V bool is abstract; it has no bit pattern for storage with transparent memory.
OpenGL's convention is a bool in a uniform buffer is 32-bit int with non-0 being 'true'.
This commit is contained in:
John Kessenich
2016-02-08 21:38:15 -07:00
parent 10110596a3
commit 103bef9d74
4 changed files with 96 additions and 51 deletions

View File

@@ -506,6 +506,10 @@ public:
// get the direct pointer for an l-value
Id accessChainGetLValue();
// Get the inferred SPIR-V type of the result of the current access chain,
// based on the type of the base and the chain of dereferences.
Id accessChainGetInferredType();
void dump(std::vector<unsigned int>&) const;
void createBranch(Block* block);