Module: Mesa
Branch: master
Commit: 6f4ae810056a1f3c53efe6f0576b9b9c4e847a80
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6f4ae810056a1f3c53efe6f0576b9b9c4e847a80

Author: Nicolai Hähnle <[email protected]>
Date:   Sat Jan  9 17:53:07 2016 -0500

mesa: add Driver.InvalidateBufferSubData

Reviewed-by: Ian Romanick <[email protected]>

---

 src/mesa/main/bufferobj.c |   12 ++++--------
 src/mesa/main/dd.h        |    5 +++++
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index aa2498b..26f873b 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -3939,10 +3939,8 @@ _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr 
offset,
       return;
    }
 
-   /* We don't actually do anything for this yet.  Just return after
-    * validating the parameters and generating the required errors.
-    */
-   return;
+   if (ctx->Driver.InvalidateBufferSubData)
+      ctx->Driver.InvalidateBufferSubData(ctx, bufObj, offset, length);
 }
 
 void GLAPIENTRY
@@ -3979,8 +3977,6 @@ _mesa_InvalidateBufferData(GLuint buffer)
       return;
    }
 
-   /* We don't actually do anything for this yet.  Just return after
-    * validating the parameters and generating the required errors.
-    */
-   return;
+   if (ctx->Driver.InvalidateBufferSubData)
+      ctx->Driver.InvalidateBufferSubData(ctx, bufObj, 0, bufObj->Size);
 }
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index e5281ce..70ed563 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -634,6 +634,11 @@ struct dd_function_table {
                               GLintptr readOffset, GLintptr writeOffset,
                               GLsizeiptr size );
 
+   void (*InvalidateBufferSubData)( struct gl_context *ctx,
+                                    struct gl_buffer_object *obj,
+                                    GLintptr offset,
+                                    GLsizeiptr length );
+
    /* Returns pointer to the start of the mapped range.
     * May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
     */

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to