aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/transformfeedback.h
diff options
context:
space:
mode:
authorFredrik Höglund <[email protected]>2013-11-15 19:53:29 +0100
committerFredrik Höglund <[email protected]>2014-05-02 03:00:41 +0200
commit835abfaba415bd8d24ee178f53ef1cad73a4e6ce (patch)
treeeb2dd5b60914faba3adbf63c78db099ee33ebf5e /src/mesa/main/transformfeedback.h
parentf65a0c19a50e283dcbfe9424f5c6d14e61eb4118 (diff)
mesa: Add _mesa_set_transform_feedback_binding()
Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/transformfeedback.h')
-rw-r--r--src/mesa/main/transformfeedback.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/main/transformfeedback.h b/src/mesa/main/transformfeedback.h
index 7aecd66a75a..87f4080e022 100644
--- a/src/mesa/main/transformfeedback.h
+++ b/src/mesa/main/transformfeedback.h
@@ -27,6 +27,7 @@
#define TRANSFORM_FEEDBACK_H
#include <stdbool.h>
+#include "bufferobj.h"
#include "compiler.h"
#include "glheader.h"
#include "mtypes.h"
@@ -127,4 +128,17 @@ extern bool
_mesa_transform_feedback_is_using_program(struct gl_context *ctx,
struct gl_shader_program *shProg);
+static inline void
+_mesa_set_transform_feedback_binding(struct gl_context *ctx,
+ struct gl_transform_feedback_object *tfObj, GLuint index,
+ struct gl_buffer_object *bufObj,
+ GLintptr offset, GLsizeiptr size)
+{
+ _mesa_reference_buffer_object(ctx, &tfObj->Buffers[index], bufObj);
+
+ tfObj->BufferNames[index] = bufObj->Name;
+ tfObj->Offset[index] = offset;
+ tfObj->RequestedSize[index] = size;
+}
+
#endif /* TRANSFORM_FEEDBACK_H */