[Mesa-dev] [PATCH 4/8] i965: Update the shadow miptree from the main to fake the ETC2 compression

Eleni Maria Stea estea at igalia.com
Sun Feb 3 13:59:42 UTC 2019


On Fri, 18 Jan 2019 17:09:03 -0800
Nanley Chery <nanleychery at gmail.com> wrote:

> On Mon, Nov 19, 2018 at 10:54:08AM +0200, Eleni Maria Stea wrote:
[...]
> > +   int img_d = smt->surf.logical_level0_px.depth;  
> 
> I don't think 3D ETC textures are possible. From the GL4.6 spec:
> 
> 	An INVALID_OPERATION error is generated by
> CompressedTexImage3D if internalformat is one of the EAC, ETC2, or
> RGTC formats and either border is non-zero, or target is not
> TEXTURE_2D_ARRAY.

Hi Nanley,

Thanks for pointing this out. I've made the change in my new series
of patches but after giving it a second thought, I believe that I'd
rather put back the depth in the calculation of num_slices:

As, I understand the spec, if the border is zero, the 3D images should
be supported. Mesa already checks the border value in the file:
src/mesa/main/teximage.c function: compressed_texture_error_check and
has a comment:

/* No compressed formats support borders at this time */

and so only ETC/EAC compressed formats without border will reach the
update function and we should support them.

Also, I see that we have some CTS tests that call the
CompressedTexImage3D for ETC/EAC formats with 0 border value, so I
suppose that is expected to have 3D images of these formats.

What do you think?

Thank you in advance,
Eleni


More information about the mesa-dev mailing list