From 6f72e549128d6b9fd9bfd5f1960470bfc8e6450d Mon Sep 17 00:00:00 2001 From: Elie Tournier Date: Thu, 6 Aug 2020 10:55:30 +0100 Subject: [PATCH] shader: Do not emit textureQueryLevels with GLES Signed-off-by: Elie Tournier Reviewed-by: Gert Wollny Reviewed-by: Rohan Garg --- src/vrend_shader.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 63858f8..05283a4 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -2281,9 +2281,11 @@ static void emit_txq(struct dump_ctx *ctx, ctx->shader_req_bits |= SHADER_REQ_TXQ_LEVELS; if (inst->Dst[0].Register.WriteMask & 0x7) twm = TGSI_WRITEMASK_W; - emit_buff(&ctx->glsl_strbufs, "%s%s = %s(textureQueryLevels(%s));\n", dst, - get_wm_string(twm), get_string(dtypeprefix), - srcs[sampler_index]); + + if (!ctx->cfg->use_gles) + emit_buff(&ctx->glsl_strbufs, "%s%s = %s(textureQueryLevels(%s));\n", dst, + get_wm_string(twm), get_string(dtypeprefix), + srcs[sampler_index]); } if (inst->Dst[0].Register.WriteMask & 0x7) {