From 846f4f95dd8b0e514592074aa18d797afe914463 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Fri, 3 Jul 2020 12:04:03 +0200 Subject: [PATCH] freedreno/a6xx: Force gl_Layer to 0 when necessary Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_draw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c index d221009726e..05a68294ab4 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c @@ -143,6 +143,7 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, unsigned index_offset) { struct fd6_context *fd6_ctx = fd6_context(ctx); + struct ir3_shader *gs = ctx->prog.gs; struct fd6_emit emit = { .ctx = ctx, .vtx = &ctx->vtx, @@ -164,6 +165,7 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info, .fsaturate_s = fd6_ctx->fsaturate_s, .fsaturate_t = fd6_ctx->fsaturate_t, .fsaturate_r = fd6_ctx->fsaturate_r, + .layer_zero = !gs || !(gs->nir->info.outputs_written & VARYING_BIT_LAYER), .vsamples = ctx->tex[PIPE_SHADER_VERTEX].samples, .fsamples = ctx->tex[PIPE_SHADER_FRAGMENT].samples, .sample_shading = (ctx->min_samples > 1), -- 2.30.2