Skip to content

nir: Additional lowering of TessLevelInner/Outer for SPIR-V to NIR compilation

Brian Ho requested to merge brkho/mesa:tess-nir into master

The GLSL to NIR compiler supports a few extra compilation options for tessellation shaders over its SPIR-V to NIR cousin, in particular:

  1. GLSLTessLevelsAsInputs to specify gl_TessLevelInner/Outer as regular varying shader inputs/outputs instead of sysvals.
  2. LowerTessLevel to convert gl_TessLevelInner/Outer from their GLSL declarations as arrays of floats to vec2/vec4s respectively to better match how they may be represented in hardware.

This MR adds similar functionality to spirv_to_nir. These new compilation options will be used by turnip so we can share freedreno's tess lowering pass (ir3_nir_lower_tess) which expects tess levels as vector sysvals.

Merge request reports