Skip to content

Commit

Permalink
newShader validates overlapping vertex input locations.
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Sep 7, 2024
1 parent cbadb06 commit c7b4ebb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/graphics/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ bool Shader::validateInternal(StrongRef<ShaderStage> stages[], std::string &err,
program.addShader(stages[i]->getGLSLangValidationShader());
}

if (!program.link(EshMsgCrossStageIO))
if (!program.link((EShMessages)(EshMsgCrossStageIO | EshMsgOverlappingLocations)))
{
err = "Cannot compile shader:\n\n" + std::string(program.getInfoLog()) + "\n" + std::string(program.getInfoDebugLog());
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/graphics/ShaderStage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ShaderStage::ShaderStage(Graphics */*gfx*/, ShaderStageType stage, const std::st
bool forcedefault = false;
bool forwardcompat = true;

if (!glslangShader->parse(GetResources(), defaultversion, defaultprofile, forcedefault, forwardcompat, EShMsgSuppressWarnings))
if (!glslangShader->parse(GetResources(), defaultversion, defaultprofile, forcedefault, forwardcompat, (EShMessages)(EShMsgSuppressWarnings | EshMsgOverlappingLocations)))
{
const char *stagename = "unknown";
getConstant(stage, stagename);
Expand Down

0 comments on commit c7b4ebb

Please sign in to comment.