[Mesa-dev] [PATCH 1/2] mesa: Add gl_formats to cover all GLUser provided format/type combinations

Marek Olšák maraeo at gmail.com
Fri Nov 22 12:36:07 PST 2013


On Fri, Nov 15, 2013 at 9:58 PM, Mark Mueller <markkmueller at gmail.com> wrote:
>
>
>
> On Fri, Nov 15, 2013 at 9:52 AM, Marek Olšák <maraeo at gmail.com> wrote:
>>
>> I don't understand this and I don't think this is the right way to
>> implement hw-accelerated TexImage. Some of the formats are unsupported
>> by all hardware I know, others just don't make any sense (e.g.
>> RGBA5999_REV).
>
>
> Please check out st_choose_matching_format. This is what the function
> comment says:
> /**
>  * Given an OpenGL user-requested format and type, and swapBytes state,
>  * return the format which exactly matches those parameters, so that
>  * a memcpy-based transfer can be done.
>  *
>  * If no format is supported, return PIPE_FORMAT_NONE.
>  */
>
> My patch allows for similar functionality without using Gallium
> PIPE_FORMATs, which aren't supported in the i965 driver. RGPA5999_REV is
> there because it is used by a the glean test case pixelFormats. Having
> hardware support for the added formats is not relevant.

Why is it not relevant? If there is no hardware support, adding those
formats is a waste of time. Will the formats be unpacked by shaders or
what? The MESA_* formats have only one purpose: to be used as OpenGL
textures and renderbuffers.

Marek


More information about the mesa-dev mailing list