Fix checks for maximum number of samples
Some tests query MAX_SAMPLES and/or MAX_INTEGER_SAMPLES, then
attempt to create FBOs passing MAX_SAMPLES+1 samples and
expecting an error to be reported.
There are a couple of bugs in these tests:
1. One uses GL_RGB10_A2UI which is an integer format and should
use MAX_INTEGER_SAMPLES instead of MAX_SAMPLES (this is actually
what the comment above the call says it is doing).
2. Formats can actually support more samples than
MAX_SAMPLES. As stated for the SAMPLES internal format query:
"The maximum value in SAMPLES is guaranteed to be at least
the lowest of the following:
(...)
* The value of MAX_SAMPLES"
The key aspect here is "at least", which means that the
maximum number reported in SAMPLES can be larger than any
of the values in the list, which includes MAX_SAMPLES.
As a consequence of 2), it is possible for these tests to fail
because MAX_SAMPLES+1 is a valid number of samples for the target
internal format and not an invalid number like the test intended.
This patch modifies the affected tests to query SAMPLES for the
internal formats used in the checks so we have the actual maximum
number of sample counts supported for each one, that way we ensure
that SAMPLES+1 is always an invalid number of samples.
Components: OpenGL
Vk-GL-CTS issue: 944
Affects:
KHR-GL45.direct_state_access.renderbuffers_storage_multisample_errors
KHR-GL46.direct_state_access.renderbuffers_storage_multisample_errors
KHR-GL45.direct_state_access.textures_storage_errors
KHR-GL46.direct_state_access.textures_storage_errors
Change-Id: Ic294fe866a3d574fe0321821713d3258027db73b