[Mesa-dev] [PATCH 11.4/18] st/mesa: Don't override NewFramebuffer just to call _mesa_new_framebuffer

Brian Paul brianp at vmware.com
Tue Oct 6 11:25:34 PDT 2015


On 10/06/2015 12:13 PM, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
>   src/mesa/state_tracker/st_cb_fbo.c | 12 ------------
>   1 file changed, 12 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
> index 9d06a23..aae18b4 100644
> --- a/src/mesa/state_tracker/st_cb_fbo.c
> +++ b/src/mesa/state_tracker/st_cb_fbo.c
> @@ -246,17 +246,6 @@ st_renderbuffer_delete(struct gl_context *ctx, struct gl_renderbuffer *rb)
>
>
>   /**
> - * Called via ctx->Driver.NewFramebuffer()
> - */
> -static struct gl_framebuffer *
> -st_new_framebuffer(struct gl_context *ctx, GLuint name)
> -{
> -   /* XXX not sure we need to subclass gl_framebuffer for pipe */
> -   return _mesa_new_framebuffer(ctx, name);
> -}
> -
> -
> -/**
>    * Called via ctx->Driver.NewRenderbuffer()
>    */
>   static struct gl_renderbuffer *
> @@ -826,7 +815,6 @@ st_UnmapRenderbuffer(struct gl_context *ctx,
>
>   void st_init_fbo_functions(struct dd_function_table *functions)
>   {
> -   functions->NewFramebuffer = st_new_framebuffer;

We have to change the assignment to read:

functions->NewFramebuffer = _mesa_new_framebuffer;

since the function pointer will be null otherwise and we'll segfault 
when it's used.

>      functions->NewRenderbuffer = st_new_renderbuffer;
>      functions->FramebufferRenderbuffer = _mesa_FramebufferRenderbuffer_sw;
>      functions->RenderTexture = st_render_texture;
>

Other than that, the series looks OK to me.  The other Mesa drivers 
probably call _mesa_init_driver_functions() to setup the pointer.

For all 4, Reviewed-by: Brian Paul <brianp at vmware.com>




More information about the mesa-dev mailing list