In the Intel backend, it makes the most sense to treat gl_TessLevelInner
and gl_TessLevelOuter as ordinary shader inputs. For Radeon, it makes
more sense to treat them as system values which get special handling.
We already have a compiler option for this, but the Iris driver will
need a capability bit so we can set it appropriately.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
return 1;
+ case PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS:
+ return 0;
+
case PIPE_CAP_TGSI_FS_FBFETCH:
case PIPE_CAP_TGSI_MUL_ZERO_WINS:
case PIPE_CAP_DOUBLES:
PIPE_CAP_TGSI_CAN_READ_OUTPUTS,
PIPE_CAP_NATIVE_FENCE_FD,
PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY,
+ PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS,
PIPE_CAP_TGSI_FS_FBFETCH,
PIPE_CAP_TGSI_MUL_ZERO_WINS,
PIPE_CAP_DOUBLES,
c->GLSLOptimizeConservatively =
screen->get_param(screen, PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY);
+ c->GLSLTessLevelsAsInputs =
+ screen->get_param(screen, PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS);
c->LowerTessLevel = true;
c->LowerCsDerivedVariables = true;
c->PrimitiveRestartForPatches =