Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

Commit

Permalink
Updated astc lib.
Browse files Browse the repository at this point in the history
  • Loading branch information
bkaradzic committed Mar 12, 2021
1 parent 7b70810 commit 200165a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
1 change: 0 additions & 1 deletion 3rdparty/astc/astc_codec_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include <stdint.h>
#include <stdlib.h>
#include <math.h>
#include "mathlib.h"

#ifndef MIN
Expand Down
1 change: 1 addition & 0 deletions 3rdparty/astc/astc_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
16 changes: 8 additions & 8 deletions 3rdparty/astc/mathlib.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
/**
* This confidential and proprietary software may be used only as
* authorised by a licensing agreement from ARM Limited
Expand All @@ -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

Expand Down Expand Up @@ -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; } */

Expand Down Expand Up @@ -225,7 +225,7 @@ float4 normalize(float4 p)
*************************************************/

/*
/*
struct mat2 { float2 v[2]; };
struct mat3 { float3 v[3]; };
struct mat4 { float4 v[4]; };
Expand Down Expand Up @@ -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. */

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -362,7 +362,7 @@ float3 solve_monic(float3 p)
}


/*
/*
* This function is not overflow-safe. Use with care.
*/
float4 solve_monic(float4 p)
Expand Down
13 changes: 13 additions & 0 deletions scripts/bimg_encode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}

0 comments on commit 200165a

Please sign in to comment.