<div dir="ltr"><div>Oops, apparently I sent it to just you.<br><br><br></div>Reviewed-by: Laura Ekstrand <<a href="mailto:laura@jlekstrand.net" target="_blank">laura@jlekstrand.net</a>></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 19, 2015 at 11:15 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">Laura, can I get your R-b on this one?<div class="HOEnZb"><div class="h5"><br>
<br>
On 16/02/15 16:13, Martin Peres 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>
v3:<br>
- use the new name of _mesa_lookup_transform_<u></u>feedback_object_err<br>
<br>
Signed-off-by: Martin Peres <<a href="mailto:martin.peres@linux.intel.com" target="_blank">martin.peres@linux.intel.com</a>><br>
---<br>
src/mapi/glapi/gen/ARB_direct_<u></u>state_access.xml | 7 +++++++<br>
src/mesa/main/tests/dispatch_<u></u>sanity.cpp | 1 +<br>
src/mesa/main/<u></u>transformfeedback.c | 29 ++++++++++++++++++++++++++<br>
src/mesa/main/<u></u>transformfeedback.h | 4 ++++<br>
4 files changed, 41 insertions(+)<br>
<br>
diff --git a/src/mapi/glapi/gen/ARB_<u></u>direct_state_access.xml b/src/mapi/glapi/gen/ARB_<u></u>direct_state_access.xml<br>
index 1ac4386..935e088 100644<br>
--- a/src/mapi/glapi/gen/ARB_<u></u>direct_state_access.xml<br>
+++ b/src/mapi/glapi/gen/ARB_<u></u>direct_state_access.xml<br>
@@ -34,6 +34,13 @@<br>
<param name="param" type="GLint *" /><br>
</function><br>
+ <function name="GetTransformFeedbacki_v" offset="assign"><br>
+ <param name="xfb" type="GLuint" /><br>
+ <param name="pname" type="GLenum" /><br>
+ <param name="index" type="GLuint" /><br>
+ <param name="param" type="GLint *" /><br>
+ </function><br>
+<br>
<!-- Texture object functions --><br>
<function name="CreateTextures" offset="assign"><br>
diff --git a/src/mesa/main/tests/<u></u>dispatch_sanity.cpp b/src/mesa/main/tests/<u></u>dispatch_sanity.cpp<br>
index ba36d28..d5535e9 100644<br>
--- a/src/mesa/main/tests/<u></u>dispatch_sanity.cpp<br>
+++ b/src/mesa/main/tests/<u></u>dispatch_sanity.cpp<br>
@@ -959,6 +959,7 @@ const struct function gl_core_functions_possible[] = {<br>
{ "<u></u>glTransformFeedbackBufferBase"<u></u>, 45, -1 },<br>
{ "<u></u>glTransformFeedbackBufferRange<u></u>", 45, -1 },<br>
{ "glGetTransformFeedbackiv", 45, -1 },<br>
+ { "glGetTransformFeedbacki_v", 45, -1 },<br>
{ "glCreateTextures", 45, -1 },<br>
{ "glTextureStorage1D", 45, -1 },<br>
{ "glTextureStorage2D", 45, -1 },<br>
diff --git a/src/mesa/main/<u></u>transformfeedback.c b/src/mesa/main/<u></u>transformfeedback.c<br>
index 9c9cba2..ce9a6d4 100644<br>
--- a/src/mesa/main/<u></u>transformfeedback.c<br>
+++ b/src/mesa/main/<u></u>transformfeedback.c<br>
@@ -1228,3 +1228,32 @@ _mesa_GetTransformFeedbackiv(<u></u>GLuint xfb, GLenum pname, GLint *param)<br>
"glGetTransformFeedbackiv(<u></u>pname=%i)", pname);<br>
}<br>
}<br>
+<br>
+extern void GLAPIENTRY<br>
+_mesa_GetTransformFeedbacki_<u></u>v(GLuint xfb, GLenum pname, GLuint index,<br>
+ GLint *param)<br>
+{<br>
+ struct gl_transform_feedback_object *obj;<br>
+ GET_CURRENT_CONTEXT(ctx);<br>
+<br>
+ obj = lookup_transform_feedback_<u></u>object_err(ctx, xfb,<br>
+ "glGetTransformFeedbacki_v");<br>
+ if(!obj) {<br>
+ return;<br>
+ }<br>
+<br>
+ if (index >= ctx->Const.<u></u>MaxTransformFeedbackBuffers) {<br>
+ _mesa_error(ctx, GL_INVALID_VALUE,<br>
+ "glGetTransformFeedbacki_v(<u></u>index=%i)", index);<br>
+ return;<br>
+ }<br>
+<br>
+ switch(pname) {<br>
+ case GL_TRANSFORM_FEEDBACK_BUFFER_<u></u>BINDING:<br>
+ *param = obj->BufferNames[index];<br>
+ break;<br>
+ default:<br>
+ _mesa_error(ctx, GL_INVALID_ENUM,<br>
+ "glGetTransformFeedbacki_v(<u></u>pname=%i)", pname);<br>
+ }<br>
+}<br>
diff --git a/src/mesa/main/<u></u>transformfeedback.h b/src/mesa/main/<u></u>transformfeedback.h<br>
index ba00636..9936c68 100644<br>
--- a/src/mesa/main/<u></u>transformfeedback.h<br>
+++ b/src/mesa/main/<u></u>transformfeedback.h<br>
@@ -158,4 +158,8 @@ _mesa_<u></u>TransformFeedbackBufferRange(<u></u>GLuint xfb, GLuint index, GLuint buffer,<br>
extern void GLAPIENTRY<br>
_mesa_GetTransformFeedbackiv(<u></u>GLuint xfb, GLenum pname, GLint *param);<br>
+extern void GLAPIENTRY<br>
+_mesa_GetTransformFeedbacki_<u></u>v(GLuint xfb, GLenum pname, GLuint index,<br>
+ GLint *param);<br>
+<br>
#endif /* TRANSFORM_FEEDBACK_H */<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>