[Mesa-dev] [PATCH] u_simple_shaders: try to un-break the Windows build

Edward O'Callaghan funfunctor at folklore1984.net
Wed Nov 16 11:33:43 UTC 2016


Acked-by: Edward O'Callaghan <funfunctor at folklore1984.net>

On 11/16/2016 09:27 PM, Nicolai Hähnle wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
> 
> ---
>  src/gallium/auxiliary/util/u_simple_shaders.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c
> index b46ec58..8be31be 100644
> --- a/src/gallium/auxiliary/util/u_simple_shaders.c
> +++ b/src/gallium/auxiliary/util/u_simple_shaders.c
> @@ -34,20 +34,21 @@
>             Marek Olšák
>   */
>  
>  
>  #include "pipe/p_context.h"
>  #include "pipe/p_shader_tokens.h"
>  #include "pipe/p_state.h"
>  #include "util/u_simple_shaders.h"
>  #include "util/u_debug.h"
>  #include "util/u_memory.h"
> +#include "util/u_string.h"
>  #include "tgsi/tgsi_dump.h"
>  #include "tgsi/tgsi_strings.h"
>  #include "tgsi/tgsi_ureg.h"
>  #include "tgsi/tgsi_text.h"
>  #include <stdio.h> /* include last */
>  
>  
>  
>  /**
>   * Make simple vertex pass-through shader.
> @@ -588,22 +589,22 @@ util_make_fs_blit_msaa_gen(struct pipe_context *pipe,
>           "END\n";
>  
>     const char *type = tgsi_texture_names[tgsi_tex];
>     char text[sizeof(shader_templ)+100];
>     struct tgsi_token tokens[1000];
>     struct pipe_shader_state state;
>  
>     assert(tgsi_tex == TGSI_TEXTURE_2D_MSAA ||
>            tgsi_tex == TGSI_TEXTURE_2D_ARRAY_MSAA);
>  
> -   snprintf(text, sizeof(text), shader_templ, type, samp_type,
> -            output_semantic, conversion_decl, type, conversion, output_mask);
> +   util_snprintf(text, sizeof(text), shader_templ, type, samp_type,
> +                 output_semantic, conversion_decl, type, conversion, output_mask);
>  
>     if (!tgsi_text_translate(text, tokens, ARRAY_SIZE(tokens))) {
>        puts(text);
>        assert(0);
>        return NULL;
>     }
>     pipe_shader_state_from_tgsi(&state, tokens);
>  #if 0
>     tgsi_dump(state.tokens, 0);
>  #endif
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161116/c83f98f1/attachment.sig>


More information about the mesa-dev mailing list