Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GL_EXT_spirv_intrinsics: Fix a typo in function naming #3389

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions SPIRV/GlslangToSpv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4946,7 +4946,7 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
//
// Add SPIR-V decorations for members (GL_EXT_spirv_intrinsics)
//
if (glslangMember.getQualifier().hasSprivDecorate()) {
if (glslangMember.getQualifier().hasSpirvDecorate()) {
const glslang::TSpirvDecorate& spirvDecorate = glslangMember.getQualifier().getSpirvDecorate();

// Add spirv_decorate
Expand Down Expand Up @@ -9599,9 +9599,9 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
}

//
// Add SPIR-V decorations for structure (GL_EXT_spirv_intrinsics)
// Add SPIR-V decorations (GL_EXT_spirv_intrinsics)
//
if (symbol->getType().getQualifier().hasSprivDecorate()) {
if (symbol->getType().getQualifier().hasSpirvDecorate()) {
const glslang::TSpirvDecorate& spirvDecorate = symbol->getType().getQualifier().getSpirvDecorate();

// Add spirv_decorate
Expand Down
4 changes: 2 additions & 2 deletions glslang/Include/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ class TQualifier {
}

// GL_EXT_spirv_intrinsics
bool hasSprivDecorate() const { return spirvDecorate != nullptr; }
bool hasSpirvDecorate() const { return spirvDecorate != nullptr; }
void setSpirvDecorate(int decoration, const TIntermAggregate* args = nullptr);
void setSpirvDecorateId(int decoration, const TIntermAggregate* args);
void setSpirvDecorateString(int decoration, const TIntermAggregate* args);
Expand Down Expand Up @@ -2096,7 +2096,7 @@ class TType {
const auto appendInt = [&](int i) { typeString.append(std::to_string(i).c_str()); };

if (getQualifiers) {
if (qualifier.hasSprivDecorate())
if (qualifier.hasSpirvDecorate())
appendStr(qualifier.getSpirvDecorateQualifierString().c_str());

if (qualifier.hasLayout()) {
Expand Down
9 changes: 4 additions & 5 deletions glslang/MachineIndependent/ParseHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4191,8 +4191,8 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
dst.spirvStorageClass = src.spirvStorageClass;

// SPIR-V decorate qualifiers (GL_EXT_spirv_intrinsics)
if (src.hasSprivDecorate()) {
if (dst.hasSprivDecorate()) {
if (src.hasSpirvDecorate()) {
if (dst.hasSpirvDecorate()) {
const TSpirvDecorate& srcSpirvDecorate = src.getSpirvDecorate();
TSpirvDecorate& dstSpirvDecorate = dst.getSpirvDecorate();
for (auto& decorate : srcSpirvDecorate.decorates) {
Expand Down Expand Up @@ -6326,8 +6326,7 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb
switch (qualifier.storage) {
case EvqVaryingIn:
case EvqVaryingOut:
if (!type.getQualifier().isTaskMemory() &&
!type.getQualifier().hasSprivDecorate() &&
if (!type.getQualifier().isTaskMemory() && !type.getQualifier().hasSpirvDecorate() &&
(type.getBasicType() != EbtBlock ||
(!(*type.getStruct())[0].type->getQualifier().hasLocation() &&
(*type.getStruct())[0].type->getQualifier().builtIn == EbvNone)))
Expand Down Expand Up @@ -8540,7 +8539,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
memberQualifier.storage = EvqtaskPayloadSharedEXT;
if (memberQualifier.storage == EvqSpirvStorageClass)
error(memberLoc, "member cannot have a spirv_storage_class qualifier", memberType.getFieldName().c_str(), "");
if (memberQualifier.hasSprivDecorate() && !memberQualifier.getSpirvDecorate().decorateIds.empty())
if (memberQualifier.hasSpirvDecorate() && !memberQualifier.getSpirvDecorate().decorateIds.empty())
error(memberLoc, "member cannot have a spirv_decorate_id qualifier", memberType.getFieldName().c_str(), "");
if ((currentBlockQualifier.storage == EvqUniform || currentBlockQualifier.storage == EvqBuffer) && (memberQualifier.isInterpolation() || memberQualifier.isAuxiliary()))
error(memberLoc, "member of uniform or buffer block cannot have an auxiliary or interpolation qualifier", memberType.getFieldName().c_str(), "");
Expand Down
4 changes: 2 additions & 2 deletions glslang/MachineIndependent/iomapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ int TDefaultIoResolverBase::resolveInOutLocation(EShLanguage stage, TVarEntryInf
}

// no locations added if already present, a built-in variable, or a variable with SPIR-V decorate
if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getQualifier().hasSprivDecorate()) {
if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getQualifier().hasSpirvDecorate()) {
return ent.newLocation = -1;
}

Expand Down Expand Up @@ -953,7 +953,7 @@ int TDefaultGlslIoResolver::resolveInOutLocation(EShLanguage stage, TVarEntryInf
return ent.newLocation = type.getQualifier().layoutLocation;
}
// no locations added if already present, a built-in variable, or a variable with SPIR-V decorate
if (type.isBuiltIn() || type.getQualifier().hasSprivDecorate()) {
if (type.isBuiltIn() || type.getQualifier().hasSpirvDecorate()) {
return ent.newLocation = -1;
}
// no locations on blocks of built-in variables
Expand Down