#include "main/varray.h"
#include "main/uniforms.h"
#include "main/fbobject.h"
+#include "main/renderbuffer.h"
#include "main/texobj.h"
#include "main/api_validate.h"
set_fast_clear_op(brw, 0);
use_rectlist(brw, false);
- _mesa_DeleteRenderbuffers(1, &rb->Name);
+ _mesa_reference_renderbuffer(&rb, NULL);
_mesa_DeleteFramebuffers(1, &fbo);
_mesa_meta_end(ctx);
#include "main/blend.h"
#include "main/varray.h"
#include "main/shaderapi.h"
+#include "main/renderbuffer.h"
#include "util/ralloc.h"
#include "drivers/common/meta.h"
_mesa_meta_fb_tex_blit_end(ctx, target, &blit);
_mesa_meta_end(ctx);
- _mesa_DeleteRenderbuffers(1, &rb->Name);
+ _mesa_reference_renderbuffer(&rb, NULL);
_mesa_DeleteFramebuffers(1, &fbo);
}
brw_meta_stencil_blit(brw, dst, 0, 0, &dims);
brw_emit_mi_flush(brw);
- _mesa_DeleteRenderbuffers(1, &rb->Name);
+ _mesa_reference_renderbuffer(&rb, NULL);
_mesa_DeleteFramebuffers(1, &fbo);
}
#include "main/buffers.h"
#include "main/enums.h"
#include "main/fbobject.h"
+#include "main/renderbuffer.h"
#include "drivers/common/meta.h"
unsigned level, unsigned layer, bool flat)
{
struct gl_context *ctx = &brw->ctx;
- GLuint rbo;
- struct gl_renderbuffer *rb;
- struct intel_renderbuffer *irb;
-
- /* This turns the CreateRenderbuffers name into an actual struct
- * intel_renderbuffer.
- */
- _mesa_CreateRenderbuffers(1, &rbo);
-
- rb = _mesa_lookup_renderbuffer(ctx, rbo);
- irb = intel_renderbuffer(rb);
+ struct gl_renderbuffer *rb = ctx->Driver.NewRenderbuffer(ctx, 0xDEADBEEF);
+ struct intel_renderbuffer *irb = intel_renderbuffer(rb);
+ rb->RefCount = 1;
rb->Format = mt->format;
rb->_BaseFormat = _mesa_get_format_base_format(mt->format);
dst_mt->logical_width0, dst_mt->logical_height0,
blit_bit, GL_NEAREST);
- _mesa_DeleteRenderbuffers(1, &src_rb->Name);
- _mesa_DeleteRenderbuffers(1, &dst_rb->Name);
+ _mesa_reference_renderbuffer(&src_rb, NULL);
+ _mesa_reference_renderbuffer(&dst_rb, NULL);
_mesa_DeleteFramebuffers(2, fbos);
_mesa_meta_end(ctx);