[Mesa-dev] [PATCH 04/38] main: Rename framebuffer renderbuffer software fallback.

Fredrik Höglund fredrik at kde.org
Thu Apr 9 12:43:51 PDT 2015


I don't know if we reached a consensus on the naming of fallback
functions, but I would prefer _mesa_framebuffer_renderbuffer_fallback.

With either name, this patch is:

Reviewed-by: Fredrik Höglund <fredrik at kde.org>

On Wednesday 04 March 2015, Laura Ekstrand wrote:
> Rename _mesa_framebuffer_renderbuffer to _mesa_FramebufferRenderbuffer_sw in
> preparation for adding the ARB_direct_state_access backend function for
> FramebufferRenderbuffer and NamedFramebufferRenderbuffer to share.
> ---
>  src/mesa/drivers/common/driverfuncs.c      | 2 +-
>  src/mesa/drivers/dri/i915/intel_fbo.c      | 2 +-
>  src/mesa/drivers/dri/nouveau/nouveau_fbo.c | 2 +-
>  src/mesa/drivers/dri/radeon/radeon_fbo.c   | 2 +-
>  src/mesa/main/fbobject.c                   | 7 ++++---
>  src/mesa/main/fbobject.h                   | 7 ++++---
>  src/mesa/state_tracker/st_cb_fbo.c         | 2 +-
>  src/mesa/swrast/s_texrender.c              | 2 +-
>  8 files changed, 14 insertions(+), 12 deletions(-)
> 
> diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
> index 0d094dd..71c1a76 100644
> --- a/src/mesa/drivers/common/driverfuncs.c
> +++ b/src/mesa/drivers/common/driverfuncs.c
> @@ -172,7 +172,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
>     driver->UnmapRenderbuffer = _swrast_unmap_soft_renderbuffer;
>     driver->RenderTexture = _swrast_render_texture;
>     driver->FinishRenderTexture = _swrast_finish_render_texture;
> -   driver->FramebufferRenderbuffer = _mesa_framebuffer_renderbuffer;
> +   driver->FramebufferRenderbuffer = _mesa_FramebufferRenderbuffer_sw;
>     driver->ValidateFramebuffer = _mesa_validate_framebuffer;
>  
>     driver->BlitFramebuffer = _swrast_BlitFramebuffer;
> diff --git a/src/mesa/drivers/dri/i915/intel_fbo.c b/src/mesa/drivers/dri/i915/intel_fbo.c
> index 8ce1dbf..5b02508 100644
> --- a/src/mesa/drivers/dri/i915/intel_fbo.c
> +++ b/src/mesa/drivers/dri/i915/intel_fbo.c
> @@ -427,7 +427,7 @@ intel_framebuffer_renderbuffer(struct gl_context * ctx,
>  {
>     DBG("Intel FramebufferRenderbuffer %u %u\n", fb->Name, rb ? rb->Name : 0);
>  
> -   _mesa_framebuffer_renderbuffer(ctx, fb, attachment, rb);
> +   _mesa_FramebufferRenderbuffer_sw(ctx, fb, attachment, rb);
>     intel_draw_buffer(ctx);
>  }
>  
> diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
> index 6c479f5..c78d4ba 100644
> --- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
> +++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
> @@ -242,7 +242,7 @@ static void
>  nouveau_framebuffer_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
>  				 GLenum attachment, struct gl_renderbuffer *rb)
>  {
> -	_mesa_framebuffer_renderbuffer(ctx, fb, attachment, rb);
> +	_mesa_FramebufferRenderbuffer_sw(ctx, fb, attachment, rb);
>  
>  	context_dirty(ctx, FRAMEBUFFER);
>  }
> diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
> index 110b030..27fa851 100644
> --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
> +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
> @@ -723,7 +723,7 @@ radeon_framebuffer_renderbuffer(struct gl_context * ctx,
>  		"%s(%p, fb %p, rb %p) \n",
>  		__func__, ctx, fb, rb);
>  
> -   _mesa_framebuffer_renderbuffer(ctx, fb, attachment, rb);
> +   _mesa_FramebufferRenderbuffer_sw(ctx, fb, attachment, rb);
>     radeon_draw_buffer(ctx, fb);
>  }
>  
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index 8bc7ec7..948ac91 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -515,9 +515,10 @@ set_renderbuffer_attachment(struct gl_context *ctx,
>   * Attach a renderbuffer object to a framebuffer object.
>   */
>  void
> -_mesa_framebuffer_renderbuffer(struct gl_context *ctx,
> -                               struct gl_framebuffer *fb,
> -                               GLenum attachment, struct gl_renderbuffer *rb)
> +_mesa_FramebufferRenderbuffer_sw(struct gl_context *ctx,
> +                                 struct gl_framebuffer *fb,
> +                                 GLenum attachment,
> +                                 struct gl_renderbuffer *rb)
>  {
>     struct gl_renderbuffer_attachment *att;
>  
> diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
> index 5143743..10ae242 100644
> --- a/src/mesa/main/fbobject.h
> +++ b/src/mesa/main/fbobject.h
> @@ -82,9 +82,10 @@ _mesa_update_texture_renderbuffer(struct gl_context *ctx,
>                                    struct gl_renderbuffer_attachment *att);
>  
>  extern void
> -_mesa_framebuffer_renderbuffer(struct gl_context *ctx,
> -                               struct gl_framebuffer *fb,
> -                               GLenum attachment, struct gl_renderbuffer *rb);
> +_mesa_FramebufferRenderbuffer_sw(struct gl_context *ctx,
> +                                 struct gl_framebuffer *fb,
> +                                 GLenum attachment,
> +                                 struct gl_renderbuffer *rb);
>  
>  extern void
>  _mesa_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb);
> diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
> index 296ea1e..0399eef 100644
> --- a/src/mesa/state_tracker/st_cb_fbo.c
> +++ b/src/mesa/state_tracker/st_cb_fbo.c
> @@ -842,7 +842,7 @@ void st_init_fbo_functions(struct dd_function_table *functions)
>     functions->NewFramebuffer = st_new_framebuffer;
>     functions->NewRenderbuffer = st_new_renderbuffer;
>     functions->BindFramebuffer = st_bind_framebuffer;
> -   functions->FramebufferRenderbuffer = _mesa_framebuffer_renderbuffer;
> +   functions->FramebufferRenderbuffer = _mesa_FramebufferRenderbuffer_sw;
>     functions->RenderTexture = st_render_texture;
>     functions->FinishRenderTexture = st_finish_render_texture;
>     functions->ValidateFramebuffer = st_validate_framebuffer;
> diff --git a/src/mesa/swrast/s_texrender.c b/src/mesa/swrast/s_texrender.c
> index 29bb270..98c4505 100644
> --- a/src/mesa/swrast/s_texrender.c
> +++ b/src/mesa/swrast/s_texrender.c
> @@ -73,7 +73,7 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
>   * \param fb  the framebuffer object the texture is being bound to
>   * \param att  the fb attachment point of the texture
>   *
> - * \sa _mesa_framebuffer_renderbuffer
> + * \sa _mesa_FramebufferRenderbuffer_sw
>   */
>  void
>  _swrast_render_texture(struct gl_context *ctx,
> 



More information about the mesa-dev mailing list