freedreno/ir3: add support for FS_COLOR0_WRITES_ALL_CBUFS property
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 30 Mar 2015 00:24:57 +0000 (20:24 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 2 Apr 2015 04:09:14 +0000 (00:09 -0400)
This will enable the driver to tell which regids to link up to which
MRT outputs.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/freedreno/ir3/ir3_compiler.c
src/gallium/drivers/freedreno/ir3/ir3_shader.h

index c60025298a67fb6081952e991e16862302cc7821..511cf770ceb039814a5ce8b7ae142eef20b73c79 100644 (file)
@@ -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;
                }
index 4b7d03899d657eedc2f02e9d4c4a2ca38ecc2f95..e5410bf88b292da228ef8c2a0f62207a95b14d21 100644 (file)
@@ -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;