From d5cced1e82b6210da0d671301757d0deb769f111 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 6 Jan 2021 16:01:53 -0800 Subject: [PATCH] vrend: Fix TGSI UIF/IF behavior. It is specified in the tgsi.rst docs (and tgsi_exec.c matches) to only look at the .x channel. Reviewed-by: Gert Wollny --- src/vrend_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 0cef985..f7ace6f 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -4893,7 +4893,7 @@ iter_instruction(struct tgsi_iterate_context *iter, break; case TGSI_OPCODE_IF: case TGSI_OPCODE_UIF: - emit_buff(&ctx->glsl_strbufs, "if (any(bvec4(%s))) {\n", srcs[0]); + emit_buff(&ctx->glsl_strbufs, "if (bool(%s.x)) {\n", srcs[0]); indent_buf(&ctx->glsl_strbufs); break; case TGSI_OPCODE_ELSE: