Commit 32980acb by Nicolas Capens

Fix indexing with instance ID.

BUG=swiftshader:3 Change-Id: I070059f3b4e9e431c7667b98017912b72d9d66a4 Reviewed-on: https://swiftshader-review.googlesource.com/6952Tested-by: 's avatarNicolas Capens <capn@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 24c8cf09
......@@ -856,11 +856,12 @@ namespace sw
switch(src.rel.type)
{
case Shader::PARAMETER_ADDR: a = a0[component]; break;
case Shader::PARAMETER_TEMP: a = r[src.rel.index][component]; break;
case Shader::PARAMETER_INPUT: a = v[src.rel.index][component]; break;
case Shader::PARAMETER_OUTPUT: a = o[src.rel.index][component]; break;
case Shader::PARAMETER_CONST: a = *Pointer<Float>(uniformAddress(src.bufferIndex, src.rel.index) + component * sizeof(float)); break;
case Shader::PARAMETER_ADDR: a = a0[component]; break;
case Shader::PARAMETER_TEMP: a = r[src.rel.index][component]; break;
case Shader::PARAMETER_INPUT: a = v[src.rel.index][component]; break;
case Shader::PARAMETER_OUTPUT: a = o[src.rel.index][component]; break;
case Shader::PARAMETER_CONST: a = *Pointer<Float>(uniformAddress(src.bufferIndex, src.rel.index) + component * sizeof(float)); break;
case Shader::PARAMETER_MISCTYPE: a = As<Float4>(Int4(instanceID)); break;
default: ASSERT(false);
}
......
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