1/*
2* Copyright 2016 Google Inc.
3*
4* Use of this source code is governed by a BSD-style license that can be
5* found in the LICENSE file.
6*/
7
8#include "GrVkVaryingHandler.h"
9
10
11void finalize_helper(GrVkVaryingHandler::VarArray& vars) {
12    for (int i = 0; i < vars.count(); ++i) {
13        SkString location;
14        location.appendf("location = %d", i);
15        vars[i].setLayoutQualifier(location.c_str());
16    }
17}
18
19void GrVkVaryingHandler::onFinalize() {
20    finalize_helper(fVertexInputs);
21    finalize_helper(fVertexOutputs);
22    finalize_helper(fGeomInputs);
23    finalize_helper(fGeomOutputs);
24    finalize_helper(fFragInputs);
25    finalize_helper(fFragOutputs);
26}