fixed SPIR-V interface variable declarations

Bug: skia:
Change-Id: Ibdc975d8be672f00e30aab055358d8fe0e47e0c2
Reviewed-on: https://skia-review.googlesource.com/157222
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
Ethan Nicholas 2018-09-26 17:01:24 -04:00 committed by Skia Commit-Bot
parent 42e086cd2d
commit d23c819c2f

View File

@ -3137,12 +3137,9 @@ void SPIRVCodeGenerator::writeInstructions(const Program& program, OutputStream&
SkASSERT(main); SkASSERT(main);
for (auto entry : fVariableMap) { for (auto entry : fVariableMap) {
const Variable* var = entry.first; const Variable* var = entry.first;
int builtin = var->fModifiers.fLayout.fBuiltin;
if (var->fStorage == Variable::kGlobal_Storage && if (var->fStorage == Variable::kGlobal_Storage &&
((var->fModifiers.fFlags & Modifiers::kIn_Flag) || ((var->fModifiers.fFlags & Modifiers::kIn_Flag) ||
(var->fModifiers.fFlags & Modifiers::kOut_Flag)) && (var->fModifiers.fFlags & Modifiers::kOut_Flag))) {
builtin != SK_OUT_BUILTIN &&
builtin != SK_INVOCATIONID_BUILTIN) {
interfaceVars.insert(entry.second); interfaceVars.insert(entry.second);
} }
} }