Merge pull request #1623 from attilaz/to-static-fix

Fix for 'used samplers was converted to static'
This commit is contained in:
Бранимир Караџић 2019-01-17 13:23:37 -08:00 committed by GitHub
commit aa28916b87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -699,6 +699,13 @@ namespace bgfx { namespace spirv
{
bool found = false;
if (!bx::findIdentifierMatch(strLine.c_str(), "SamplerState").isEmpty())
{
found = true;
}
else
{
for (int32_t ii = 0, num = program->getNumLiveUniformVariables(); ii < num; ++ii)
{
// matching lines like: uniform u_name;
@ -712,6 +719,7 @@ namespace bgfx { namespace spirv
break;
}
}
}
if (!found)
{