mirror of
https://github.com/bkaradzic/bimg.git
synced 2026-02-17 12:42:35 +01:00
Updated astc lib.
This commit is contained in:
1
3rdparty/astc/astc_codec_internals.h
vendored
1
3rdparty/astc/astc_codec_internals.h
vendored
@@ -19,7 +19,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include "mathlib.h"
|
||||
|
||||
#ifndef MIN
|
||||
|
||||
1
3rdparty/astc/astc_lib.cpp
vendored
1
3rdparty/astc/astc_lib.cpp
vendored
@@ -53,6 +53,7 @@ namespace
|
||||
{ 0, 1, 2, 3 }, // ASTC_RGBA
|
||||
{ 2, 1, 0, 3 }, // ASTC_BGRA
|
||||
{ 0, 0, 0, 1 }, // ASTC_ENC_NORMAL_RA
|
||||
{ 0, 0, 0, 1 }, // ASTC_ENC_NORMAL_RA_PCPT
|
||||
{ 0, 3, 6, 5 }, // ASTC_DEC_RA_NORMAL
|
||||
};
|
||||
|
||||
|
||||
16
3rdparty/astc/mathlib.cpp
vendored
16
3rdparty/astc/mathlib.cpp
vendored
@@ -1,4 +1,4 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/**
|
||||
* This confidential and proprietary software may be used only as
|
||||
* authorised by a licensing agreement from ARM Limited
|
||||
@@ -10,8 +10,8 @@
|
||||
* by a licensing agreement from ARM Limited.
|
||||
*
|
||||
* @brief Library of math functions.
|
||||
*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#define _USE_MATH_DEFINES // for M_PI on windows
|
||||
|
||||
@@ -116,7 +116,7 @@ float4 fmin(float4 p, float4 q)
|
||||
return float4(fmin(p.x, q.x), fmin(p.y, q.y), fmin(p.z, q.z), fmin(p.w, q.w));
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
float dot( float2 p, float2 q ) { return p.x*q.x + p.y*q.y; } float dot( float3 p, float3 q ) { return p.x*q.x + p.y*q.y + p.z*q.z; } float dot( float4 p, float4 q ) { return p.x*q.x + p.y*q.y +
|
||||
p.z*q.z + p.w*q.w; } */
|
||||
|
||||
@@ -225,7 +225,7 @@ float4 normalize(float4 p)
|
||||
|
||||
*************************************************/
|
||||
|
||||
/*
|
||||
/*
|
||||
struct mat2 { float2 v[2]; };
|
||||
struct mat3 { float3 v[3]; };
|
||||
struct mat4 { float4 v[4]; };
|
||||
@@ -265,7 +265,7 @@ float determinant(mat4 p)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
characteristic polynomials for matrices. These polynomials are monic, meaning that the coefficient of the highest component is 1; this component is omitted. The first component is the constant
|
||||
part. */
|
||||
|
||||
@@ -293,7 +293,7 @@ float4 characteristic_poly(mat4 p)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
Root finders for monic polynomials (highest coefficient is equal to 1)
|
||||
|
||||
Returns a vector with length equal to the number of roots that the polynomial has;
|
||||
@@ -362,7 +362,7 @@ float3 solve_monic(float3 p)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* This function is not overflow-safe. Use with care.
|
||||
*/
|
||||
float4 solve_monic(float4 p)
|
||||
|
||||
@@ -42,4 +42,17 @@ project "bimg_encode"
|
||||
"-fPIC",
|
||||
}
|
||||
|
||||
configuration { "mingw* or linux* or osx*" }
|
||||
buildoptions {
|
||||
"-Wno-implicit-fallthrough",
|
||||
"-Wno-shadow",
|
||||
"-Wno-shift-negative-value",
|
||||
"-Wno-undef",
|
||||
}
|
||||
|
||||
buildoptions_cpp {
|
||||
"-Wno-class-memaccess",
|
||||
"-Wno-deprecated-copy",
|
||||
}
|
||||
|
||||
configuration {}
|
||||
|
||||
Reference in New Issue
Block a user