diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 9c34530..28172e1 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -6237,6 +6237,7 @@ struct vrend_context *vrend_create_context(int id, uint32_t nlen, const char *de grctx->shader_cfg.has_es31_compat = has_feature(feat_gles31_compatibility); grctx->shader_cfg.has_conservative_depth = has_feature(feat_conservative_depth); grctx->shader_cfg.use_integer = vrend_state.use_integer; + grctx->shader_cfg.has_dual_src_blend = has_feature(feat_dual_src_blend); vrend_renderer_create_sub_ctx(grctx, 0); vrend_renderer_set_sub_ctx(grctx, 0); diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 1396ce6..0124fb4 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -6336,7 +6336,8 @@ static void emit_ios_fs(struct dump_ctx *ctx) char prefix[64] = ""; if (ctx->cfg->use_gles && - ctx->outputs[i].name == TGSI_SEMANTIC_COLOR) + ctx->outputs[i].name == TGSI_SEMANTIC_COLOR && + !ctx->cfg->has_dual_src_blend) sprintf(prefix, "layout(location = %d)", ctx->outputs[i].sid); emit_ios_generic(ctx, io_out, prefix, &ctx->outputs[i], diff --git a/src/vrend_shader.h b/src/vrend_shader.h index 284cf13..9f199c4 100644 --- a/src/vrend_shader.h +++ b/src/vrend_shader.h @@ -169,6 +169,7 @@ struct vrend_shader_cfg { bool has_es31_compat; bool has_conservative_depth; bool use_integer; + bool has_dual_src_blend; }; struct vrend_context;