From 8dfc9e22c12ff840510d876b09d7f7163256bb17 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 1 Jun 2018 14:07:15 -0400 Subject: 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 --- src/compiler/nir/nir.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/compiler/nir/nir.h') 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; -- cgit v1.2.3