intel/fs: Fix memory corruption when compiling a CS

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>
This commit is contained in:
Oscar Blumberg
2019-01-26 16:47:42 +01:00
committed by Kenneth Graunke
parent ab940b0d97
commit fea5b8e5ad
+2 -1
View File
@@ -3782,7 +3782,8 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
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);