aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOscar Blumberg <[email protected]>2019-01-26 16:47:42 +0100
committerKenneth Graunke <[email protected]>2019-02-01 10:53:33 -0800
commitfea5b8e5ad5042725cb52d6d37256b9185115502 (patch)
treef7f330ff091a2fee925c2dea1e000f3f65be8d04 /src
parentab940b0d972d9825a2d0ab26a7128ea61ba527b2 (diff)
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/compiler/brw_fs_nir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index f16627b8a64..9012fe11d44 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -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);