From d13803c76fd7429df64c1aa3631dcc451e7f1a29 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 29 Mar 2015 20:24:57 -0400 Subject: [PATCH] freedreno/ir3: add support for FS_COLOR0_WRITES_ALL_CBUFS property This will enable the driver to tell which regids to link up to which MRT outputs. Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/ir3/ir3_compiler.c | 9 +++++++++ src/gallium/drivers/freedreno/ir3/ir3_shader.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c index c60025298a6..511cf770ceb 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c @@ -3412,6 +3412,15 @@ compile_instructions(struct ir3_compile_context *ctx) break; } + case TGSI_TOKEN_TYPE_PROPERTY: { + struct tgsi_full_property *prop = + &ctx->parser.FullToken.FullProperty; + switch (prop->Property.PropertyName) { + case TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS: + ctx->so->color0_mrt = !!prop->u[0].Data; + break; + } + } default: break; } diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.h b/src/gallium/drivers/freedreno/ir3/ir3_shader.h index 4b7d03899d6..e5410bf88b2 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_shader.h +++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.h @@ -133,7 +133,7 @@ struct ir3_shader_variant { * to bary.f instructions */ uint8_t pos_regid; - bool frag_coord, frag_face; + bool frag_coord, frag_face, color0_mrt; /* varyings/outputs: */ unsigned outputs_count; -- 2.30.2