From: Ilia Mirkin Date: Mon, 30 Mar 2015 00:24:57 +0000 (-0400) Subject: freedreno/ir3: add support for FS_COLOR0_WRITES_ALL_CBUFS property X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d13803c76fd7429df64c1aa3631dcc451e7f1a29;p=mesa.git 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 --- 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;