Skip to content

Commit

Permalink
Warn if using GL_EXT_nontemporal_keyword with GLSL memory model
Browse files Browse the repository at this point in the history
  • Loading branch information
HildarTheDorf authored and jeremy-lunarg committed Feb 12, 2025
1 parent 2082702 commit 00ac565
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions glslang/MachineIndependent/Scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1108,8 +1108,11 @@ int TScanContext::tokenizeIdentifier()
reservedWord();
return keyword;
case NONTEMPORAL:
if (parseContext.symbolTable.atBuiltInLevel() ||
(parseContext.extensionTurnedOn(E_GL_EXT_nontemporal_keyword)))
if (parseContext.symbolTable.atBuiltInLevel())
return keyword;
if (!parseContext.intermediate.usingVulkanMemoryModel())
parseContext.warn(loc, "Nontemporal without the Vulkan Memory Model is ignored", tokenText, "");
if (parseContext.extensionTurnedOn(E_GL_EXT_nontemporal_keyword))
return keyword;
return identifierOrType();
case PATCH:
Expand Down

0 comments on commit 00ac565

Please sign in to comment.