On 08/23/2012 12:36 AM, Kenneth Graunke wrote:
On 08/22/2012 07:26 PM, Ian Romanick wrote:
From: Ian Romanick<ian.d.roman...@intel.com>
This consolidates the tests and makes the emitted error message
consistent.
Signed-off-by: Ian Romanick<ian.d.roman...@intel.com>
---
src/mesa/main/api_validate.c | 46 +++++++++++++++++++++---------------------
1 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index eaf614b..e8c8333 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -262,6 +262,25 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode,
const char *name)
return GL_TRUE;
}
+/**
+ * Verify that the element type is valid.
+ *
+ * Generates \c GL_INVALID_ENUM and returns \c false if it is not.
+ */
+static bool
+_mesa_valid_element_type(struct gl_context *ctx, GLenum type, const char *name)
+{
Could we call this _mesa_valid_draw_elements_type()? When I first saw
this, I was thinking more broadly..."elements of what?", "only unsigned
elements are allowed?", and so on.
And FWIW, I usually don't put the _mesa_ prefix on static functions.
A function w/out _mesa_ tells me the function is defined earlier in
this file and not somewhere else.
-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev