Skip to content

intel/fs: Don't use pixel_z for Gen4-5 source_depth_to_render_target

The source_depth_to_render_target flag can get set on old gen4-5 HW in a few cases which are independent of the app writing gl_FragDepth. It should be safe to just use fetch_payload_reg in that case instead of depending in interpolation setup. This fixes a bug with certain very simple shaders where we might end up not including the depth when we should have.

While we're here, rework the logic around setting src_depth and add a comment so it's more clear what's going on.

Fixes: 6d4070f3 "intel/compiler: add support for fragment coordinate..."

Merge request reports