From 3c1846eec02d0ba8ec8bb9ea193f0de1595a5431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Tue, 15 Feb 2022 16:18:01 +0100 Subject: [PATCH] shader: Emit winsys_adjust_y when TGSI_SEMANTIC_PCOORD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make sure that the condition for which we are emitting the uniform corresponds to the one in the iter_declaration function. Signed-off-by: Corentin Noël Reviewed-by: Gert Wollny --- src/vrend_shader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index dcf2b08..5a2139e 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -6632,7 +6632,8 @@ static void emit_ios_fs(const struct dump_ctx *ctx, } if (ctx->cfg->use_gles && !ctx->winsys_adjust_y_emitted && - (ctx->key->fs.coord_replace & (1 << ctx->inputs[i].sid))) { + (ctx->inputs[i].name == TGSI_SEMANTIC_PCOORD || + (ctx->key->fs.coord_replace & (1 << ctx->inputs[i].sid)))){ *winsys_adjust_y_emitted = true; emit_hdr(glsl_strbufs, "uniform float winsys_adjust_y;\n"); }