vrend: only emit alpha test if something writes to mrt 0

The piglit test generates a failed to compile shader:
gl-2.1-fbo-mrt-alphatest-no-buffer-zero-write

The test never validates any result as it can't, but this fixes
the debug logging of the error on the host.
macos/master
Dave Airlie 7 years ago
parent 79b08deb10
commit c5bdadd366
  1. 8
      src/vrend_shader.c

@ -835,6 +835,14 @@ static int emit_alpha_test(struct dump_ctx *ctx)
char comp_buf[128];
char *sret;
if (!ctx->num_outputs)
return 0;
if (!ctx->write_all_cbufs) {
/* only emit alpha stanza if first output is 0 */
if (ctx->outputs[0].sid != 0)
return 0;
}
switch (ctx->key->alpha_test) {
case PIPE_FUNC_NEVER:
case PIPE_FUNC_ALWAYS:

Loading…
Cancel
Save