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
This commit is contained in:
daniel@transgaming.com 2010-04-15 20:45:22 +00:00
Родитель 7603947656
Коммит 7127f2076d
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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 += ", ";
}