nir: optimize gl_SampleMaskIn to gl_HelperInvocation for radeonsi when possible

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Marek Olšák
2019-04-09 21:40:33 -04:00
parent d98f6380cb
commit d3ce8a7f6b
4 changed files with 48 additions and 2 deletions

View File

@@ -2307,6 +2307,14 @@ typedef struct nir_shader_compiler_options {
*/
bool lower_helper_invocation;
/**
* Convert gl_SampleMaskIn to gl_HelperInvocation as follows:
*
* gl_SampleMaskIn == 0 ---> gl_HelperInvocation
* gl_SampleMaskIn != 0 ---> !gl_HelperInvocation
*/
bool optimize_sample_mask_in;
bool lower_cs_local_index_from_id;
bool lower_cs_local_id_from_index;