sRGB and Multi-Sampled Textures

On a NVidia Card the following works fine, while on an ATI card i get an GL_INVALID_ENUM because of the GL_SRGB8_ALPHA8.

glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 2 ,GL_SRGB8_ALPHA8, windowWidth, windowHeight,true);

(I have an 4.2-Comptibility Context and i am using freeglut and glew)

In the 4.2 Documentation it is said, that glTexImage2DMultisample only accepts color-renderable formats and GL_SRGB is not listed as color-renderable.

So is it true, that i can’t have a multisampled sRGB texture?

If so:
Why is it said in the GL_EXT_FRAMEBUFFER_sRGB documentation, that

… if the color samples for multisampling are sRGB encoded …

If not so:
Did i misread the specification?

while on an ATI card

Which ATI card?

It was a “Mobility HD 5850” and i just noticed, that it only supports OpenGL 3.2. (But Freeglut did complain when i requested a 4.2 context).
But if i request a 3.2 Context, the error is the same.

I also tried it with a HD6750M with 3.2 Context (of a Samsung SUR40, that for some reason doesn’t allow me to update the windows-7-provided drivers), which yields the same error.

Does that clarify things?
Where can i read what context supports which internal formats?

It was a “Mobility HD 5850” and i just noticed, that it only supports OpenGL 3.2.

Then it sounds like your drivers are very out of date. Being a laptop card, updating the drivers will probably be non-trivial, but you should do that.

I misinterpreted the information on the ATI product page stating

OpenGL 3.2 support

that it would be the maximum supported version, i am sorry for this.

Anyhow the drivers are up-to-date and when i start the GL Extension Viewer it tells me that OpenGL 4.2 is supported (explains why freeglut did not complain about the 4.2 context). But no matter which context i set, GL_SRGB8_ALPHA8 yields the error.

Could you in general tell me if it SHOULD be supported and where i could have found this information.

The spec says that the internal format must be color-renderable. Which effectively means “no compressed formats”.

I’m sorry, but i don’t understand it.

Due to the 3.2 Specification (to pick a low versioned example)

internalformat must be color-renderable, depth-renderable, or stencil- renderable
(as defined in section 4.4.4)

Section 4.4.4 sais

The following base internal formats from table 3.11 are color-renderable:
RED, RG, RGB, and RGBA. The sized internal formats from table 3.12 that
have a color-renderable base internal format are also color-renderable

If i now look in table 3.12, it is stated, that SRGB8_ALPHA8 has RGBA as a Base Internal Format.

And if i get Table 3.14 right, the compressed version of SRGB8_ALPHA8 is COMPRESSED_SRGB_ALPHA, so SRGB8_ALPHA8 seems to be an uncompressed format. (The EXT_texture_sRGB spec also sais)

This extension adds a few new uncompressed and compressed color
texture formats with sRGB color components.

Could you clarify my confusion?

There is nothing confusing about it. SRGB8_ALPHA8 is a color-renderable format. glTexImage2DMultisample takes color-renderable formats. Therefore…

It is a driver bug for a driver to refuse a color-renderable format.

This ain’t rocket science here.

OK, thanks a lot, (i just misinterpreted your last post).