SPV Version: Emit the requested SPIR-V version, not the header version.

Fixes #1236.
This commit is contained in:
John Kessenich
2018-01-31 18:35:56 -07:00
parent 43f5b27321
commit 2b5ea9f851
493 changed files with 500 additions and 497 deletions

View File

@@ -60,7 +60,7 @@ namespace spv {
class Builder {
public:
Builder(unsigned int userNumber, SpvBuildLogger* logger);
Builder(unsigned int spvVersion, unsigned int userNumber, SpvBuildLogger* logger);
virtual ~Builder();
static const int maxMatrixSize = 4;
@@ -585,6 +585,7 @@ public:
void dumpInstructions(std::vector<unsigned int>&, const std::vector<std::unique_ptr<Instruction> >&) const;
void dumpModuleProcesses(std::vector<unsigned int>&) const;
unsigned int spvVersion; // the version of SPIR-V to emit in the header
SourceLanguage source;
int sourceVersion;
spv::Id sourceFileStringId;