diff options
author | Eric Anholt <[email protected]> | 2012-01-19 17:40:41 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-01-27 11:46:10 -0800 |
commit | b73f5df6483b2e37235b258f705944321ee617f5 (patch) | |
tree | 9e1a40ef8ff27d7188ec553863e37a0dc793b12d /src/mesa/drivers/dri | |
parent | 74484c5d411788c855cf91a2017d763d6a8fb4f2 (diff) |
intel: Simplify intel_renderbuffer_update_wrapper() by passing in the image.
NOTE: This is a candidate for the 8.0 branch.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index f999246742d..963034423d2 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -59,15 +59,6 @@ static struct gl_renderbuffer * intel_new_renderbuffer(struct gl_context * ctx, GLuint name); -static bool -intel_renderbuffer_update_wrapper(struct intel_context *intel, - struct intel_renderbuffer *irb, - struct intel_mipmap_tree *mt, - uint32_t level, - uint32_t layer, - gl_format format, - GLenum internal_format); - bool intel_framebuffer_has_hiz(struct gl_framebuffer *fb) { @@ -470,19 +461,20 @@ intel_framebuffer_renderbuffer(struct gl_context * ctx, * * @return true on success */ + static bool intel_renderbuffer_update_wrapper(struct intel_context *intel, struct intel_renderbuffer *irb, - struct intel_mipmap_tree *mt, - uint32_t level, - uint32_t layer, - gl_format format, - GLenum internal_format) + struct gl_texture_image *image, + uint32_t layer) { struct gl_renderbuffer *rb = &irb->Base.Base; + struct intel_texture_image *intel_image = intel_texture_image(image); + struct intel_mipmap_tree *mt = intel_image->mt; + int level = image->Level; - rb->Format = format; - rb->InternalFormat = internal_format; + rb->Format = image->TexFormat; + rb->InternalFormat = image->InternalFormat; rb->_BaseFormat = _mesa_get_format_base_format(rb->Format); rb->Width = mt->level[level].width; rb->Height = mt->level[level].height; @@ -628,10 +620,7 @@ intel_render_texture(struct gl_context * ctx, } } - if (!intel_renderbuffer_update_wrapper(intel, irb, - mt, att->TextureLevel, layer, - image->TexFormat, - image->InternalFormat)) { + if (!intel_renderbuffer_update_wrapper(intel, irb, image, layer)) { _mesa_reference_renderbuffer(&att->Renderbuffer, NULL); _swrast_render_texture(ctx, fb, att); return; |