/* Check that INVALID_VALUE is generated by
NamedRenderbufferStorageMultisample if samples is greater than
- MAX_SAMPLES. */
+ the maximum number of SAMPLES reported for GL_RGBA8. */
gl.namedRenderbufferStorageMultisample(m_rbo_valid, m_max_samples + 1, GL_RGBA8, 1, 1);
is_ok &= ExpectError(GL_INVALID_OPERATION, "NamedRenderbufferStorageMultisample",
/* Check that INVALID_OPERATION is generated by
NamedRenderbufferStorageMultisample if internalformat is a signed or
- unsigned integer format and samples is greater than the value of
- MAX_INTEGER_SAMPLES. */
- gl.namedRenderbufferStorageMultisample(m_rbo_valid, m_max_samples + 1, GL_RGB10_A2UI, 1, 1);
+ unsigned integer format and samples is greater than the maximum number
+ of samples reported for GL_RGB10_A2UI */
+ gl.namedRenderbufferStorageMultisample(m_rbo_valid, m_max_integer_samples + 1, GL_RGB10_A2UI, 1, 1);
is_ok &= ExpectError(GL_INVALID_OPERATION, "NamedRenderbufferStorageMultisample",
"internalformat is a signed or unsigned integer format and samples is greater than the "
GLU_EXPECT_NO_ERROR(gl.getError(), "glBindFramebuffer has failed");
/* Limits. */
- gl.getIntegerv(GL_MAX_SAMPLES, &m_max_samples);
- GLU_EXPECT_NO_ERROR(gl.getError(), "glGetIntegerv has failed");
+ gl.getInternalformativ(GL_RENDERBUFFER, GL_RGBA8, GL_SAMPLES, 1, &m_max_samples);
+ GLU_EXPECT_NO_ERROR(gl.getError(), "glGetInternalformativ has failed");
- gl.getIntegerv(GL_MAX_INTEGER_SAMPLES, &m_max_integer_samples);
- GLU_EXPECT_NO_ERROR(gl.getError(), "glGetIntegerv has failed");
+ gl.getInternalformativ(GL_RENDERBUFFER, GL_RGB10_A2UI, GL_SAMPLES, 1, &m_max_integer_samples);
+ GLU_EXPECT_NO_ERROR(gl.getError(), "glGetInternalformativ has failed");
/* Invalid objects. */
while (gl.isRenderbuffer(++m_rbo_invalid))
GLU_EXPECT_NO_ERROR(gl.getError(), "glGetIntegerv has failed");
/* Maximum number of samples. */
- gl.getIntegerv(GL_MAX_SAMPLES, &m_max_samples);
- GLU_EXPECT_NO_ERROR(gl.getError(), "glGetIntegerv has failed");
+ gl.getInternalformativ(GL_RENDERBUFFER, GL_R8, GL_SAMPLES, 1, &m_max_samples);
+ GLU_EXPECT_NO_ERROR(gl.getError(), "glGetInternalformativ has failed");
/* Maximum number of array texture layers. */
gl.getIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &m_max_array_texture_layers);
}
/* Check that INVALID_VALUE is generated by TextureStorage3DMultisample if
- samples is greater than the value of MAX_SAMPLES. */
+ samples is greater than the maximum number of samples reported for GL_R8 */
{
gl.textureStorage3DMultisample(m_to_3D_ms, m_max_samples * 2, GL_R8, 8, 8, 8, false);
is_ok &= CheckErrorAndLog(m_context, GL_INVALID_OPERATION, "glTextureStorage3DMultisample",