[Piglit] [PATCH] gl-3.1/minmax: require at least 0 in GL_NUM_COMPRESSED_TEXTURE_FORMATS

Ian Romanick idr at freedesktop.org
Mon Nov 11 13:39:36 PST 2013


On 11/01/2013 04:56 PM, Marek Olšák wrote:
> The GL 4.4 spec counts the RGTC formats, so it looks like the ARB
> reverted the change from 4.2. NUM_COMPRESSED_TEXTURE_FORMATS should
> return at least 18 and the list of required formats is here:
> 
> COMPRESSED_RED_RGTC1
> COMPRESSED_SIGNED_RED_RGTC1
> COMPRESSED_RG_RGTC2
> COMPRESSED_SIGNED_RG_RGTC2
> COMPRESSED_RGBA_BPTC_UNORM
> COMPRESSED_SRGB_ALPHA_BPTC_UNORM
> COMPRESSED_RGB_BPTC_SIGNED_FLOAT
> COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT
> COMPRESSED_RGB8_ETC2
> COMPRESSED_SRGB8_ETC2
> COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
> COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
> COMPRESSED_RGBA8_ETC2_EAC
> COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
> COMPRESSED_R11_EAC
> COMPRESSED_SIGNED_R11_EAC
> COMPRESSED_RG11_EAC
> COMPRESSED_SIGNED_RG11_EAC
> 
> I think Mesa supports all but BPTC, so it should return at least 14
> with the ES3 extension, right?

It shouldn't count any of the RED or RG formats because they're not
general purpose.  I don't think it should count the ETC formats because
I don't think the driver is required to provide a compressor for those
formats.  The BPTC formats probably should get counted, but the query
was deprecated... so I don't know what that means for new formats that
previously would have been counted.

This is one of those things in OpenGL that should never have been born.
 I came into the ARB just after most of the ARB_texture_compression
design was done, so that one isn't my fault. :)

> Marek
> 
> On Fri, Nov 1, 2013 at 9:09 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> On 11/01/2013 10:20 AM, Marek Olšák wrote:
>>> From: Marek Olšák <marek.olsak at amd.com>
>>>
>>> ---
>>>  tests/spec/gl-3.1/minmax.c | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tests/spec/gl-3.1/minmax.c b/tests/spec/gl-3.1/minmax.c
>>> index 1128939..c965ebe 100644
>>> --- a/tests/spec/gl-3.1/minmax.c
>>> +++ b/tests/spec/gl-3.1/minmax.c
>>> @@ -79,7 +79,9 @@ piglit_init(int argc, char **argv)
>>>       piglit_test_range_float(GL_POINT_SIZE_RANGE, 1, 1);
>>>       piglit_test_range_float(GL_ALIASED_LINE_WIDTH_RANGE, 1, 1);
>>>       piglit_test_range_float(GL_SMOOTH_LINE_WIDTH_RANGE, 1, 1);
>>> -     piglit_test_min_int(GL_NUM_COMPRESSED_TEXTURE_FORMATS, 4);
>>> +     /* The spec lists 4, but the number should be 0, because hw drivers
>>> +      * don't have to expose any non-core extensions like S3TC. */
>>> +     piglit_test_min_int(GL_NUM_COMPRESSED_TEXTURE_FORMATS, 0);
>>
>> It said 4 because someone mistakenly counted the RGTC formats.  Also
>> worth noting is that the mistake was fixed in GL 4.2.
>>
>> With that changed,
>>
>> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
>>
>> I guess tests/spec/gl-3.2/minmax.c and tests/spec/gl-3.3/minmax.c
>> probably need the same fix?
>>
>>>       piglit_test_min_int(GL_MAX_TEXTURE_BUFFER_SIZE, 65536);
>>>       piglit_test_min_int(GL_MAX_RECTANGLE_TEXTURE_SIZE, 1024);



More information about the Piglit mailing list