Make Function arguments type-safe.
Change-Id: I3d4262ea4be0c7b1128b2ca410e985cc6f58c9c9
Reviewed-on: https://swiftshader-review.googlesource.com/1970
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Shader/SetupRoutine.cpp b/src/Shader/SetupRoutine.cpp
index 08cdf59..1e2e897 100644
--- a/src/Shader/SetupRoutine.cpp
+++ b/src/Shader/SetupRoutine.cpp
@@ -36,10 +36,10 @@
{
Function<Bool(Pointer<Byte>, Pointer<Byte>, Pointer<Byte>, Pointer<Byte>)> function;
{
- Pointer<Byte> primitive(function.arg(0));
- Pointer<Byte> tri(function.arg(1));
- Pointer<Byte> polygon(function.arg(2));
- Pointer<Byte> data(function.arg(3));
+ Pointer<Byte> primitive(function.Arg<0>());
+ Pointer<Byte> tri(function.Arg<1>());
+ Pointer<Byte> polygon(function.Arg<2>());
+ Pointer<Byte> data(function.Arg<3>());
Pointer<Byte> constants = *Pointer<Pointer<Byte> >(data + OFFSET(DrawData,constants));