[Piglit] [PATCH piglit] Add a test case for all of the modes of BPTC texture compression
neil at linux.intel.com
Tue Jul 29 08:22:38 PDT 2014
Marek Olšák <maraeo at gmail.com> writes:
> Adding a new test for BPTC might be useful if want to test a feature
> that isn't covered by other tests, because there already is a test
> infrastructure for testing all OpenGL formats and it's just a matter
> of adding BPTC support to existing tests.
I think this particular test case is worth adding because none of the
other generic tests would be able to test all of the possible modes of
BPTC. This is needed to test all of the code paths in the software
decompressor. We still need an additional test to do this for the
> Mostly, just adding the new formats to appropriate tables is enough.
> It would be a couple lines of code and the feature coverage would be
> huge. The tests are:
> 1) All tests that include fbo-formats.h, however, only
> fbo-generatemipmap-formats can be used to test compressed textures. It
> reads the table from fbo-formats.h.
Great. This also affects getteximage-formats. fbo-generatemipmap-formats
needs a slight tweak because it uploads a float texture with values
between -5 and 5. When these are compressed to the unsigned float format
the -5 values will get clamped to 0.
> 2) texwrap.c - there are tables at the beginning of the file.
> 3) compressedteximage.c - this one is simple and tests texture uploads
> and downloads (not decompression though)
> 4) For glGetTexImage, you can fork rgtc-teximage-01.c
I think we could get away without doing this because getteximage-formats
should test glGetTexImage.
> 5) You might also need to update invalid-formats.c. I don't know the
> test very well, but it looks useful.
Somebody has already updated invalid-formats.c and it seems to pass so I
guess I don't need to do anything here.
> Also, see the "ext_texture_compression_rgtc" section in all.py. The
> new bptc section should look similar.
Ah yes, thanks. Someone has already added a BPTC section anyway which I
failed to notice. I can just add the tests to that section instead.
More information about the Piglit