On 05/14/2012 10:59 AM, Brian Paul wrote:
On 05/14/2012 10:44 AM, Marek Olšák wrote:
On Mon, May 14, 2012 at 4:40 PM, Brian Paul<bri...@vmware.com> wrote:
On 05/12/2012 10:11 AM, Marek Olšák wrote:
It may fail with an unsupported format, but that's not an allowed
case
where
RenderbufferStorage may fail.
I've read your comment several times but I still can't quite
understand the
whole issue.
The intention was that AllocStorage() should never fail because of the
internalFormat value. We do error checking of internalFormat
earlier in
renderbuffer_storage(). Then the driver chooses a hw format that best
matches the requested internalFormat.
The driver is r600g and the format is GL_RGB9_E5
(EXT_texture_shared_exponent). There is sampler support, but no
colorbuffer support. The format is quite special, no other format
matches it well, though I guess any RGB float format would work.
However the spec doesn't require renderbuffer support despite the fact
the format is accepted in glRenderbufferStorage.
This looks like a spec/documentation issue. The GL 3.0 spec (page 180)
says GL_RGB9_E5 is a texture-only format. But the
GL_EXT_texture_shared_exponent spec says it's accepted by
glRenderbufferStorage.
I just hacked up a quick test for the NVIDIA driver. Passing
GL_RGB9_E5 to glRenderbufferStorage() generates a GL_INVALID_OPERATION
error. Mesa will need some changes if we want to generate the same
error, rather than GL_INVALID_ENUM.
Could you test w/ AMD's driver?
BTW, regarding get-renderbuffer-internalformat on NVIDIA:
$ bin/get-renderbuffer-internalformat -auto
Using test set: Core formats
Testing GL_RGB: OK
Testing GL_RGBA: OK
Testing GL_ALPHA: FAIL (GL_RGBA instead of GL_ALPHA)
Testing GL_LUMINANCE: FAIL (GL_RGBA instead of GL_LUMINANCE)
Testing GL_LUMINANCE_ALPHA: FAIL (GL_RGBA instead of GL_LUMINANCE_ALPHA)
Testing GL_INTENSITY: FAIL (GL_RGBA instead of GL_INTENSITY)
Testing GL_ALPHA4: OK
Testing GL_ALPHA8: OK
Testing GL_ALPHA12: OK
Testing GL_ALPHA16: OK
Testing GL_LUMINANCE4: OK
Testing GL_LUMINANCE8: OK
Testing GL_LUMINANCE12: OK
Testing GL_LUMINANCE16: OK
Testing GL_LUMINANCE4_ALPHA4: OK
Testing GL_LUMINANCE8_ALPHA8: OK
Testing GL_LUMINANCE12_ALPHA12: OK
Testing GL_LUMINANCE16_ALPHA16: OK
Testing GL_INTENSITY4: OK
Testing GL_INTENSITY8: OK
Testing GL_INTENSITY12: OK
Testing GL_INTENSITY16: OK
Testing GL_R3_G3_B2: OK
Testing GL_RGB4: OK
Testing GL_RGB5: OK
Testing GL_RGB8: OK
Testing GL_RGB10: OK
Testing GL_RGB12: OK
Testing GL_RGB16: OK
Testing GL_RGBA2: OK
Testing GL_RGBA4: OK
Testing GL_RGB5_A1: OK
Testing GL_RGBA8: OK
Testing GL_RGB10_A2: OK
Testing GL_RGBA12: OK
Testing GL_RGBA16: OK
PIGLIT: {'result': 'fail' }
That looks like an NVIDIA bug since the spec is pretty clear on the
GL_INTERNAL_FORMAT query.
-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev