[Mesa-dev] [PATCH 17/23] readpix: for implentation format/type, ignore int vs. non-int check

Jordan Justen jljusten at gmail.com
Thu Jan 10 11:34:16 PST 2013


On Thu, Jan 10, 2013 at 10:13 AM, Ian Romanick <idr at freedesktop.org> wrote:
> On 01/09/2013 11:02 AM, Eric Anholt wrote:
>>
>> Jordan Justen <jordan.l.justen at intel.com> writes:
>>
>>> In ES or GL+GL_ARB_ES2_compatibility, the usage of
>>> format = IMPLEMENTATION_COLOR_READ_FORMAT +
>>> type = IMPLEMENTATION_COLOR_READ_TYPE
>>> can function, even if the src/dst int vs. non-int types
>>> differ.
>>
>>
>> This seems bogus -- why should you get to read to formats that ought to
>> be invalid?  I bet what we're missing is an implementation of this bit
>> of spec: "The implementation-chosen format may vary depending on the
>> format of the selected read buffer of the currently bound read
>> framebuffer." (section 4.3 of the gles3 spec) which lets us actually
>> specify a format that makes sense for an int framebuffer.
>
> I think you're right.  This is also why tests that try to
> glReadPixels(GL_RED) from a GL_RED FBO work on other implementations but
> generate an error on ours.  I think we should have the
> IMPLEMENTATION_COLOR_READ_* match the format / type of the FBO itself.

I'll try to update _mesa_get_color_read_format and
_mesa_get_color_read_type for this and see what happens on gles3-gtf
and piglit.

-Jordan


More information about the mesa-dev mailing list