Merge pull request #991 from LoopDawg/resource-set-binding-fix

HLSL: Fix crash with --resource-set-binding [n] (global form, not per-register form)
This commit is contained in:
John Kessenich 2017-07-22 01:59:42 +09:00 committed by GitHub
commit ab0086754e
7 changed files with 191 additions and 26 deletions

View file

@ -404,6 +404,11 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver
{
if (type.getQualifier().hasSet())
return type.getQualifier().layoutSet;
// If a command line or API option requested a single descriptor set, use that (if not overrided by spaceN)
if (baseResourceSetBinding.size() == 1)
return atoi(baseResourceSetBinding[0].c_str());
return 0;
}