Skip to content

nir: Fix divergence analysis for tessellation input/outputs

Kenneth Graunke requested to merge kwg/mesa:nir-tess-divergence into master

The load_per_vertex_{input,output} intrinsics simply mean that they're reading an arrayed input/output, which have one element per invocation. Most accesses to those use gl_InvocationID as the subscript. However, it's totally possible to read any element of the array. For example, an evaluation shader might read gl_in[2].gl_Position, or a control shader might read output[0].

For threads processing a single patch, an input/output load is convergent if and only if both sources (the per-vertex-array subscript and the offset) are convergent. For threads processing multiple patches, we continued to mark them divergent.

Merge request reports