[Mesa-dev] [PATCH 16/23] readpix: raise priority of FBO completeness error

Jordan Justen jljusten at gmail.com
Wed Jan 9 12:47:49 PST 2013


On Tue, Jan 8, 2013 at 9:21 AM, Jordan Justen <jljusten at gmail.com> wrote:
> On Mon, Jan 7, 2013 at 1:19 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> On 01/04/2013 06:41 PM, Jordan Justen wrote:
>>>
>>> GTF/gles3 test suite wants this error to have higher priority
>>> than the type checking.
>>
>>
>> If the ReadPixels call in the test has multiple errors, the test should be
>> changed.  There is no requirement to generate a specific error when multiple
>> problems exist.  Is my understanding of the test case correct?
>
> Okay, it sounds like it is a test bug. I'll drop this patch and look
> at the test instead.

Looks like I'm wrong about the test. It seems like the fb-inc error is
the only valid error.

But, in patch 12, I added:
   rb = _mesa_get_read_renderbuffer(ctx, internalFormat);
   if (rb == NULL) {
      _mesa_error(ctx, GL_INVALID_OPERATION,
                  "glCopyTexImage%dD(read buffer)", dimensions);
      return GL_TRUE;
   }

This is done because we need to look at the read-buffer format type
for gles3. But, this code will also cause an error when the
framebuffer is not complete, only I had it return invalid-op.

So, I think this patch is needed to check the framebuffer completeness
before this code tries to get the read-buffer. I propose a new log
message:

readpix: check FBO completeness before trying to access the read-buffer

-Jordan


More information about the mesa-dev mailing list