KHR-GL46.direct_state_access.textures_compressed_subimage assert fails on Haswell, and presumably older platforms as well which don't have native ETC support. intel_mipmap_tree.c:3320: intel_miptree_map_etc: Assertion `map->mode & GL_MAP_WRITE_BIT' failed.
The test does glGetCompressedTexImage() on an ETC texture, which we have never done correctly. We'd need to implement that properly.
There is a patch proposal waiting for review at: https://patchwork.freedesktop.org/series/38872/ Kenneth, could you give it a view?
(In reply to Andrés Gómez García from comment #2) > There is a patch proposal waiting for review at: > https://patchwork.freedesktop.org/series/38872/ > > Kenneth, could you give it a view? To add a couple more details, this patch fixes both GetCompressed* functions and an issue with the rendering of ETC2 formats on Gen7 GPUs (tested on HSW, Ivy), you may use this example to easily test both the rendering and the getCompressed functions: https://github.com/hikiko/test-compression (make and ./test compressed_texture)
This patch cannot be applied on the latest 18.3.0 mesa, but it was successfully applied on 18.1.0 version of mesa and was verified on it. Test MESA_GL_VERSION_OVERRIDE=4.6 ./glcts -n KHR-GL46.direct_state_access.textures_compressed_subimage passes on mesa-18.1.0 having patch applied and fails without this patch on the same mesa version. Environment: Haswell, Intel® HD Graphics 4600 CPU: Intel Core i5-4300M OS: 16.04.1-Ubuntu kernel: 4.15.0 Please be aware this patch should be merged carefully on the latest mesa so it has some mismatches in files.
(In reply to Marina Chernish from comment #4) > This patch cannot be applied on the latest 18.3.0 mesa, but it was > successfully applied on 18.1.0 version of mesa and was verified on it. Just commenting in case you are not aware, since patchwork seems to be very confused about the review of this patch. It has gotten several reviews upt to v6 by now: https://lists.freedesktop.org/archives/mesa-dev/2018-July/200422.html But, AFAIK, Nanley and Eleni agreed that it needs to be rewritten from a different approach and Eleni is doing so. Stay tuned.
(In reply to Andrés Gómez García from comment #5) > (In reply to Marina Chernish from comment #4) > > This patch cannot be applied on the latest 18.3.0 mesa, but it was > > successfully applied on 18.1.0 version of mesa and was verified on it. > > Just commenting in case you are not aware, since patchwork seems to be very > confused about the review of this patch. > > It has gotten several reviews upt to v6 by now: > https://lists.freedesktop.org/archives/mesa-dev/2018-July/200422.html > > But, AFAIK, Nanley and Eleni agreed that it needs to be rewritten from a > different approach and Eleni is doing so. > > Stay tuned. Sorry, reviewed email again and found all threads related to discussion of this patch. Thanks for pointing it. First assumption, that it might be a "final" version, was based on the mesa patchwork - there are only 2 versions of this patch now https://patchwork.freedesktop.org/project/mesa/patches/?submitter=&state=&q=Fix+ETC2%2FEAC+GetCompressed*+functions+on+Gen7+GPUs&archive=&delegate=
Hello, I am working on a new series of patches on that, I haven't sent it for review yet.
This should be fixed by the following commit: commit d8eb7287fe82e74da8f2938e7190610d3ded0051 Author: Eleni Maria Stea <estea@igalia.com> Date: Fri Feb 15 15:29:41 2019 +0200 i965: Faking the ETC2 compression on Gen < 8 GPUs using two miptrees. GPUs Gen < 8 cannot sample ETC2 formats. So far, they converted the compressed EAC/ETC2 images to non-compressed RGBA images. When GetCompressed* functions were called, the pixels were returned in this RGBA format and not the compressed format that was expected. Trying to fix this problem, we use a secondary shadow miptree to store the decompressed data for the rendering and the main miptree to store the compressed for the Get functions to work. Each time that the main miptree is written with compressed data, we decompress them to RGB and update the shadow. Then we use the shadow for rendering. [snip]
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.