[Mesa-dev] [PATCH 1/3] mesa: Disallow deprecated SNORM formats for renderbuffers

Eric Anholt eric at anholt.net
Wed Dec 5 11:39:54 PST 2012


Marek Olšák <maraeo at gmail.com> writes:

> On Tue, Dec 4, 2012 at 7:56 PM, Eric Anholt <eric at anholt.net> wrote:
>> Ian Romanick <idr at freedesktop.org> writes:
>>
>>> From: Ian Romanick <ian.d.romanick at intel.com>
>>>
>>> The OpenGL 3.2 core profile spec says:
>>>
>>>     "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. No other formats, including compressed
>>>     internal formats, are color-renderable."
>>>
>>> The OpenGL 3.2 compatibility profile spec says (only ALPHA is added):
>>>
>>>     "The following base internal formats from table 3.16 are
>>>     color-renderable: ALPHA, RED, RG, RGB, and RGBA. The sized internal formats
>>>     from table 3.17 that have a color-renderable base internal format
>>>     are also color-renderable. No other formats, including compressed
>>>     internal formats, are color-renderable."
>>>
>>> Table 3.12 in the core profile spec and table 3.17 in the compatibility
>>> profile spec list SNORM formats as having a base internal format of RED,
>>> RG, RGB, or RGBA.  From this we infer that they should also be color
>>> renderable.
>>
>> This sounds sort of like the description of the bottom half of the
>> change, to remove L/LA/I snorm formats.  (ALPHA being left in place,
>> which I missed at first).
>>
>> I wonder, do they also not support FBOs with unorm L/LA/I, despite
>> ARB_framebuffer_object?  fbo-clear-formats should tell.  I'd be happy to
>> see those go if nobody else supports them either, and it would make this
>> change make more sense to me.
>
> What do you mean by that? R600 has full renderbuffer support for all
> R, RG, RGBX, RGBA, A, L, LA, and I formats, all can be UNORM, SNORM,
> UINT, SINT, and FLOAT, and blending and MSAA are a sure thing. I'm
> only okay with disallowing the formats if all specifications (GL and
> extensions) agree they *shouldn't* be supported.

ARB_fbo is the only thing that allows L/LA/I to be color-renderable.
EXT_fbo and all the GL core/compat specs say only R/RG/RGB/RGBA/A are.
The ARB_fbo spec makes it pretty clear that they expect drivers to say
"no" for things despite that, just that they don't want to explicitly
ban it in that spec.  In the core/compat specs, they decided to do the
reasonable thing instead.

For intel, we need either mesa core to filter out the stupid formats, or
we can in the driver.  (unfortunately, we can't quite just look at the
MESA_FORMAT, because those are sometimes promoted from an internalformat
of LA to a mesa format of RGBA, for example).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121205/ecb28c52/attachment.pgp>


More information about the mesa-dev mailing list