Revert "Revert "GL_ext_vulkan_glsl_relaxed extension support, and cross stage aware IO mapper""

This commit is contained in:
greg-lunarg 2021-03-15 11:26:11 -06:00 committed by GitHub
parent a36d91e5ac
commit 4e064eef46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 6707 additions and 111 deletions

View file

@ -501,6 +501,7 @@ public:
noContraction = false;
nullInit = false;
#endif
defaultBlock = false;
}
// drop qualifiers that don't belong in a temporary variable
@ -514,6 +515,7 @@ public:
specConstant = false;
nonUniform = false;
nullInit = false;
defaultBlock = false;
clearLayout();
}
@ -572,6 +574,7 @@ public:
bool specConstant : 1;
bool nonUniform : 1;
bool explicitOffset : 1;
bool defaultBlock : 1; // default blocks with matching names have structures merged when linking
#ifdef GLSLANG_WEB
bool isWriteOnly() const { return false; }
@ -756,6 +759,46 @@ public:
}
}
TBlockStorageClass getBlockStorage() const {
if (storage == EvqUniform && !isPushConstant()) {
return EbsUniform;
}
else if (storage == EvqUniform) {
return EbsPushConstant;
}
else if (storage == EvqBuffer) {
return EbsStorageBuffer;
}
return EbsNone;
}
void setBlockStorage(TBlockStorageClass newBacking) {
#ifndef GLSLANG_WEB
layoutPushConstant = (newBacking == EbsPushConstant);
#endif
switch (newBacking) {
case EbsUniform :
if (layoutPacking == ElpStd430) {
// std430 would not be valid
layoutPacking = ElpStd140;
}
storage = EvqUniform;
break;
case EbsStorageBuffer :
storage = EvqBuffer;
break;
#ifndef GLSLANG_WEB
case EbsPushConstant :
storage = EvqUniform;
layoutSet = TQualifier::layoutSetEnd;
layoutBinding = TQualifier::layoutBindingEnd;
break;
#endif
default:
break;
}
}
#ifdef GLSLANG_WEB
bool isPerView() const { return false; }
bool isTaskMemory() const { return false; }
@ -852,6 +895,7 @@ public:
return hasNonXfbLayout() ||
hasXfb();
}
TLayoutMatrix layoutMatrix : 3;
TLayoutPacking layoutPacking : 4;
int layoutOffset;