mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
mesa: Add _mesa_set_transform_feedback_binding()
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
f65a0c19a5
commit
835abfaba4
2 changed files with 15 additions and 9 deletions
|
|
@ -32,7 +32,6 @@
|
||||||
|
|
||||||
|
|
||||||
#include "buffers.h"
|
#include "buffers.h"
|
||||||
#include "bufferobj.h"
|
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
|
@ -533,14 +532,7 @@ bind_buffer_range(struct gl_context *ctx, GLuint index,
|
||||||
bufObj);
|
bufObj);
|
||||||
|
|
||||||
/* The per-attribute binding point */
|
/* The per-attribute binding point */
|
||||||
_mesa_reference_buffer_object(ctx,
|
_mesa_set_transform_feedback_binding(ctx, obj, index, bufObj, offset, size);
|
||||||
&obj->Buffers[index],
|
|
||||||
bufObj);
|
|
||||||
|
|
||||||
obj->BufferNames[index] = bufObj->Name;
|
|
||||||
|
|
||||||
obj->Offset[index] = offset;
|
|
||||||
obj->RequestedSize[index] = size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#define TRANSFORM_FEEDBACK_H
|
#define TRANSFORM_FEEDBACK_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include "bufferobj.h"
|
||||||
#include "compiler.h"
|
#include "compiler.h"
|
||||||
#include "glheader.h"
|
#include "glheader.h"
|
||||||
#include "mtypes.h"
|
#include "mtypes.h"
|
||||||
|
|
@ -127,4 +128,17 @@ extern bool
|
||||||
_mesa_transform_feedback_is_using_program(struct gl_context *ctx,
|
_mesa_transform_feedback_is_using_program(struct gl_context *ctx,
|
||||||
struct gl_shader_program *shProg);
|
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 */
|
#endif /* TRANSFORM_FEEDBACK_H */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue