diff options
author | Marek Olšák <[email protected]> | 2017-06-09 22:47:16 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-22 01:51:02 +0200 |
commit | ab784e0feeaa6af46afc5ee6ce3527324de29dea (patch) | |
tree | aae1f2927f63f6f79e7902f9e718c02de30bc079 /src/mesa/main | |
parent | e7a091936fb6fd578c6ced9baa38b306b638a11b (diff) |
mesa: remove update_framebuffer_size
For the default framebuffer, _mesa_resize_framebuffer updates it.
For FBOs, _mesa_test_framebuffer_completeness updates it.
This code is redundant.
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/framebuffer.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index c4eecf6ce96..039762a074a 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -321,43 +321,6 @@ _mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb, } /** - * Examine all the framebuffer's renderbuffers to update the Width/Height - * fields of the framebuffer. If we have renderbuffers with different - * sizes, set the framebuffer's width and height to the min size. - * Note: this is only intended for user-created framebuffers, not - * window-system framebuffes. - */ -static void -update_framebuffer_size(struct gl_context *ctx, struct gl_framebuffer *fb) -{ - GLuint minWidth = ~0, minHeight = ~0; - GLuint i; - - /* user-created framebuffers only */ - assert(_mesa_is_user_fbo(fb)); - - for (i = 0; i < BUFFER_COUNT; i++) { - struct gl_renderbuffer_attachment *att = &fb->Attachment[i]; - const struct gl_renderbuffer *rb = att->Renderbuffer; - if (rb) { - minWidth = MIN2(minWidth, rb->Width); - minHeight = MIN2(minHeight, rb->Height); - } - } - - if (minWidth != ~0U) { - fb->Width = minWidth; - fb->Height = minHeight; - } - else { - fb->Width = 0; - fb->Height = 0; - } -} - - - -/** * Given a bounding box, intersect the bounding box with the scissor of * a specified vieport. * @@ -403,7 +366,7 @@ _mesa_intersect_scissor_bounding_box(const struct gl_context *ctx, * xmax, ymin, ymax. * * \warning This function assumes that the framebuffer dimensions are up to - * date (e.g., update_framebuffer_size has been recently called on \c buffer). + * date. * * \sa _mesa_clip_to_region */ @@ -438,11 +401,6 @@ _mesa_update_draw_buffer_bounds(struct gl_context *ctx, if (!buffer) return; - if (_mesa_is_user_fbo(buffer)) { - /* user-created framebuffer size depends on the renderbuffers */ - update_framebuffer_size(ctx, buffer); - } - /* Default to the first scissor as that's always valid */ scissor_bounding_box(ctx, buffer, 0, bbox); buffer->_Xmin = bbox[0]; |