nir: Make nir_gather_info collect a uses_fddx_fddy flag.

i965 turns fddx/fddy into their coarse/fine variants based on the
ctx->Hint.FragmentShaderDerivative setting.  It needs to know whether
this can impact a shader in order to better guess NOS settings.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Kenneth Graunke
2017-10-26 15:19:25 -07:00
parent f970e4d481
commit 86c68bb886
2 changed files with 23 additions and 0 deletions

View File

@@ -73,6 +73,13 @@ typedef struct shader_info {
/** Bitfield of which textures are used by texelFetch() */
uint32_t textures_used_by_txf;
/**
* True if this shader uses the fddx/fddy opcodes.
*
* Note that this does not include the "fine" and "coarse" variants.
*/
bool uses_fddx_fddy;
/* The size of the gl_ClipDistance[] array, if declared. */
unsigned clip_distance_array_size;