Refactor ANGLE Extensions Validation
Refactors ANGLE Extensions Validation functions into a common format for
future autogeneration. Any writes to output parameters that occurred
within the ANGLE entry point have been moved into the corresponding
validation function.
Bug:angleproject:2263
Change-Id: I7a678310ad481c1379596a493fcb0b0383fcf3b8
Reviewed-on: https://chromium-review.googlesource.com/985244
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES31.cpp b/src/libANGLE/validationES31.cpp
index beea039..12a1867 100644
--- a/src/libANGLE/validationES31.cpp
+++ b/src/libANGLE/validationES31.cpp
@@ -389,16 +389,19 @@
return false;
}
- if (!ValidateIndexedStateQuery(context, target, index, length))
+ GLsizei numParams = 0;
+
+ if (!ValidateIndexedStateQuery(context, target, index, &numParams))
{
return false;
}
- if (!ValidateRobustBufferSize(context, bufSize, *length))
+ if (!ValidateRobustBufferSize(context, bufSize, numParams))
{
return false;
}
+ SetRobustLengthParam(length, numParams);
return true;
}