Skip to content

intel/compiler: Do interpolateAtOffset coordinate scaling in NIR

Kenneth Graunke requested to merge kwg/mesa:pi-offset into master

In our source languages, interpolateAtOffset() takes a floating point offset in the range [-0.5, +0.5]. However, the hardware takes integer valued offsets in the range [-8, 7], in units of 1/16th of a pixel.

So, we need to multiply and clamp the coordinates. We were doing this in the FS backend, but with the advent of IBC, I'd like to avoid doing it twice. This patch instead moves the lowering to NIR so we can reuse it across both backends.

Merge request reports