Skip to content

radv,aco: fix certain derivatives in divergent control flow

This fixes games calculating derivatives of inputs and constants in divergent control flow by moving the nir_op_fdd(x|y)_* and coordinate interpolations/constant copies outside control flow (and into a linear vgpr, in the texture sampling case).

To implement cube map and 1D/GFX9 cases, it also adds a pass to lower coordinates for these operations in NIR.

This case is required to work by the Direct3D 11 specification and is often done, sometimes even by native Vulkan applications.

Edited by Rhys Perry

Merge request reports