On Wed, Dec 5, 2012 at 8:39 PM, Eric Anholt <e...@anholt.net> wrote: > Marek Olšák <mar...@gmail.com> writes: > >> On Tue, Dec 4, 2012 at 7:56 PM, Eric Anholt <e...@anholt.net> wrote: >>> Ian Romanick <i...@freedesktop.org> writes: >>> >>>> From: Ian Romanick <ian.d.roman...@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).
I think you can always look at the original "internalformat", which we need to keep around for glGet. Anyway, what you say about L/LA/I sounds reasonable. It's not worth maintaining those formats just because of ARB_fbo. You have my ack for removal of GL renderbuffer support of L/LA/I. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev