SPV: Implement Vulkan 1.1 features and extensions.

This commit is contained in:
John Kessenich 2018-03-06 16:12:04 -07:00
parent b2ae1d0521
commit 66011cb2c2
121 changed files with 51726 additions and 7500 deletions

View file

@ -70,7 +70,7 @@
// This should always increase, as some paths to do not consume
// a more major number.
// It should increment by one when new functionality is added.
#define GLSLANG_MINOR_VERSION 1
#define GLSLANG_MINOR_VERSION 2
//
// Call before doing any other compiler/linker operations.
@ -128,6 +128,17 @@ typedef enum {
EshTargetSpv = EShTargetSpv, // legacy spelling
} EShTargetLanguage;
typedef enum {
EShTargetVulkan_1_0 = (1 << 22),
EShTargetVulkan_1_1 = (1 << 22) | (1 << 12),
EShTargetOpenGL_450 = 450,
} EshTargetClientVersion;
typedef enum {
EShTargetSpv_1_0 = (1 << 16),
EShTargetSpv_1_3 = (1 << 16) | (3 << 8),
} EShTargetLanguageVersion;
struct TInputLanguage {
EShSource languageFamily; // redundant information with other input, this one overrides when not EShSourceNone
EShLanguage stage; // redundant information with other input, this one overrides when not EShSourceNone
@ -137,12 +148,12 @@ struct TInputLanguage {
struct TClient {
EShClient client;
int version; // version of client itself (not the client's input dialect)
EshTargetClientVersion version; // version of client itself (not the client's input dialect)
};
struct TTarget {
EShTargetLanguage language;
unsigned int version; // the version to target, if SPIR-V, defined by "word 1" of the SPIR-V binary header
EShTargetLanguageVersion version; // version to target, if SPIR-V, defined by "word 1" of the SPIR-V header
};
// All source/client/target versions and settings.
@ -398,12 +409,12 @@ public:
environment.input.dialect = client;
environment.input.dialectVersion = version;
}
void setEnvClient(EShClient client, int version)
void setEnvClient(EShClient client, EshTargetClientVersion version)
{
environment.client.client = client;
environment.client.version = version;
}
void setEnvTarget(EShTargetLanguage lang, unsigned int version)
void setEnvTarget(EShTargetLanguage lang, EShTargetLanguageVersion version)
{
environment.target.language = lang;
environment.target.version = version;