ETC2 decoder A new ETC2 decoder was added to SwiftShader, based on the OpenGL ETC2 specification. The decoder is fully standalone and does not rely on any outside code (there are no files included in the header and the source file only include the header file, so it can easily be ported to any other project). Things to note: - In Surface.cpp, signed ETC2 images are decoded to full 32FP images, because of the lack of support for signed 8 bit R and RG internal formats. This should be fixed as soon as these formats are made available. - sRGB conversion is not performed within the decoder, so it has been added as a loop inside Surface::decodeETC2 after the ETC2 decoding is performed. This is to make sure that there is no loss of precision, should we choose to do the conversion to a higher bit precision format. The loop is fairly straightforward and does the conversion in place, so the impact on performance compared to doing the sRGB conversion in the decoder should be minimal. Change-Id: I3a1af623353344bf35818ba9c9f4cf349b587e2f Reviewed-on: https://swiftshader-review.googlesource.com/3960 Tested-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/libGLES_CM/libGLES_CM.cbp b/src/OpenGL/libGLES_CM/libGLES_CM.cbp index 905a884..017955f 100644 --- a/src/OpenGL/libGLES_CM/libGLES_CM.cbp +++ b/src/OpenGL/libGLES_CM/libGLES_CM.cbp
@@ -199,6 +199,8 @@ <Unit filename="../../Renderer/Color.hpp" /> <Unit filename="../../Renderer/Context.cpp" /> <Unit filename="../../Renderer/Context.hpp" /> + <Unit filename="../../Renderer/ETC_Decoder.cpp" /> + <Unit filename="../../Renderer/ETC_Decoder.hpp" /> <Unit filename="../../Renderer/LRUCache.hpp" /> <Unit filename="../../Renderer/Matrix.cpp" /> <Unit filename="../../Renderer/Matrix.hpp" />