glsl: Parse and propagate derivative_group to shader_info

NV_compute_shader_derivatives allow selecting between two possible
arrangements (quads and linear) when calculating derivatives and
certain subgroup operations in case of Vulkan.  So parse and propagate
those up to shader_info.h.

v2: Do not fail when ARB_compute_variable_group_size is being used,
    since we are still clarifying what is the right thing to do here.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Caio Marcelo de Oliveira Filho
2019-03-26 00:04:57 -07:00
parent ca60f0b7ba
commit 3c5ddaeacd
9 changed files with 193 additions and 4 deletions

View File

@@ -252,6 +252,12 @@ typedef struct shader_info {
* AddressingModelPhysical64: 64
*/
unsigned ptr_size;
/*
* Arrangement of invocations used to calculate derivatives in a compute
* shader. From NV_compute_shader_derivatives.
*/
enum gl_derivative_group derivative_group;
} cs;
/* Applies to both TCS and TES. */