[Mesa-dev] [PATCH 06/15] mesa: Call DXTn functions directly

Emil Velikov emil.l.velikov at gmail.com
Mon Oct 2 13:05:39 UTC 2017


On 2 October 2017 at 07:59, Matt Turner <mattst88 at gmail.com> wrote:
> ---
>  src/mesa/main/texcompress_s3tc.c | 117 +++++++++------------------------------
>  1 file changed, 25 insertions(+), 92 deletions(-)
>
> diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
> index e08ed23d3a..e74e4c402a 100644
> --- a/src/mesa/main/texcompress_s3tc.c
> +++ b/src/mesa/main/texcompress_s3tc.c
> @@ -43,78 +43,11 @@
>  #include "util/format_srgb.h"
>
>
> -#if defined(_WIN32) || defined(WIN32)
> -#define DXTN_LIBNAME "dxtn.dll"
> -#define RTLD_LAZY 0
> -#define RTLD_GLOBAL 0
> -#elif defined(__CYGWIN__)
> -#define DXTN_LIBNAME "cygtxc_dxtn.dll"
> -#else
> -#define DXTN_LIBNAME "libtxc_dxtn.so"
> -#endif
> -
Yay, less platform specific handling ;-)


> -   if (ext_tx_compress_dxtn) {
> -      (*ext_tx_compress_dxtn)(3, srcWidth, srcHeight, pixels,
> +   if (tx_compress_dxtn) {
> +      (*tx_compress_dxtn)(3, srcWidth, srcHeight, pixels,
Please use something like the following. It will drop the unneeded
checks w/o having to re-indent the whole thing.

   {
      tx_compress_dxtn(3, srcWidth, srcHeight, pixels,
...


Thanks
Emil


More information about the mesa-dev mailing list