2017-06-27 14:54 GMT+02:00 Wladimir J. van der Laan <laa...@gmail.com>: > Add support for ETC2 compressed textures in the etnaviv driver. > > One step closer towards GL ES 3 support. > > For now, treat SRGB and RGB formats the same. It looks like these are > distinguished using a different bit in sampler state, and not part of > the format, but I have not yet been able to confirm this for sure. > --- > src/gallium/drivers/etnaviv/etnaviv_format.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > This is rebased to the new version of the extended texture patchset. > > diff --git a/src/gallium/drivers/etnaviv/etnaviv_format.c > b/src/gallium/drivers/etnaviv/etnaviv_format.c > index c7c032a..cb67060 100644 > --- a/src/gallium/drivers/etnaviv/etnaviv_format.c > +++ b/src/gallium/drivers/etnaviv/etnaviv_format.c > @@ -234,6 +234,17 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = { > _T(DXT3_RGBA, DXT2_DXT3, SWIZ(X, Y, Z, W), NONE), > _T(DXT5_RGBA, DXT4_DXT5, SWIZ(X, Y, Z, W), NONE), > > + _T(ETC2_RGB8, EXT_NONE | EXT_FORMAT, > SWIZ(X, Y, Z, W), NONE), /* Extd. format NONE doubles as ETC2_RGB8 */ > + _T(ETC2_SRGB8, EXT_NONE | EXT_FORMAT, > SWIZ(X, Y, Z, W), NONE), > + _T(ETC2_RGB8A1, EXT_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 | EXT_FORMAT, > SWIZ(X, Y, Z, W), NONE), > + _T(ETC2_SRGB8A1, EXT_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 | EXT_FORMAT, > SWIZ(X, Y, Z, W), NONE), > + _T(ETC2_RGBA8, EXT_RGBA8_ETC2_EAC | EXT_FORMAT, > SWIZ(X, Y, Z, W), NONE), > + _T(ETC2_SRGBA8, EXT_RGBA8_ETC2_EAC | EXT_FORMAT, > SWIZ(X, Y, Z, W), NONE), > + _T(ETC2_R11_UNORM, EXT_R11_EAC | EXT_FORMAT, > SWIZ(X, Y, Z, W), NONE), > + _T(ETC2_R11_SNORM, EXT_SIGNED_R11_EAC | EXT_FORMAT, > SWIZ(X, Y, Z, W), NONE), > + _T(ETC2_RG11_UNORM, EXT_RG11_EAC | EXT_FORMAT, > SWIZ(X, Y, Z, W), NONE), > + _T(ETC2_RG11_SNORM, EXT_SIGNED_RG11_EAC | EXT_FORMAT, > SWIZ(X, Y, Z, W), NONE), > +
I can confirm that 11 bit stuff works on the GC2000 . I used piglit's oes_compressed_etc2_texture-miptree_gles3 for verification. How have you tested these formats? For instance I get the following fails: debian@cubox:~/ac_mesa$ /home/debian/piglit/bin/oes_compressed_etc2_texture-miptree_gles3 rgb8 -auto -fbo Probe color at (16,0) Left: 0.533333 0.200000 0.000000 1.000000 Right: 0.866667 0.600000 0.333333 1.000000 PIGLIT: {"result": "fail" } debian@cubox:~/ac_mesa$ /home/debian/piglit/bin/oes_compressed_etc2_texture-miptree_gles3 rgb8-punchthrough-alpha1 -auto -fbo Probe color at (6,0) Left: 0.733333 0.400000 0.000000 1.000000 Right: 0.133333 0.066667 0.000000 1.000000 PIGLIT: {"result": "fail" } With that fact I think we need to find out what is broken with the non 11 bit formats on GC2000 and if everything works on your platform. I am not sure if we should advertise the broken formats (on gpus with HALTI0). greets -- Christian Gmeiner, MSc https://www.youtube.com/user/AloryOFFICIAL https://soundcloud.com/christian-gmeiner _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev