summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-01-19 17:32:55 -0800
committerEric Anholt <[email protected]>2012-01-27 11:46:09 -0800
commit74484c5d411788c855cf91a2017d763d6a8fb4f2 (patch)
tree948481f73d0e9d8e51070af8770e90acfe69f6eb /src
parenta4586d2e2e444d1212d4abfd1ea5bbeff4503feb (diff)
intel: Drop intel_wrap_miptree().
Most of this function was just calling intel_renderbuffer_update_wrapper(), which was called immediately afterwards in the only caller. NOTE: This is a candidate for the 8.0 branch.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c56
1 files changed, 3 insertions, 53 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 27b0bfcd4ed..f999246742d 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -457,14 +457,6 @@ intel_framebuffer_renderbuffer(struct gl_context * ctx,
intel_draw_buffer(ctx);
}
-static struct intel_renderbuffer*
-intel_renderbuffer_wrap_miptree(struct intel_context *intel,
- struct intel_mipmap_tree *mt,
- uint32_t level,
- uint32_t layer,
- gl_format format,
- GLenum internal_format);
-
/**
* \par Special case for separate stencil
*
@@ -516,45 +508,6 @@ intel_renderbuffer_update_wrapper(struct intel_context *intel,
return true;
}
-/**
- * \brief Wrap a renderbuffer around a single slice of a miptree.
- *
- * Called by glFramebufferTexture*(). This just allocates a
- * ``struct intel_renderbuffer`` then calls
- * intel_renderbuffer_update_wrapper() to do the real work.
- *
- * \see intel_renderbuffer_update_wrapper()
- */
-static struct intel_renderbuffer*
-intel_renderbuffer_wrap_miptree(struct intel_context *intel,
- struct intel_mipmap_tree *mt,
- uint32_t level,
- uint32_t layer,
- gl_format format,
- GLenum internal_format)
-
-{
- struct gl_context *ctx = &intel->ctx;
- struct gl_renderbuffer *rb;
- struct intel_renderbuffer *irb;
-
- intel_miptree_check_level_layer(mt, level, layer);
-
- rb = intel_new_renderbuffer(ctx, ~0);
- irb = intel_renderbuffer(rb);
- if (!irb)
- return NULL;
-
- if (!intel_renderbuffer_update_wrapper(intel, irb,
- mt, level, layer,
- format, internal_format)) {
- free(irb);
- return NULL;
- }
-
- return irb;
-}
-
void
intel_renderbuffer_set_draw_offset(struct intel_renderbuffer *irb)
{
@@ -660,12 +613,9 @@ intel_render_texture(struct gl_context * ctx,
return;
}
else if (!irb) {
- irb = intel_renderbuffer_wrap_miptree(intel,
- mt,
- att->TextureLevel,
- layer,
- image->TexFormat,
- image->InternalFormat);
+ intel_miptree_check_level_layer(mt, att->TextureLevel, layer);
+
+ irb = (struct intel_renderbuffer *)intel_new_renderbuffer(ctx, ~0);
if (irb) {
/* bind the wrapper to the attachment point */