diff options
author | Eric Anholt <[email protected]> | 2011-12-07 15:44:02 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-12-14 13:18:46 -0800 |
commit | 950310e7a363413bd87ce6e670a7b913fbddfbff (patch) | |
tree | 779b576c575e2c48952276d8c8efff221455ad6f /src | |
parent | a91c31668fce46545570571468fefca216fcf881 (diff) |
intel: Remove another renderbuffer allocation path.
Now there's the thing that CALLOCs and sets up window system vtable,
and the thing that CALLOCs and sets up user renderbuffer vtable. The
user renderbuffer vtable gets replaced later by
intel_renderbuffer_update_wrapper for wrapped renderbuffers (things
with name == ~0).
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 63a3d302727..b694129f486 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -619,20 +619,16 @@ intel_renderbuffer_wrap_miptree(struct intel_context *intel, GLenum internal_format) { - const GLuint name = ~0; /* not significant, but distinct for debugging */ struct gl_context *ctx = &intel->ctx; + struct gl_renderbuffer *rb; struct intel_renderbuffer *irb; intel_miptree_check_level_layer(mt, level, layer); - irb = CALLOC_STRUCT(intel_renderbuffer); - if (!irb) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glFramebufferTexture"); + rb = intel_new_renderbuffer(ctx, ~0); + irb = intel_renderbuffer(rb); + if (!irb) return NULL; - } - - _mesa_init_renderbuffer(&irb->Base, name); - irb->Base.ClassID = INTEL_RB_CLASS; if (!intel_renderbuffer_update_wrapper(intel, irb, mt, level, layer, |