[Mesa-dev] [PATCH] u_simple_shaders: try to un-break the Windows build
Nicolai Hähnle
nhaehnle at gmail.com
Wed Nov 16 10:27:05 UTC 2016
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
--
2.7.4
More information about the mesa-dev
mailing list