Commit 9d82be8f by Jamie Madill

HLSL: Fix uniform packing for non-square matrices.

We were neglecting to transpose the types here, so were getting incorrect registers counts for rows and columns. BUG=angleproject:1072 TEST=dEQP-GLES3.functional.shaders.matrix.* Change-Id: Ia0ab89bbba8b9e2d8f39e84ef4e8ad3c03bb118d Reviewed-on: https://chromium-review.googlesource.com/286771Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 3828b9e7
...@@ -156,6 +156,7 @@ unsigned int HLSLVariableRegisterCount(const Varying &variable, bool transposeMa ...@@ -156,6 +156,7 @@ unsigned int HLSLVariableRegisterCount(const Varying &variable, bool transposeMa
unsigned int HLSLVariableRegisterCount(const Uniform &variable, ShShaderOutput outputType) unsigned int HLSLVariableRegisterCount(const Uniform &variable, ShShaderOutput outputType)
{ {
HLSLBlockEncoder encoder(HLSLBlockEncoder::GetStrategyFor(outputType)); HLSLBlockEncoder encoder(HLSLBlockEncoder::GetStrategyFor(outputType));
encoder.setTransposeMatrices(true);
HLSLVariableRegisterCount(variable, &encoder); HLSLVariableRegisterCount(variable, &encoder);
const size_t registerBytes = (encoder.BytesPerComponent * encoder.ComponentsPerRegister); const size_t registerBytes = (encoder.BytesPerComponent * encoder.ComponentsPerRegister);
......
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