[Mesa-dev] [PATCH 08/16] main: Added entry point for glGetTransformFeedbacki_v

Laura Ekstrand laura at jlekstrand.net
Thu Mar 19 13:40:46 PDT 2015


Oops, apparently I sent it to just you.


Reviewed-by: Laura Ekstrand <laura at jlekstrand.net>

On Thu, Mar 19, 2015 at 11:15 AM, Martin Peres <martin.peres at linux.intel.com
> wrote:

> Laura, can I get your R-b on this one?
>
>
> On 16/02/15 16:13, Martin Peres wrote:
>
>> v2: Review from Laura Ekstrand
>> - use the transform feedback object lookup wrapper
>>
>> v3:
>> - use the new name of _mesa_lookup_transform_feedback_object_err
>>
>> Signed-off-by: Martin Peres <martin.peres at linux.intel.com>
>> ---
>>   src/mapi/glapi/gen/ARB_direct_state_access.xml |  7 +++++++
>>   src/mesa/main/tests/dispatch_sanity.cpp        |  1 +
>>   src/mesa/main/transformfeedback.c              | 29
>> ++++++++++++++++++++++++++
>>   src/mesa/main/transformfeedback.h              |  4 ++++
>>   4 files changed, 41 insertions(+)
>>
>> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> index 1ac4386..935e088 100644
>> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> @@ -34,6 +34,13 @@
>>         <param name="param" type="GLint *" />
>>      </function>
>>   +   <function name="GetTransformFeedbacki_v" offset="assign">
>> +      <param name="xfb" type="GLuint" />
>> +      <param name="pname" type="GLenum" />
>> +      <param name="index" type="GLuint" />
>> +      <param name="param" type="GLint *" />
>> +   </function>
>> +
>>      <!-- Texture object functions -->
>>        <function name="CreateTextures" offset="assign">
>> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp
>> b/src/mesa/main/tests/dispatch_sanity.cpp
>> index ba36d28..d5535e9 100644
>> --- a/src/mesa/main/tests/dispatch_sanity.cpp
>> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
>> @@ -959,6 +959,7 @@ const struct function gl_core_functions_possible[] = {
>>      { "glTransformFeedbackBufferBase", 45, -1 },
>>      { "glTransformFeedbackBufferRange", 45, -1 },
>>      { "glGetTransformFeedbackiv", 45, -1 },
>> +   { "glGetTransformFeedbacki_v", 45, -1 },
>>      { "glCreateTextures", 45, -1 },
>>      { "glTextureStorage1D", 45, -1 },
>>      { "glTextureStorage2D", 45, -1 },
>> diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/
>> transformfeedback.c
>> index 9c9cba2..ce9a6d4 100644
>> --- a/src/mesa/main/transformfeedback.c
>> +++ b/src/mesa/main/transformfeedback.c
>> @@ -1228,3 +1228,32 @@ _mesa_GetTransformFeedbackiv(GLuint xfb, GLenum
>> pname, GLint *param)
>>                      "glGetTransformFeedbackiv(pname=%i)", pname);
>>       }
>>   }
>> +
>> +extern void GLAPIENTRY
>> +_mesa_GetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index,
>> +                              GLint *param)
>> +{
>> +   struct gl_transform_feedback_object *obj;
>> +   GET_CURRENT_CONTEXT(ctx);
>> +
>> +   obj = lookup_transform_feedback_object_err(ctx, xfb,
>> +
>> "glGetTransformFeedbacki_v");
>> +   if(!obj) {
>> +      return;
>> +   }
>> +
>> +   if (index >= ctx->Const.MaxTransformFeedbackBuffers) {
>> +      _mesa_error(ctx, GL_INVALID_VALUE,
>> +                  "glGetTransformFeedbacki_v(index=%i)", index);
>> +      return;
>> +   }
>> +
>> +   switch(pname) {
>> +   case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING:
>> +      *param = obj->BufferNames[index];
>> +      break;
>> +   default:
>> +      _mesa_error(ctx, GL_INVALID_ENUM,
>> +                  "glGetTransformFeedbacki_v(pname=%i)", pname);
>> +   }
>> +}
>> diff --git a/src/mesa/main/transformfeedback.h b/src/mesa/main/
>> transformfeedback.h
>> index ba00636..9936c68 100644
>> --- a/src/mesa/main/transformfeedback.h
>> +++ b/src/mesa/main/transformfeedback.h
>> @@ -158,4 +158,8 @@ _mesa_TransformFeedbackBufferRange(GLuint xfb,
>> GLuint index, GLuint buffer,
>>   extern void GLAPIENTRY
>>   _mesa_GetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param);
>>   +extern void GLAPIENTRY
>> +_mesa_GetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index,
>> +                              GLint *param);
>> +
>>   #endif /* TRANSFORM_FEEDBACK_H */
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150319/9f323cec/attachment-0001.html>


More information about the mesa-dev mailing list