mesa/xfb: report calculated size for XFB buffer objects.
authorDave Airlie <airlied@redhat.com>
Sun, 29 May 2016 20:56:52 +0000 (06:56 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 30 May 2016 11:18:54 +0000 (21:18 +1000)
This fixes:
GL45-CTS.direct_state_access.xfb_buffers

This test looks correct to me, we should work out the
size value and report it rather than using only the size
from the Range interface.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/main/transformfeedback.c

index 9c06bc84009f7705e19ad396e305a7139698ab75..7c0ff6fc8965fd04170790e388328d0e693abef5 100644 (file)
@@ -1291,12 +1291,13 @@ _mesa_GetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index,
       return;
    }
 
+   compute_transform_feedback_buffer_sizes(obj);
    switch(pname) {
    case GL_TRANSFORM_FEEDBACK_BUFFER_START:
       *param = obj->Offset[index];
       break;
    case GL_TRANSFORM_FEEDBACK_BUFFER_SIZE:
-      *param = obj->RequestedSize[index];
+      *param = obj->Size[index];
       break;
    default:
       _mesa_error(ctx, GL_INVALID_ENUM,