[Mesa-dev] [PATCH 01/18] gallium: rename cso_save/restore_samplers -> cso_save/restore_fragment_samplers

Brian Paul brianp at vmware.com
Thu Aug 2 07:14:15 PDT 2012


On 08/02/2012 07:14 AM, Marek Olšák wrote:
> ---
>   src/gallium/auxiliary/cso_cache/cso_context.c |    4 ++--
>   src/gallium/auxiliary/cso_cache/cso_context.h |    4 ++--
>   src/gallium/auxiliary/util/u_blit.c           |    8 ++++----
>   src/gallium/auxiliary/util/u_gen_mipmap.c     |    4 ++--
>   src/gallium/state_trackers/vega/renderer.c    |   12 ++++++------
>   src/mesa/state_tracker/st_cb_bitmap.c         |    4 ++--
>   src/mesa/state_tracker/st_cb_drawpixels.c     |    4 ++--
>   7 files changed, 20 insertions(+), 20 deletions(-)
>
> diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
> index 7f2dc43..4625913 100644
> --- a/src/gallium/auxiliary/cso_cache/cso_context.c
> +++ b/src/gallium/auxiliary/cso_cache/cso_context.c
> @@ -1122,7 +1122,7 @@ save_samplers(struct cso_context *ctx, struct sampler_info *info)
>   }
>
>   void
> -cso_save_samplers(struct cso_context *ctx)
> +cso_save_fragment_samplers(struct cso_context *ctx)
>   {
>      save_samplers(ctx,&ctx->fragment_samplers);
>   }
> @@ -1144,7 +1144,7 @@ restore_samplers(struct cso_context *ctx, struct sampler_info *info)
>   }
>
>   void
> -cso_restore_samplers(struct cso_context *ctx)
> +cso_restore_fragment_samplers(struct cso_context *ctx)
>   {
>      restore_samplers(ctx,&ctx->fragment_samplers);
>   }
> diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h
> index 4de08a8..b97e45a 100644
> --- a/src/gallium/auxiliary/cso_cache/cso_context.h
> +++ b/src/gallium/auxiliary/cso_cache/cso_context.h
> @@ -73,8 +73,8 @@ void cso_restore_rasterizer(struct cso_context *cso);
>   enum pipe_error cso_set_samplers( struct cso_context *cso,
>                                     unsigned count,
>                                     const struct pipe_sampler_state **states );
> -void cso_save_samplers(struct cso_context *cso);
> -void cso_restore_samplers(struct cso_context *cso);
> +void cso_save_fragment_samplers(struct cso_context *cso);
> +void cso_restore_fragment_samplers(struct cso_context *cso);

There's a few more functions that should also be renamed with 
"fragment" to be consistent:

cso_set_samplers()
cso_single_sampler()
cso_single_sampler_done()


Longer term though, when we have geometry shaders we'd need yet 
another set of "cso_XXX_sampler" functions for that.  Maybe it would 
be better to consolidate those functions and pass a PIPE_SHADER_x 
value to indicate vertex/fragment/geometry.

That might also let us consolidate some state tracker code.

I could take a stab at that one of these days.

Anyway, for patches 1-10: Reviewed-by: Brian Paul <brianp at vmware.com>

-Brian


More information about the mesa-dev mailing list