#include "main/imports.h"
#include "main/image.h"
+#include "main/bufferobj.h"
#include "main/macros.h"
#include "main/mfeatures.h"
#include "program/prog_uniform.h"
assert(element_size == array->Size * _mesa_sizeof_type(array->Type));
if (attr == 0) {
- if (bufobj && bufobj->Name) {
+ if (bufobj && _mesa_is_bufferobj(bufobj)) {
vbuffer->buffer = NULL;
pipe_resource_reference(&vbuffer->buffer, stobj->buffer);
vbuffer->buffer_offset = pointer_to_offset(low_addr);
assert(element_size == array->Size * _mesa_sizeof_type(array->Type));
- if (bufobj && bufobj->Name) {
+ if (bufobj && _mesa_is_bufferobj(bufobj)) {
/* Attribute data is in a VBO.
* Recall that for VBOs, the gl_client_array->Ptr field is
* really an offset from the start of the VBO, not a pointer.
}
/* get/create the index buffer object */
- if (bufobj && bufobj->Name) {
+ if (bufobj && _mesa_is_bufferobj(bufobj)) {
/* elements/indexes are in a real VBO */
struct st_buffer_object *stobj = st_buffer_object(bufobj);
pipe_resource_reference(&ibuffer->buffer, stobj->buffer);