Skip to content

panvk: fix sample position when sample shading is disabled

Benjamin Lee requested to merge benjaminl/mesa:panvk-sample-positon-fix into main

Fixes dEQP-VK.draw.dynamic_rendering.primary_cmd_buff.linear_interpolation.* when combined with !32127 (merged). On vulkan, gl_FragCoord is lowered to the pixel coord + sample pos by nir_lower_wpos_center. The sample position bug then meant that gl_FragCoord was the position of the first sample rather than the center of the pixel when multisample is enabled but sample shading is not.

I went a long ways down the path of passing the actual raw sample ID through to NIR, so that we could use the original pan_positions[32] design, but switched to this simpler option once I realized it wasn't necessary.

Fixes panfrost/mesa#26 (closed).

Merge request reports

Loading