diff options
author | Eric Anholt <[email protected]> | 2013-06-20 09:01:09 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-06-25 19:19:21 -0700 |
commit | 17bc8fdb1d9c264e1f3c319d4ebc64b8c85e0d64 (patch) | |
tree | 71bf31a3587b0dae0e5f879cff393626dad8e424 /src | |
parent | d7165b383da018ff666f789d555093fa3164dc73 (diff) |
intel: Remove gratuitous custom framebuffer resize code.
_mesa_resize_framebuffer(), the default value of the ResizeBuffers hook,
already checks for a window system framebuffer and walks the renderbuffers
calling AllocStorage().
Reviewed-by: Anuj Phogat <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.c | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 32d1797a3b0..d16523bbbf6 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -314,9 +314,12 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx, } /** - * Called for each hardware renderbuffer when a _window_ is resized. - * Just update fields. - * Not used for user-created renderbuffers! + * Called by _mesa_resize_framebuffer() for each hardware renderbuffer when a + * window system framebuffer is resized. + * + * Any actual buffer reallocations for hardware renderbuffers (which would + * have triggered _mesa_resize_framebuffer()) were done by + * intel_process_dri2_buffer(). */ static GLboolean intel_alloc_window_storage(struct gl_context * ctx, struct gl_renderbuffer *rb, @@ -330,32 +333,6 @@ intel_alloc_window_storage(struct gl_context * ctx, struct gl_renderbuffer *rb, return true; } - -static void -intel_resize_buffers(struct gl_context *ctx, struct gl_framebuffer *fb, - GLuint width, GLuint height) -{ - int i; - - _mesa_resize_framebuffer(ctx, fb, width, height); - - if (_mesa_is_user_fbo(fb)) { - return; - } - - - /* Make sure all window system renderbuffers are up to date */ - for (i = BUFFER_FRONT_LEFT; i <= BUFFER_BACK_RIGHT; i++) { - struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer; - - /* only resize if size is changing */ - if (rb && (rb->Width != width || rb->Height != height)) { - rb->AllocStorage(ctx, rb, rb->InternalFormat, width, height); - } - } -} - - /** Dummy function for gl_renderbuffer::AllocStorage() */ static GLboolean intel_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb, @@ -965,7 +942,6 @@ intel_fbo_init(struct intel_context *intel) intel->ctx.Driver.FramebufferRenderbuffer = intel_framebuffer_renderbuffer; intel->ctx.Driver.RenderTexture = intel_render_texture; intel->ctx.Driver.FinishRenderTexture = intel_finish_render_texture; - intel->ctx.Driver.ResizeBuffers = intel_resize_buffers; intel->ctx.Driver.ValidateFramebuffer = intel_validate_framebuffer; intel->ctx.Driver.BlitFramebuffer = intel_blit_framebuffer; intel->ctx.Driver.EGLImageTargetRenderbufferStorage = |