diff options
author | Rob Clark <[email protected]> | 2018-06-01 14:07:15 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-07-18 10:10:44 -0400 |
commit | 8dfc9e22c12ff840510d876b09d7f7163256bb17 (patch) | |
tree | 2f4e00e1bc0029bbb4da8c7095fbcf099914812a /src/compiler/nir/nir.h | |
parent | 09f240eb5ff6c24471bd55770771b7755ad07bc0 (diff) |
nir: add lowering for gl_HelperInvocation
v2: reword comment about lower_helper_invocations to be more clear
that it might not work on all hardware
v3: add special variant of load_sample_id which does not imply per-
sample shading
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r-- | src/compiler/nir/nir.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index d3e63be091f..3bfe7d7f7bf 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -2006,6 +2006,20 @@ typedef struct nir_shader_compiler_options { */ bool lower_base_vertex; + /** + * If enabled, gl_HelperInvocation will be lowered as: + * + * !((1 << sample_id) & sample_mask_in)) + * + * This depends on some possibly hw implementation details, which may + * not be true for all hw. In particular that the FS is only executed + * for covered samples or for helper invocations. So, do not blindly + * enable this option. + * + * Note: See also issue #22 in ARB_shader_image_load_store + */ + bool lower_helper_invocation; + bool lower_cs_local_index_from_id; bool lower_device_index_to_zero; |