[Mesa-dev] [PATCH] mesa: add missing color buffer datatype check for glBlitFramebuffer()
Brian Paul
brianp at vmware.com
Mon Jan 9 14:14:34 PST 2012
On 01/09/2012 01:54 PM, Ian Romanick wrote:
> On 01/06/2012 04:13 PM, Brian Paul wrote:
>> ---
>> src/mesa/main/fbobject.c | 44
>> ++++++++++++++++++++++++++++++++++++++++++++
>> 1 files changed, 44 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
>> index ddd70be..6ff09f7 100644
>> --- a/src/mesa/main/fbobject.c
>> +++ b/src/mesa/main/fbobject.c
>> @@ -2579,6 +2579,44 @@ find_attachment(const struct gl_framebuffer *fb,
>> }
>>
>>
>> +/**
>> + * Helper function for checking if the datatypes of color buffers are
>> + * compatible for glBlitFramebuffer. From the spec:
>
> Where is this language from? I was trying to find it, but I can't find
> it in the GL3.0 spec, the EXT_texture_integer spec, the
> EXT_framebuffer_blit spec, or the ARB_framebuffer_object spec. I did
> find the following on page 277 (page 293 of the PDF) of the OpenGL 3.0
> spec:
>
> Format conversion is not supported for all data types. If the read
> buffer contains floating-point values and any draw buffer does not
> contain floating-point values, or if the read buffer contains
> non-floating-point values and any draw buffer contains
> floating-point values, an INVALID OPERATION error is generated.
As I mentioned in my other message, the check comes from the 3.1 spec
(or the glBlitFramebuffer man page).
> Question 2, do we have any tests that check this error?
Probably not. Added the check didn't cause any regressions though.
-Brian
More information about the mesa-dev
mailing list