Fix taking the index into account for write mask.
Change-Id: I25251e94680624c8c85698e96a053f518bb2c367
Reviewed-on: https://swiftshader-review.googlesource.com/13968
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/OpenGL/compiler/OutputASM.cpp b/src/OpenGL/compiler/OutputASM.cpp
index 0d45f81..8216887 100644
--- a/src/OpenGL/compiler/OutputASM.cpp
+++ b/src/OpenGL/compiler/OutputASM.cpp
@@ -2288,7 +2288,7 @@
{
parameter.type = registerType(arg);
parameter.index = registerIndex(arg) + index;
- parameter.mask = writeMask(arg);
+ parameter.mask = writeMask(arg, index);
}
void OutputASM::copy(TIntermTyped *dst, TIntermNode *src, int offset)
@@ -2296,7 +2296,6 @@
for(int index = 0; index < dst->totalRegisterCount(); index++)
{
Instruction *mov = emit(sw::Shader::OPCODE_MOV, dst, index, src, offset + index);
- mov->dst.mask = writeMask(dst, index);
}
}