retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD));
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
- if (inst->target > 0 &&
- c->key.nr_color_regions > 1 &&
- c->key.sample_alpha_to_coverage) {
+ if (inst->target > 0 && c->key.replicate_alpha) {
/* Set "Source0 Alpha Present to RenderTarget" bit in message
* header.
*/
old_key->flat_shade, key->flat_shade);
found |= key_debug(intel, "number of color buffers",
old_key->nr_color_regions, key->nr_color_regions);
- found |= key_debug(intel, "sample alpha to coverage",
- old_key->sample_alpha_to_coverage, key->sample_alpha_to_coverage);
+ found |= key_debug(intel, "MRT alpha test or alpha-to-coverage",
+ old_key->replicate_alpha, key->replicate_alpha);
found |= key_debug(intel, "rendering to FBO",
old_key->render_to_fbo, key->render_to_fbo);
found |= key_debug(intel, "fragment color clamping",
/* _NEW_BUFFERS */
key->nr_color_regions = ctx->DrawBuffer->_NumColorDrawBuffers;
- /* _NEW_MULTISAMPLE */
- key->sample_alpha_to_coverage = ctx->Multisample.SampleAlphaToCoverage;
+
+ /* _NEW_MULTISAMPLE, _NEW_COLOR, _NEW_BUFFERS */
+ key->replicate_alpha = ctx->DrawBuffer->_NumColorDrawBuffers > 1 &&
+ (ctx->Multisample.SampleAlphaToCoverage || ctx->Color.AlphaEnabled);
/* BRW_NEW_VUE_MAP_GEOM_OUT */
if (intel->gen < 6)