Commit 049ff387 by Chris Forbes

Split Object::Kind::Variable

We have two kinds of "variable" -- those that are directly backed by an lvalue, and those that are subsets of an indexed location, etc space. Split them so we don't have to rediscover it later at emit time. Bug: b/120799499 Change-Id: I7403f76d615d7afa1ee50c014172f07b90262c40 Reviewed-on: https://swiftshader-review.googlesource.com/c/24374Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 61234552
......@@ -195,7 +195,7 @@ namespace sw
}
}
void SpirvShader::ProcessInterfaceVariable(Object const &object)
void SpirvShader::ProcessInterfaceVariable(Object &object)
{
assert(object.storageClass == spv::StorageClassInput || object.storageClass == spv::StorageClassOutput);
......@@ -236,6 +236,7 @@ namespace sw
}
else
{
object.kind = Object::Kind::InterfaceVariable;
PopulateInterface(&userDefinedInterface, resultId);
}
}
......
......@@ -111,6 +111,7 @@ namespace sw
Unknown, /* for paranoia -- if we get left with an object in this state, the module was broken */
Type,
Variable,
InterfaceVariable,
Constant,
Value,
} kind = Kind::Unknown;
......@@ -247,7 +248,7 @@ namespace sw
uint32_t GetConstantInt(uint32_t id);
void ProcessInterfaceVariable(Object const &object);
void ProcessInterfaceVariable(Object &object);
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment