Commit f4e39bfd by Jamie Madill

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/210882Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarNicolas Capens <capn@chromium.org>
parent cf3af0bd
...@@ -306,13 +306,13 @@ void StructureHLSL::addConstructor(const TType &type, const TString &name, const ...@@ -306,13 +306,13 @@ void StructureHLSL::addConstructor(const TType &type, const TString &name, const
} }
else if (parameter.isMatrix()) 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()) if (row < parameter.getRows() && col < parameter.getCols())
{ {
constructor += TString("x0") + "[" + str(row) + "][" + str(col) + "]"; constructor += TString("x0") + "[" + str(col) + "][" + str(row) + "]";
} }
else else
{ {
......
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