Skip to content

mesa/st: add implicit zeroing of clipdistance array

Mike Blumenkrantz requested to merge zmike/mesa:clip into main

GL drivers have an implicit default of "in bounds" for unwritten clipdistance values, but some (layered) drivers have to deal with api mismatch which prevents that implicit value from being used after the shader gets mangled by various compiler passes

to avoid issues here, write out all members of the clipdistance array with zeroes at the very start of the shader such that any values the shader actually writes will naturally overwrite the implicit zero and any unwritten values will now be written as zero

fixes #6845 (closed)

Merge request reports