Skip to content

arb_copy_image-formats: avoid undefined behavior

Eric Smith requested to merge ericsmith/piglit:multisample-avoid-ub into main
Make piglit_multisample_texture() handle integer formats correctly.
From the GL spec: "If the values written by the fragment shader do not
match the format(s) of the corresponding color buffer(s), the result
is undefined."

Therefore we create the fragment shader with the appropriate output format
based on the internal format used.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Edited by Eric Smith

Merge request reports