[Mesa-dev] [PATCH] gallium/util: s/unsigned/enum tgsi_texture_type/

Roland Scheidegger sroland at vmware.com
Mon Jul 24 09:41:19 UTC 2017


Reviewed-by: Roland Scheidegger <sroland at vmware.com>

Am 21.07.2017 um 23:55 schrieb Brian Paul:
> ---
>  src/gallium/auxiliary/util/u_blitter.c        | 15 ++++++++-------
>  src/gallium/auxiliary/util/u_inlines.h        |  2 +-
>  src/gallium/auxiliary/util/u_simple_shaders.c | 15 ++++++++-------
>  src/gallium/auxiliary/util/u_simple_shaders.h | 13 +++++++------
>  4 files changed, 24 insertions(+), 21 deletions(-)
> 
> diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
> index 65c6f5d..5c82677 100644
> --- a/src/gallium/auxiliary/util/u_blitter.c
> +++ b/src/gallium/auxiliary/util/u_blitter.c
> @@ -890,7 +890,8 @@ static void *blitter_get_fs_texfetch_col(struct blitter_context_priv *ctx,
>                                           bool use_txf)
>  {
>     struct pipe_context *pipe = ctx->base.pipe;
> -   unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target, src_nr_samples);
> +   enum tgsi_texture_type tgsi_tex =
> +      util_pipe_tex_to_tgsi_tex(target, src_nr_samples);
>     enum tgsi_return_type stype;
>     enum tgsi_return_type dtype;
>     unsigned type;
> @@ -1004,7 +1005,7 @@ void *blitter_get_fs_texfetch_depth(struct blitter_context_priv *ctx,
>  
>        /* Create the fragment shader on-demand. */
>        if (!*shader) {
> -         unsigned tgsi_tex;
> +         enum tgsi_texture_type tgsi_tex;
>           assert(!ctx->cached_all_shaders);
>           tgsi_tex = util_pipe_tex_to_tgsi_tex(target, nr_samples);
>           *shader = util_make_fs_blit_msaa_depth(pipe, tgsi_tex);
> @@ -1021,7 +1022,7 @@ void *blitter_get_fs_texfetch_depth(struct blitter_context_priv *ctx,
>  
>        /* Create the fragment shader on-demand. */
>        if (!*shader) {
> -         unsigned tgsi_tex;
> +         enum tgsi_texture_type tgsi_tex;
>           assert(!ctx->cached_all_shaders);
>           tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
>           *shader =
> @@ -1049,7 +1050,7 @@ void *blitter_get_fs_texfetch_depthstencil(struct blitter_context_priv *ctx,
>  
>        /* Create the fragment shader on-demand. */
>        if (!*shader) {
> -         unsigned tgsi_tex;
> +         enum tgsi_texture_type tgsi_tex;
>           assert(!ctx->cached_all_shaders);
>           tgsi_tex = util_pipe_tex_to_tgsi_tex(target, nr_samples);
>           *shader = util_make_fs_blit_msaa_depthstencil(pipe, tgsi_tex);
> @@ -1066,7 +1067,7 @@ void *blitter_get_fs_texfetch_depthstencil(struct blitter_context_priv *ctx,
>  
>        /* Create the fragment shader on-demand. */
>        if (!*shader) {
> -         unsigned tgsi_tex;
> +         enum tgsi_texture_type tgsi_tex;
>           assert(!ctx->cached_all_shaders);
>           tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
>           *shader =
> @@ -1095,7 +1096,7 @@ void *blitter_get_fs_texfetch_stencil(struct blitter_context_priv *ctx,
>  
>        /* Create the fragment shader on-demand. */
>        if (!*shader) {
> -         unsigned tgsi_tex;
> +         enum tgsi_texture_type tgsi_tex;
>           assert(!ctx->cached_all_shaders);
>           tgsi_tex = util_pipe_tex_to_tgsi_tex(target, nr_samples);
>           *shader = util_make_fs_blit_msaa_stencil(pipe, tgsi_tex);
> @@ -1112,7 +1113,7 @@ void *blitter_get_fs_texfetch_stencil(struct blitter_context_priv *ctx,
>  
>        /* Create the fragment shader on-demand. */
>        if (!*shader) {
> -         unsigned tgsi_tex;
> +         enum tgsi_texture_type tgsi_tex;
>           assert(!ctx->cached_all_shaders);
>           tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0);
>           *shader =
> diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
> index 4fc683a..d57f61e 100644
> --- a/src/gallium/auxiliary/util/u_inlines.h
> +++ b/src/gallium/auxiliary/util/u_inlines.h
> @@ -562,7 +562,7 @@ util_query_clear_result(union pipe_query_result *result, unsigned type)
>  }
>  
>  /** Convert PIPE_TEXTURE_x to TGSI_TEXTURE_x */
> -static inline unsigned
> +static inline enum tgsi_texture_type
>  util_pipe_tex_to_tgsi_tex(enum pipe_texture_target pipe_tex_target,
>                            unsigned nr_samples)
>  {
> diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c
> index 5874d0e..e6ec7ac 100644
> --- a/src/gallium/auxiliary/util/u_simple_shaders.c
> +++ b/src/gallium/auxiliary/util/u_simple_shaders.c
> @@ -594,7 +594,7 @@ util_make_fragment_cloneinput_shader(struct pipe_context *pipe, int num_cbufs,
>  
>  static void *
>  util_make_fs_blit_msaa_gen(struct pipe_context *pipe,
> -                           unsigned tgsi_tex,
> +                           enum tgsi_texture_type tgsi_tex,
>                             const char *samp_type,
>                             const char *output_semantic,
>                             const char *output_mask,
> @@ -648,7 +648,7 @@ util_make_fs_blit_msaa_gen(struct pipe_context *pipe,
>   */
>  void *
>  util_make_fs_blit_msaa_color(struct pipe_context *pipe,
> -                             unsigned tgsi_tex,
> +                             enum tgsi_texture_type tgsi_tex,
>                               enum tgsi_return_type stype,
>                               enum tgsi_return_type dtype)
>  {
> @@ -688,7 +688,7 @@ util_make_fs_blit_msaa_color(struct pipe_context *pipe,
>   */
>  void *
>  util_make_fs_blit_msaa_depth(struct pipe_context *pipe,
> -                             unsigned tgsi_tex)
> +                             enum tgsi_texture_type tgsi_tex)
>  {
>     return util_make_fs_blit_msaa_gen(pipe, tgsi_tex, "FLOAT",
>                                       "POSITION", ".z", "", "");
> @@ -702,7 +702,7 @@ util_make_fs_blit_msaa_depth(struct pipe_context *pipe,
>   */
>  void *
>  util_make_fs_blit_msaa_stencil(struct pipe_context *pipe,
> -                               unsigned tgsi_tex)
> +                               enum tgsi_texture_type tgsi_tex)
>  {
>     return util_make_fs_blit_msaa_gen(pipe, tgsi_tex, "UINT",
>                                       "STENCIL", ".y", "", "");
> @@ -718,7 +718,7 @@ util_make_fs_blit_msaa_stencil(struct pipe_context *pipe,
>   */
>  void *
>  util_make_fs_blit_msaa_depthstencil(struct pipe_context *pipe,
> -                                    unsigned tgsi_tex)
> +                                    enum tgsi_texture_type tgsi_tex)
>  {
>     static const char shader_templ[] =
>           "FRAG\n"
> @@ -759,7 +759,7 @@ util_make_fs_blit_msaa_depthstencil(struct pipe_context *pipe,
>  
>  void *
>  util_make_fs_msaa_resolve(struct pipe_context *pipe,
> -                          unsigned tgsi_tex, unsigned nr_samples,
> +                          enum tgsi_texture_type tgsi_tex, unsigned nr_samples,
>                            enum tgsi_return_type stype)
>  {
>     struct ureg_program *ureg;
> @@ -819,7 +819,8 @@ util_make_fs_msaa_resolve(struct pipe_context *pipe,
>  
>  void *
>  util_make_fs_msaa_resolve_bilinear(struct pipe_context *pipe,
> -                                   unsigned tgsi_tex, unsigned nr_samples,
> +                                   enum tgsi_texture_type tgsi_tex,
> +                                   unsigned nr_samples,
>                                     enum tgsi_return_type stype)
>  {
>     struct ureg_program *ureg;
> diff --git a/src/gallium/auxiliary/util/u_simple_shaders.h b/src/gallium/auxiliary/util/u_simple_shaders.h
> index de05aad..aadc7af 100644
> --- a/src/gallium/auxiliary/util/u_simple_shaders.h
> +++ b/src/gallium/auxiliary/util/u_simple_shaders.h
> @@ -129,35 +129,36 @@ util_make_fragment_cloneinput_shader(struct pipe_context *pipe, int num_cbufs,
>  
>  extern void *
>  util_make_fs_blit_msaa_color(struct pipe_context *pipe,
> -                             unsigned tgsi_tex,
> +                             enum tgsi_texture_type tgsi_tex,
>                               enum tgsi_return_type stype,
>                               enum tgsi_return_type dtype);
>  
>  
>  extern void *
>  util_make_fs_blit_msaa_depth(struct pipe_context *pipe,
> -                             unsigned tgsi_tex);
> +                             enum tgsi_texture_type tgsi_tex);
>  
>  
>  extern void *
>  util_make_fs_blit_msaa_depthstencil(struct pipe_context *pipe,
> -                                    unsigned tgsi_tex);
> +                                    enum tgsi_texture_type tgsi_tex);
>  
>  
>  void *
>  util_make_fs_blit_msaa_stencil(struct pipe_context *pipe,
> -                               unsigned tgsi_tex);
> +                               enum tgsi_texture_type tgsi_tex);
>  
>  
>  void *
>  util_make_fs_msaa_resolve(struct pipe_context *pipe,
> -                          unsigned tgsi_tex, unsigned nr_samples,
> +                          enum tgsi_texture_type tgsi_tex, unsigned nr_samples,
>                            enum tgsi_return_type stype);
>  
>  
>  void *
>  util_make_fs_msaa_resolve_bilinear(struct pipe_context *pipe,
> -                                   unsigned tgsi_tex, unsigned nr_samples,
> +                                   enum tgsi_texture_type tgsi_tex,
> +                                   unsigned nr_samples,
>                                     enum tgsi_return_type stype);
>  
>  extern void *
> 



More information about the mesa-dev mailing list