Implementations can use more samples than requested
KHR-GL45.copy_image.samples_mismatch tests that
implementations produce an error when attempting to
copy between images with different sample counts,
however, it relies on the hardware always allocating
exactly the number of samples requested, which may
not happen, since according to the spec for
glTexImage*Multisample:
"samples represents a request for a desired minimum
number of samples. Since different implementations
may support different sample counts for multi-
sampled textures, the actual number of samples
allocated for the texture image is implementation
dependent."
Since the test doesn't account for this, it can end
up expecting an error for the case where it requested
two textures with different sample counts but the
implementation ended up rounding one of them up to the
same number of samples used by the other one, in which
case the Copy operation will not produce an error any
more.
This patch fixes this by checking the actual sample
counts allocated for each texture and adjusting the
test expectation based on that.
Components: OpenGL
VK-GL-CTS issue: 932
Affects:
KHR-GL45.copy_image.samples_mismatch
KHR-GL46.copy_image.samples_mismatch
Change-Id: Idc1ce3026cbaae09cc65dc5194dd26f9bcddea0f