Initialize all shader variables

TRAC #11869 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@155 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 76039476
......@@ -988,8 +988,8 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
if (symbol)
{
symbol->traverse(this);
out << arrayString(symbol->getType());
out << " = " + initializer(variable->getType());
}
else
{
......@@ -1809,11 +1809,11 @@ TString OutputHLSL::initializer(const TType &type)
{
string += typeString(type) + "(";
for (int component = 0; component < type.getNominalSize(); component++)
for (int component = 0; component < type.getInstanceSize(); component++)
{
string += "0";
if (component < type.getNominalSize() - 1)
if (component < type.getInstanceSize() - 1)
{
string += ", ";
}
......
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