Fix non-square matrix-to-matrix constructors.

This fixes some broken tests in dEQP:
functional.shaders.conversions.matrix_to_matrix

BUG=angle:712

Change-Id: I0538595f2913a2c1d4f0da901d65d608a6580d19
Reviewed-on: https://chromium-review.googlesource.com/210882
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Nicolas Capens <[email protected]>
This commit is contained in:
Jamie Madill committed 2014-08-04 15:37:27 +00:00
1 parent cf3af0bdbc
commit f4e39bfdcb
1 file changed
+3 -3
+3 -3
View File
@@ -306,13 +306,13 @@ void StructureHLSL::addConstructor(const TType &type, const TString &name, const
}
else if (parameter.isMatrix())
{
for (int row = 0; row < rows; row++)
for (int col = 0; col < cols; col++)
{
for (int col = 0; col < cols; col++)
for (int row = 0; row < rows; row++)
{
if (row < parameter.getRows() && col < parameter.getCols())
{
constructor += TString("x0") + "[" + str(row) + "][" + str(col) + "]";
constructor += TString("x0") + "[" + str(col) + "][" + str(row) + "]";
}
else
{