From d10d0000292372f2af374c7545917d9a9c8825ad Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 17 Dec 2018 14:54:08 +0100 Subject: [PATCH] shader: simplify emit_a8_swizzle Signed-off-by: Dave Airlie --- src/vrend_shader.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index ec0f95b..803b063 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -1455,13 +1455,7 @@ static int emit_cbuf_writes(struct dump_ctx *ctx) static int emit_a8_swizzle(struct dump_ctx *ctx) { - char buf[255]; - char *sret; - snprintf(buf, 255, "fsout_c0.x = fsout_c0.w;\n"); - sret = add_str_to_glsl_main(ctx, buf); - if (!sret) - return ENOMEM; - return 0; + return add_str_to_glsl_main(ctx, "fsout_c0.x = fsout_c0.w;\n") ? 0 : ENOMEM; } static const char *atests[PIPE_FUNC_ALWAYS + 1] = {