diff options
author | Timothy Arceri <[email protected]> | 2018-04-24 14:19:48 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-04-25 09:08:26 +1000 |
commit | 6ca09f3a608c10f6d2a9f80d2497ac1628188ac9 (patch) | |
tree | 598e55a1671070088eb099cb893b9db5a498248a /src/mesa/state_tracker | |
parent | 2554b8cb006d5466736333ab7b75aa34501278bb (diff) |
st/mesa: add new driver function DrawBufferAllocate
Unlike some of the classic drivers the st was only using DrawBuffer()
to allocated some buffers on-demand. Creating a separate function
will allow us to call it from update_framebuffer() in the following
patch without regressing some of the older classic drivers.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 696a08fd65b..5eeec08655d 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -714,13 +714,11 @@ st_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) * created FBOs. */ static void -st_DrawBuffer(struct gl_context *ctx, GLenum buffer) +st_DrawBufferAllocate(struct gl_context *ctx) { struct st_context *st = st_context(ctx); struct gl_framebuffer *fb = ctx->DrawBuffer; - (void) buffer; - if (_mesa_is_winsys_fbo(fb)) { GLuint i; /* add the renderbuffers on demand */ @@ -736,8 +734,8 @@ st_DrawBuffer(struct gl_context *ctx, GLenum buffer) /** - * Called via glReadBuffer. As with st_DrawBuffer, we use this function - * to check if we need to allocate a renderbuffer on demand. + * Called via glReadBuffer. As with st_DrawBufferAllocate, we use this + * function to check if we need to allocate a renderbuffer on demand. */ static void st_ReadBuffer(struct gl_context *ctx, GLenum buffer) @@ -868,7 +866,7 @@ st_init_fbo_functions(struct dd_function_table *functions) functions->FinishRenderTexture = st_finish_render_texture; functions->ValidateFramebuffer = st_validate_framebuffer; - functions->DrawBuffer = st_DrawBuffer; + functions->DrawBufferAllocate = st_DrawBufferAllocate; functions->ReadBuffer = st_ReadBuffer; functions->MapRenderbuffer = st_MapRenderbuffer; |