#include "texobj.h"
#include "glformats.h"
#include "texstorage.h"
+#include "util/u_memory.h"
/**
* Allocate and initialize a new memory object. But don't put it into the
return;
FLUSH_VERTICES(ctx, 0);
- FLUSH_CURRENT(ctx, 0);
- bufObjs = malloc(sizeof(struct gl_buffer_object **) * numBufferBarriers);
+ bufObjs = malloc(sizeof(struct gl_buffer_object *) * numBufferBarriers);
if (!bufObjs) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "%s(numBufferBarriers=%u)",
func, numBufferBarriers);
bufObjs[i] = _mesa_lookup_bufferobj(ctx, buffers[i]);
}
- texObjs = malloc(sizeof(struct gl_texture_object **) * numTextureBarriers);
+ texObjs = malloc(sizeof(struct gl_texture_object *) * numTextureBarriers);
if (!texObjs) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "%s(numTextureBarriers=%u)",
func, numTextureBarriers);
return;
FLUSH_VERTICES(ctx, 0);
- FLUSH_CURRENT(ctx, 0);
- bufObjs = malloc(sizeof(struct gl_buffer_object **) * numBufferBarriers);
+ bufObjs = malloc(sizeof(struct gl_buffer_object *) * numBufferBarriers);
if (!bufObjs) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "%s(numBufferBarriers=%u)",
func, numBufferBarriers);
bufObjs[i] = _mesa_lookup_bufferobj(ctx, buffers[i]);
}
- texObjs = malloc(sizeof(struct gl_texture_object **) * numTextureBarriers);
+ texObjs = malloc(sizeof(struct gl_texture_object *) * numTextureBarriers);
if (!texObjs) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "%s(numTextureBarriers=%u)",
func, numTextureBarriers);