glslangValidator: Add straightforward SPIR-V support (non-optimizing, ~3.x functionality).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30032 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
@@ -482,6 +482,7 @@ public:
|
||||
|
||||
layoutLocation = layoutLocationEnd;
|
||||
layoutComponent = layoutComponentEnd;
|
||||
layoutSet = layoutSetEnd;
|
||||
layoutBinding = layoutBindingEnd;
|
||||
layoutIndex = layoutIndexEnd;
|
||||
|
||||
@@ -513,6 +514,9 @@ public:
|
||||
unsigned int layoutComponent : 3;
|
||||
static const unsigned int layoutComponentEnd = 4;
|
||||
|
||||
unsigned int layoutSet : 7;
|
||||
static const unsigned int layoutSetEnd = 0x3F;
|
||||
|
||||
unsigned int layoutBinding : 8;
|
||||
static const unsigned int layoutBindingEnd = 0xFF;
|
||||
|
||||
@@ -575,6 +579,10 @@ public:
|
||||
{
|
||||
return layoutIndex != layoutIndexEnd;
|
||||
}
|
||||
bool hasSet() const
|
||||
{
|
||||
return layoutSet != layoutSetEnd;
|
||||
}
|
||||
bool hasBinding() const
|
||||
{
|
||||
return layoutBinding != layoutBindingEnd;
|
||||
@@ -1201,6 +1209,8 @@ public:
|
||||
if (qualifier.hasIndex())
|
||||
p += snprintf(p, end - p, "index=%d ", qualifier.layoutIndex);
|
||||
}
|
||||
if (qualifier.hasSet())
|
||||
p += snprintf(p, end - p, "set=%d ", qualifier.layoutSet);
|
||||
if (qualifier.hasBinding())
|
||||
p += snprintf(p, end - p, "binding=%d ", qualifier.layoutBinding);
|
||||
if (qualifier.hasStream())
|
||||
|
||||
@@ -3312,6 +3312,12 @@ void TParseContext::setLayoutQualifier(TSourceLoc loc, TPublicType& publicType,
|
||||
else
|
||||
publicType.qualifier.layoutLocation = value;
|
||||
return;
|
||||
} else if (id == "set") {
|
||||
if ((unsigned int)value >= TQualifier::layoutSetEnd)
|
||||
error(loc, "set is too large", id.c_str(), "");
|
||||
else
|
||||
publicType.qualifier.layoutSet = value;
|
||||
return;
|
||||
} else if (id == "binding") {
|
||||
profileRequires(loc, ~EEsProfile, 420, GL_ARB_shading_language_420pack, "binding");
|
||||
profileRequires(loc, EEsProfile, 310, 0, "binding");
|
||||
@@ -3476,6 +3482,8 @@ void TParseContext::mergeObjectLayoutQualifiers(TSourceLoc loc, TQualifier& dst,
|
||||
if (src.hasOffset())
|
||||
dst.layoutOffset = src.layoutOffset;
|
||||
|
||||
if (src.hasSet())
|
||||
dst.layoutSet = src.layoutSet;
|
||||
if (src.layoutBinding != TQualifier::layoutBindingEnd)
|
||||
dst.layoutBinding = src.layoutBinding;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user