Missing check for shader stage in the fs_visitor would corrupt the
cs_prog_data.push information and trigger crashes / corruption later
when uploading the CS state.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
const fs_reg data = retype(get_nir_src(instr->src[2]),
BRW_REGISTER_TYPE_UD);
- brw_wm_prog_data(prog_data)->has_side_effects = true;
+ if (stage == MESA_SHADER_FRAGMENT)
+ brw_wm_prog_data(prog_data)->has_side_effects = true;
emit_untyped_write(bld, image, addr, data, 1,
instr->num_components);