<div dir="ltr"><div>Looks good to me.<br><br></div>Reviewed-by: Laura Ekstrand <<a href="mailto:laura@jlekstrand.net">laura@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 16, 2015 at 6:13 AM, Martin Peres <span dir="ltr"><<a href="mailto:martin.peres@linux.intel.com" target="_blank">martin.peres@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">v2: Review from Laura Ekstrand<br>
- use the transform feedback object lookup wrapper<br>
<br>
Signed-off-by: Martin Peres <<a href="mailto:martin.peres@linux.intel.com">martin.peres@linux.intel.com</a>><br>
---<br>
src/mapi/glapi/gen/ARB_direct_state_access.xml | 6 ++++++<br>
src/mesa/main/tests/dispatch_sanity.cpp | 1 +<br>
src/mesa/main/transformfeedback.c | 25 +++++++++++++++++++++++++<br>
src/mesa/main/transformfeedback.h | 3 +++<br>
4 files changed, 35 insertions(+)<br>
<br>
diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml<br>
index b3c090f..1ac4386 100644<br>
--- a/src/mapi/glapi/gen/ARB_direct_state_access.xml<br>
+++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml<br>
@@ -28,6 +28,12 @@<br>
<param name="size" type="GLsizeiptr" /><br>
</function><br>
<br>
+ <function name="GetTransformFeedbackiv" offset="assign"><br>
+ <param name="xfb" type="GLuint" /><br>
+ <param name="pname" type="GLenum" /><br>
+ <param name="param" type="GLint *" /><br>
+ </function><br>
+<br>
<!-- Texture object functions --><br>
<br>
<function name="CreateTextures" offset="assign"><br>
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp<br>
index 87f7d6f..ba36d28 100644<br>
--- a/src/mesa/main/tests/dispatch_sanity.cpp<br>
+++ b/src/mesa/main/tests/dispatch_sanity.cpp<br>
@@ -958,6 +958,7 @@ const struct function gl_core_functions_possible[] = {<br>
{ "glCreateTransformFeedbacks", 45, -1 },<br>
{ "glTransformFeedbackBufferBase", 45, -1 },<br>
{ "glTransformFeedbackBufferRange", 45, -1 },<br>
+ { "glGetTransformFeedbackiv", 45, -1 },<br>
{ "glCreateTextures", 45, -1 },<br>
{ "glTextureStorage1D", 45, -1 },<br>
{ "glTextureStorage2D", 45, -1 },<br>
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c<br>
index 2dded21..9c9cba2 100644<br>
--- a/src/mesa/main/transformfeedback.c<br>
+++ b/src/mesa/main/transformfeedback.c<br>
@@ -1203,3 +1203,28 @@ _mesa_ResumeTransformFeedback(void)<br>
assert(ctx->Driver.ResumeTransformFeedback);<br>
ctx->Driver.ResumeTransformFeedback(ctx, obj);<br>
}<br>
+<br>
+extern void GLAPIENTRY<br>
+_mesa_GetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param)<br>
+{<br>
+ struct gl_transform_feedback_object *obj;<br>
+ GET_CURRENT_CONTEXT(ctx);<br>
+<br>
+ obj = lookup_transform_feedback_object_err(ctx, xfb,<br>
+ "glGetTransformFeedbackiv");<br>
+ if(!obj) {<br>
+ return;<br>
+ }<br>
+<br>
+ switch(pname) {<br>
+ case GL_TRANSFORM_FEEDBACK_PAUSED:<br>
+ *param = obj->Paused;<br>
+ break;<br>
+ case GL_TRANSFORM_FEEDBACK_ACTIVE:<br>
+ *param = obj->Active;<br>
+ break;<br>
+ default:<br>
+ _mesa_error(ctx, GL_INVALID_ENUM,<br>
+ "glGetTransformFeedbackiv(pname=%i)", pname);<br>
+ }<br>
+}<br>
diff --git a/src/mesa/main/transformfeedback.h b/src/mesa/main/transformfeedback.h<br>
index 6cad766..ba00636 100644<br>
--- a/src/mesa/main/transformfeedback.h<br>
+++ b/src/mesa/main/transformfeedback.h<br>
@@ -155,4 +155,7 @@ extern void GLAPIENTRY<br>
_mesa_TransformFeedbackBufferRange(GLuint xfb, GLuint index, GLuint buffer,<br>
GLintptr offset, GLsizeiptr size);<br>
<br>
+extern void GLAPIENTRY<br>
+_mesa_GetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param);<br>
+<br>
#endif /* TRANSFORM_FEEDBACK_H */<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.3.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>