[Mesa-dev] [PATCH] mesa: check that internalformat of CopyTexImage*D is not 1, 2, 3, 4
Nicolai Hähnle
nicolai.haehnle at amd.com
Mon Jan 11 10:07:30 PST 2016
On 11.01.2016 10:40, Erik Faye-Lund wrote:
> On Thu, Jan 7, 2016 at 11:49 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> On 01/07/2016 12:31 PM, Nicolai Hähnle wrote:
>>> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>>>
>>> The piglit copyteximage check has recently been augmented to test this, but
>>> apparently it hasn't been fixed in Mesa so far.
>>> ---
>>> src/mesa/main/teximage.c | 16 ++++++++++++++++
>>> 1 file changed, 16 insertions(+)
>>>
>>> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
>>> index 73b3318..70dbf84 100644
>>> --- a/src/mesa/main/teximage.c
>>> +++ b/src/mesa/main/teximage.c
>>> @@ -2247,6 +2247,22 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
>>> _mesa_enum_to_string(internalFormat));
>>> return GL_TRUE;
>>> }
>>> + } else {
>>> + /*
>>> + * The spec on CopyTexImage2D (OpenGL 4.5 (Compatibility Profile),
>>> + * page 244):
>>> + *
>>> + * Parameters level, internalformat, and border are specified using the
>>> + * same values, with the same meanings, as the corresponding arguments of
>>> + * TexImage2D, except that internalformat may not be specified as 1, 2,
>>> + * 3, or 4.
>>> + */
>>
>> Please use the canonical spec reference format.
>>
>> /* Section X.Y (Title) of the OpenGL A.B (Foo Profile) spec says:
>> *
>> * "Words words words..."
>> */
>>
>> I checked the OpenGL 2.1 spec, and the same wording appears there too.
>> I'm surprised we missed this for so long.
>>
>> With the spec reference fixes, this patch is
>>
>> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
>
> FYI, I already sent out a different patch for this a long time ago:
>
> https://patchwork.freedesktop.org/patch/57900/
Ah sorry, my brief search didn't turn up that patch. Sometimes you have
to be a bit more insistent to make sure things don't get lost.
Nicolai
More information about the mesa-dev
mailing list