Commit 6195ef87 by Jamie Madill

Fix transform feedback type.

We were using the wrong enum for the varying type, as well as using the row count of the type. We should be using the column count, but for matrices we treat them as transposed. BUG=angle:679 Change-Id: I0eb7f68f629a4372c6822f65b2de51ecc88a03ed Reviewed-on: https://chromium-review.googlesource.com/204520Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent afa40f7d
......@@ -2632,6 +2632,8 @@ ShaderExecutable *Renderer11::loadExecutable(const void *function, size_t length
for (size_t i = 0; i < transformFeedbackVaryings.size(); i++)
{
const gl::LinkedVarying &varying = transformFeedbackVaryings[i];
GLenum transposedType = gl::TransposeMatrixType(varying.type);
for (size_t j = 0; j < varying.semanticIndexCount; j++)
{
D3D11_SO_DECLARATION_ENTRY entry = { 0 };
......@@ -2639,7 +2641,7 @@ ShaderExecutable *Renderer11::loadExecutable(const void *function, size_t length
entry.SemanticName = varying.semanticName.c_str();
entry.SemanticIndex = varying.semanticIndex + j;
entry.StartComponent = 0;
entry.ComponentCount = gl::VariableRowCount(type);
entry.ComponentCount = gl::VariableColumnCount(transposedType);
entry.OutputSlot = (separatedOutputBuffers ? i : 0);
soDeclaration.push_back(entry);
}
......
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