shader->info.fs.uses_sample_qualifier ||
shader->info.outputs_read);
+ prog_data->has_render_target_reads = shader->info.outputs_read != 0ull;
+
prog_data->early_fragment_tests = shader->info.fs.early_fragment_tests;
prog_data->post_depth_coverage = shader->info.fs.post_depth_coverage;
prog_data->inner_coverage = shader->info.fs.inner_coverage;
const struct brw_wm_prog_data *wm_prog_data =
brw_wm_prog_data(brw->wm.base.prog_data);
- /* BRW_NEW_FRAGMENT_PROGRAM */
- if (!ctx->Extensions.MESA_shader_framebuffer_fetch &&
- brw->fragment_program && brw->fragment_program->info.outputs_read) {
+ if (wm_prog_data->has_render_target_reads &&
+ !ctx->Extensions.MESA_shader_framebuffer_fetch) {
/* _NEW_BUFFERS */
const struct gl_framebuffer *fb = ctx->DrawBuffer;
.mesa = _NEW_BUFFERS,
.brw = BRW_NEW_BATCH |
BRW_NEW_FAST_CLEAR_COLOR |
- BRW_NEW_FRAGMENT_PROGRAM |
BRW_NEW_FS_PROG_DATA,
},
.emit = update_renderbuffer_read_surfaces,